diff options
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | assets/lockchain layout.svg | 488 | ||||
-rw-r--r-- | assets/lockchain-complete.png | bin | 0 -> 118669 bytes | |||
-rw-r--r-- | assets/lockchain-simple.png | bin | 0 -> 94236 bytes | |||
-rw-r--r-- | lockchain-files/src/fs.rs | 1 | ||||
-rw-r--r-- | lockchain-files/src/lib.rs | 5 |
6 files changed, 494 insertions, 5 deletions
@@ -17,6 +17,11 @@ This enables a few different configurations. Additionally there is `lockchain-http` which provides an easy to use RESTful API to use for browser extentions or client-side logic which can't rely on local cryptography. +**There are some graphical representations below** + +![](./assets/lockchain-simple.png) +![](./assets/lockchain-complete.png) + ## Security notice diff --git a/assets/lockchain layout.svg b/assets/lockchain layout.svg new file mode 100644 index 0000000..9ff658e --- /dev/null +++ b/assets/lockchain layout.svg @@ -0,0 +1,488 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="210mm" + height="297mm" + viewBox="0 0 744.09448819 1052.3622047" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="lockchain layout.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.4142136" + inkscape:cx="367.17683" + inkscape:cy="443.65175" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2549" + inkscape:window-height="1861" + inkscape:window-x="1056" + inkscape:window-y="251" + inkscape:window-maximized="0" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + transform="translate(324.17131,582.48598)" + id="g4306"> + <rect + rx="36.112953" + ry="36.112953" + y="105.05943" + x="165.07666" + height="72.225906" + width="157.5838" + id="rect4136" + style="fill:#ff7b7b;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4138" + y="152.10988" + x="208.1459" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto" + y="152.10988" + x="208.1459" + id="tspan4140" + sodipodi:role="line">http</tspan></text> + </g> + <path + inkscape:connector-curvature="0" + id="path4311" + d="m 373.82568,723.65836 105.33407,0" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.83430195;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <g + id="g4144-6" + transform="translate(79.393924,442.45768)"> + <g + id="g4173" + transform="translate(-175.76654,327.4945)"> + <g + id="g4202"> + <rect + rx="36.112953" + ry="36.112953" + y="105.43052" + x="168.7583" + height="72.225906" + width="157.5838" + id="rect4136-0" + style="fill:#ffd27b;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4138-6" + y="156.55324" + x="211.39786" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto" + y="156.55324" + x="211.39786" + id="tspan4140-4" + sodipodi:role="line">files</tspan></text> + </g> + </g> + <g + id="g4207" + transform="translate(246.47722,369.71583)"> + <g + id="g4173-4" + transform="translate(-273.75135,-42.426406)"> + <rect + rx="36.112953" + ry="36.112953" + y="105.6356" + x="191.38525" + height="72.225906" + width="157.5838" + id="rect4136-0-6" + style="fill:#ffd27b;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4138-6-6" + y="156.55324" + x="211.39786" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto" + y="156.55324" + x="211.39786" + id="tspan4140-4-3" + sodipodi:role="line">blocks</tspan></text> + </g> + </g> + </g> + <g + id="g4144-9" + transform="translate(-10.812934,644.72731)"> + <g + id="g4237"> + <rect + style="fill:#c37bff;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4136-9" + width="157.5838" + height="72.225906" + x="168.7583" + y="105.43052" + ry="36.112953" + rx="9.3272314" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="192.02286" + y="152.10988" + id="text4138-5" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4140-2" + x="192.02286" + y="152.10988" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto">server</tspan></text> + </g> + </g> + <g + id="g4248" + transform="translate(-33.548423,212.17826)"> + <rect + ry="32.5" + rx="9.3272305" + y="620.45496" + x="139.74997" + height="32.5" + width="261.07144" + id="rect4242" + style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4244" + y="642.71936" + x="221.42857" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16.25px;font-family:Roboto;-inkscape-font-specification:Roboto" + y="642.71936" + x="221.42857" + id="tspan4246" + sodipodi:role="line">Vault trait API</tspan></text> + </g> + <g + id="g4248-3" + transform="translate(-33.548423,86.953407)"> + <g + id="g4277"> + <rect + style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4242-7" + width="261.07144" + height="32.5" + x="139.74997" + y="620.45496" + rx="9.3272305" + ry="32.5" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="178.78819" + y="642.71936" + id="text4244-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4246-5" + x="178.78819" + y="642.71936" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16.25px;font-family:Roboto;-inkscape-font-specification:Roboto">Serves encrypted records</tspan></text> + </g> + </g> + <g + id="g4144-9-9" + transform="translate(-0.455793,400.87373)"> + <g + id="g4416" + transform="translate(-14.857141,0)"> + <rect + style="fill:#c37bff;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4136-9-8" + width="157.5838" + height="72.225906" + x="173.2583" + y="104.93052" + ry="36.112953" + rx="9.3272314" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="203.51505" + y="151.60988" + id="text4138-5-0" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4140-2-2" + x="203.51505" + y="151.60988" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto">client</tspan></text> + </g> + </g> + <path + inkscape:connector-curvature="0" + id="path4311-4" + d="m 236.73727,590.05222 0,105.33408" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.83430195;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <g + id="g4454" + transform="translate(324.17131,338.1324)"> + <g + id="g4474"> + <rect + rx="36.112953" + ry="36.112953" + y="105.05943" + x="165.07666" + height="72.225906" + width="157.5838" + id="rect4456" + style="fill:#ff7b7b;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4458" + y="150.02982" + x="188.24356" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto" + y="150.02982" + x="188.24356" + id="tspan4460" + sodipodi:role="line">crypto</tspan></text> + </g> + </g> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.83430195;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 375.59345,479.30479 105.33407,0" + id="path4462" + inkscape:connector-curvature="0" /> + <g + transform="translate(-33.548425,-157.40017)" + id="g4464"> + <g + id="g4482"> + <rect + ry="32.5" + rx="9.3272305" + y="620.45496" + x="139.74997" + height="32.5" + width="261.07144" + id="rect4468" + style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4470" + y="642.80267" + x="176.31261" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16.25px;font-family:Roboto;-inkscape-font-specification:Roboto" + y="642.80267" + x="176.31261" + id="tspan4472" + sodipodi:role="line">Rust API for cleartext files</tspan></text> + </g> + </g> + <rect + style="fill:#e8e8e8;fill-opacity:1;stroke:#000000;stroke-width:5.37668514;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:5.37668517, 10.75337034;stroke-dashoffset:0;stroke-opacity:1" + id="rect4501" + width="672.62329" + height="315.07376" + x="33.688343" + y="105.60978" + rx="0" + ry="0" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="610.90771" + y="131.79376" + id="text4505" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4507" + x="610.90771" + y="131.79376" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;font-family:Roboto;-inkscape-font-specification:Roboto">optional</tspan></text> + <g + id="g4524" + transform="translate(-15.312934,15.500961)"> + <g + id="g4536"> + <rect + rx="9.3272314" + ry="36.112953" + y="104.93052" + x="173.2583" + height="72.225906" + width="157.5838" + id="rect4526" + style="fill:#c37bff;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4528" + y="155.84816" + x="179.09122" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto" + y="155.84816" + x="179.09122" + id="tspan4530" + sodipodi:role="line">browser</tspan></text> + </g> + </g> + <g + id="g4541" + transform="translate(324.17131,77.514968)"> + <rect + style="fill:#ff7b7b;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4543" + width="157.5838" + height="72.225906" + x="165.07666" + y="105.05943" + ry="36.112953" + rx="36.112953" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="208.1459" + y="152.10988" + id="text4545" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4547" + x="208.1459" + y="152.10988" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto">http</tspan></text> + </g> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.83430195;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 375.59345,218.33021 105.33407,0" + id="path4549" + inkscape:connector-curvature="0" /> + <g + transform="translate(-10.812934,140.22581)" + id="g4551"> + <g + id="g4553"> + <rect + rx="9.3272314" + ry="36.112953" + y="105.43052" + x="168.7583" + height="72.225906" + width="157.5838" + id="rect4555" + style="fill:#c37bff;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4557" + y="152.10988" + x="192.02286" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Roboto;-inkscape-font-specification:Roboto" + y="152.10988" + x="192.02286" + id="tspan4559" + sodipodi:role="line">server</tspan></text> + </g> + </g> + <g + transform="translate(-33.548423,-292.32327)" + id="g4561"> + <rect + style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4563" + width="261.07144" + height="32.5" + x="139.74997" + y="620.45496" + rx="9.3272305" + ry="32.5" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="221.42857" + y="642.71936" + id="text4565" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4567" + x="221.42857" + y="642.71936" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16.25px;font-family:Roboto;-inkscape-font-specification:Roboto">Vault trait API</tspan></text> + </g> + <g + transform="translate(-33.548425,-417.54812)" + id="g4569"> + <g + id="g4571"> + <rect + ry="32.5" + rx="9.3272305" + y="620.45496" + x="139.74997" + height="32.5" + width="261.07144" + id="rect4573" + style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1.35800004;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + sodipodi:linespacing="125%" + id="text4575" + y="642.71936" + x="178.78819" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16.25px;font-family:Roboto;-inkscape-font-specification:Roboto" + y="642.71936" + x="178.78819" + id="tspan4577" + sodipodi:role="line">Serves decrypted records</tspan></text> + </g> + </g> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.18754053;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 236.73727,372.32577 0,79.03498" + id="path4589" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/assets/lockchain-complete.png b/assets/lockchain-complete.png Binary files differnew file mode 100644 index 0000000..ab6f85d --- /dev/null +++ b/assets/lockchain-complete.png diff --git a/assets/lockchain-simple.png b/assets/lockchain-simple.png Binary files differnew file mode 100644 index 0000000..7d9f84f --- /dev/null +++ b/assets/lockchain-simple.png diff --git a/lockchain-files/src/fs.rs b/lockchain-files/src/fs.rs index 9c5340f..7c9d44a 100644 --- a/lockchain-files/src/fs.rs +++ b/lockchain-files/src/fs.rs @@ -3,6 +3,7 @@ use std::path::PathBuf; use std::fs::{self, OpenOptions}; use lcc::traits::AutoEncoder; +use lcc::Record; pub struct Filesystem { name: String, diff --git a/lockchain-files/src/lib.rs b/lockchain-files/src/lib.rs index 3caa99a..d42c222 100644 --- a/lockchain-files/src/lib.rs +++ b/lockchain-files/src/lib.rs @@ -3,11 +3,6 @@ //! #![feature(non_modrs_mods)] -extern crate serde; -#[macro_use] -extern crate serde_derive; -extern crate serde_json; - extern crate lockchain_core as lcc; use lcc::traits::{AutoEncoder, Body, Vault}; |