From d29a4de26d0e3f31f467bcc9167b9758fad774f8 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 17 Sep 2017 11:57:16 +0200 Subject: Update both forward and reverse mode crypto docs They were written before HKDF was introduced. Improve graphics as well --- docs/img/file-content-encryption.svg | 166 +++--- docs/img/reverse-derivePathIV.svg | 344 +++++++---- docs/img/reverse-file-content-encryption.svg | 839 +++++++++++++-------------- 3 files changed, 733 insertions(+), 616 deletions(-) (limited to 'docs/img') diff --git a/docs/img/file-content-encryption.svg b/docs/img/file-content-encryption.svg index 6f054eb..dfde974 100644 --- a/docs/img/file-content-encryption.svg +++ b/docs/img/file-content-encryption.svg @@ -19,40 +19,40 @@ + id="marker13917" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + style="fill:#000000;fill-opacity:0.99607843;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:0.99607843" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z" + id="path13915" /> + id="path13669" /> + + + + id="path8951" /> + inkscape:document-rotation="0" + inkscape:guide-bbox="true"> + + @@ -388,34 +415,17 @@ id="path8425" inkscape:connector-curvature="0" /> - - - N IV AAD - + + + cat + + diff --git a/docs/img/reverse-derivePathIV.svg b/docs/img/reverse-derivePathIV.svg index 622cec1..65e8e0a 100644 --- a/docs/img/reverse-derivePathIV.svg +++ b/docs/img/reverse-derivePathIV.svg @@ -9,12 +9,12 @@ 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="144.88924mm" - height="40.864796mm" - viewBox="0 0 513.38705 144.79651" + width="146.88574mm" + height="61.163269mm" + viewBox="0 0 520.46128 216.72024" id="svg2" version="1.1" - inkscape:version="0.91 r13725" + inkscape:version="0.92+devel unknown" sodipodi:docname="reverse-derivePathIV.svg"> @@ -28,8 +28,8 @@ inkscape:isstock="true"> @@ -43,8 +43,8 @@ inkscape:isstock="true"> @@ -58,8 +58,8 @@ inkscape:isstock="true"> @@ -73,8 +73,8 @@ inkscape:isstock="true"> @@ -88,8 +88,8 @@ inkscape:isstock="true"> @@ -103,11 +103,43 @@ inkscape:isstock="true"> + + + + + + + inkscape:snap-page="false" + inkscape:document-rotation="0"> + originx="-189.45444" + originy="-752.75882" /> @@ -162,201 +195,189 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(-187.87518,-173.18251)"> - - - - + transform="translate(-189.45445,-82.883014)"> + + + + + + + + - + y="272.83463" + style="font-size:60px;line-height:1.25">  SHA256(path + \0 + ) - + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.00295734px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:end;letter-spacing:0px;text-anchor:end">SHA256(path + \0 + TruncateTruncateto 128 bits derivePathIV: - "DIRIV""DIRIV""FILEID""BLOCK0IV" + y="262.20465" + style="font-size:10px;line-height:1.25">  DirIVDirIVFileIDBlock0IV + id="flowPara5263" + style="font-size:10px;line-height:1.25">  Plaintext path + + File name encryption + + + + encryptedpath + + ) + diff --git a/docs/img/reverse-file-content-encryption.svg b/docs/img/reverse-file-content-encryption.svg index 89eb3ab..40cc2d5 100644 --- a/docs/img/reverse-file-content-encryption.svg +++ b/docs/img/reverse-file-content-encryption.svg @@ -9,9 +9,9 @@ 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="213.51266mm" - height="90.3311mm" - viewBox="0 0 756.54092 320.07084" + width="182.72755mm" + height="77.163986mm" + viewBox="0 0 647.45982 273.41571" id="svg2" version="1.1" inkscape:version="0.92+devel unknown" @@ -23,20 +23,20 @@ orient="auto" refY="0" refX="0" - id="marker15863" + id="marker12596" style="overflow:visible" inkscape:isstock="true"> + style="fill:#000000;fill-opacity:0.99607843;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:0.99607843" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path12498" /> + inkscape:stockid="Arrow1Mend"> - - - + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path8609" /> + inkscape:stockid="Arrow1Mend"> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path4424" /> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path8951" /> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path8951-6" /> + inkscape:stockid="Arrow1Mend" + inkscape:collect="always"> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path15496-0" /> - - - + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path12390-6" /> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path8951-6-1" /> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path12390-6-9" /> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path15496-0-5" /> + originx="-8.1588869" + originy="-624.40413" /> + + + + + + + + + @@ -312,7 +325,7 @@ image/svg+xml - + @@ -320,176 +333,134 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(48.888352,-107.88726)"> + transform="translate(-8.1588805,-154.54238)"> + x="498.61414" + y="179.82323" /> + x="506.50458" + y="192.34044" /> - "5qbHc9O.../7GMW91..." + x="506.50458" + y="265.31494" /> File ID + x="573.16339" + y="207.36388" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.00295734px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;letter-spacing:0px;text-anchor:middle">File ID Block N + x="573.46008" + y="257.81741" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.00295734px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;letter-spacing:0px;text-anchor:middle">Block N IV + x="572.78247" + y="281.78592" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.00295734px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;letter-spacing:0px;text-anchor:middle">IV authentication tag + x="573.65417" + y="308.02335" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;text-indent:0;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:middle;white-space:normal;shape-padding:0;opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1">Ciphertext +authenticationtag Ciphertext +  -   ... ... - Plaintextfilecontent - + x="506.50458" + y="286.57477" /> AES-SIV - IV AAD + + + + + File Name Encryption - "Photos/Team.jpg" - + id="tspan4157-9-7-0-0" + x="344.1413" + y="233.00304" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15.00250003px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:center;letter-spacing:0px;text-anchor:middle;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal">Block0IV + - encrypted path + style="opacity:1;fill:#b0b0b0;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4273-2-5" + width="141.24979" + height="228.70485" + x="15.245495" + y="180.69168" /> + + + x="85.355354" + y="322.6373" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.00295734px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;letter-spacing:0px;text-anchor:middle" + id="tspan16685">plaintextblock N - + id="tspan4157-9-8-2-6" + x="85.853493" + y="279.63336" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.00295734px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;letter-spacing:0px;text-anchor:middle;stroke-width:0.99999994px">Block N derivePathIV + id="tspan8336-8-9" + x="-259.94525" + y="86.970665" + style="font-size:15.00295734px;line-height:1.25;stroke-width:0.99999994px">... FileID + id="tspan8336-8-2" + x="-389.71329" + y="86.970665" + style="font-size:15.00295734px;line-height:1.25;stroke-width:0.99999994px">... + + Block0IV + id="tspan4157-9-7-0-0-2" + x="214.68965" + y="271.35034" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.00295734px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:end;letter-spacing:0px;text-anchor:end;stroke-width:0.99999994px">N - - - - - + sodipodi:nodetypes="cc" /> + BlockIV + FileID + FileID - - - - + sodipodi:nodetypes="cc" /> + Plaintext file + Ciphertext file + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.9999997;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3336-9-4-2-0-1-3-3-0-8-2" + width="34.75692" + height="21.259842" + x="281.88644" + y="288.16638" + ry="10.629921" /> + cat - -- cgit v1.2.3