From 5a5273c1ac72c5a543d54d8bd7218656f7a05a73 Mon Sep 17 00:00:00 2001 From: Stan Clai Date: Sat, 4 Mar 2017 01:38:53 +0300 Subject: [PATCH 1/4] Errors of the PDF compiling phase are fixed plfLaTeX lamented that longtable.sty can't be found, and toprule control sequence is undefined. Solution was to add packages "longtable" and "booktabs". --- src/convert_to_tex.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/convert_to_tex.sh b/src/convert_to_tex.sh index 5f5cb81..82c31ca 100755 --- a/src/convert_to_tex.sh +++ b/src/convert_to_tex.sh @@ -31,6 +31,8 @@ cat > $DIR/main.tex < Date: Sat, 4 Mar 2017 01:40:13 +0300 Subject: [PATCH 2/4] Bug with broken images in html and epub is fixed This fix in a certain way cancels #116, but it's necessary. The fact is that during making html and epub output all the images are supposed to be directly in chapter folders. Commands that link or copy images don't descent into subdirectories, so images in "assets" folder are not copied to destination. So, there was two ways to fix this: first, to change logic to recursively walk into all subfolders and find all images, and second, to place all images in some uniform way (i.e. only in chapter directories, along with text files). The latter was much more easier to make. --- src/chapter_14_appendices/{assets => }/crypto_1.png | Bin src/chapter_14_appendices/{assets => }/crypto_2.png | Bin src/chapter_14_appendices/{assets => }/crypto_3.png | Bin src/chapter_14_appendices/cryptography.md | 7 ++++--- 4 files changed, 4 insertions(+), 3 deletions(-) rename src/chapter_14_appendices/{assets => }/crypto_1.png (100%) rename src/chapter_14_appendices/{assets => }/crypto_2.png (100%) rename src/chapter_14_appendices/{assets => }/crypto_3.png (100%) diff --git a/src/chapter_14_appendices/assets/crypto_1.png b/src/chapter_14_appendices/crypto_1.png similarity index 100% rename from src/chapter_14_appendices/assets/crypto_1.png rename to src/chapter_14_appendices/crypto_1.png diff --git a/src/chapter_14_appendices/assets/crypto_2.png b/src/chapter_14_appendices/crypto_2.png similarity index 100% rename from src/chapter_14_appendices/assets/crypto_2.png rename to src/chapter_14_appendices/crypto_2.png diff --git a/src/chapter_14_appendices/assets/crypto_3.png b/src/chapter_14_appendices/crypto_3.png similarity index 100% rename from src/chapter_14_appendices/assets/crypto_3.png rename to src/chapter_14_appendices/crypto_3.png diff --git a/src/chapter_14_appendices/cryptography.md b/src/chapter_14_appendices/cryptography.md index 4cb86cc..c2564b0 100644 --- a/src/chapter_14_appendices/cryptography.md +++ b/src/chapter_14_appendices/cryptography.md @@ -8,6 +8,7 @@ Writing is actually one of the earliest forms of cryptography as not everyone co Put in another way, encryption is the translation of information written in plaintext into a non-readable form (ciphertext) using algorithmic schemes (ciphers). The goal is to use the right key to unlock the ciphertext and return it back into its original plain text form so it becomes readable again. Although most encryption methods refer to written word, during World War Two, the US military used Navajo Indians, who traveled between camps sending messages in their native tongue. The reason the army used the Navajo tribe was to protect the information they were sending from the Japanese troops, who famously could not decipher the Navajo's spoken language. This is a very simple example of using a language to send messages that you do not want people to listen into or know what you're discussing. + Why is encryption important? ---------------------------- @@ -40,13 +41,13 @@ Classical ciphers refer to historical ciphers, which are now out of popular use In a transposition cipher, the letters themselves are kept unchanged, but the order within the message is scrambled according to some well-defined scheme. An example of a transposition cipher is Skytale, which was used in ancient Rome and Greece. A paperstrip was wrapped around a stick and the message written across it. That way the message could not be read unless wound around a stick of similar diameter again. -![Cryptography](assets/crypto_1.png) +![Cryptography](crypto_1.png) *Image: Skytale taken from Wikimedia Commons (3.10.12)* A substitution cipher is a form of classical cipher whereby letters or groups of letters are systematically replaced throughout the message for other letters (or groups of letters). Substitution ciphers are divided into monoalphabetic and polyalphabetic substitutions. The Caesar Shift cipher is common example of amonoalphabetic substitution ciphers, where the letters in the alphabet are shifted in one direction or another. -![Cryptography](assets/crypto_2.png) +![Cryptography](crypto_2.png) *Image: Caesar Shift Cipher taken from Wikimedia Commons (3.10.12)* @@ -54,7 +55,7 @@ Polyalphabetic substitutions are more complex than substitution ciphers as they In the Vigenère cipher the corresponding numbers of the letters of message and key are summed up (with numbers exceeding the alphabet being dragged around the back) making the message so unreadable that it couldn't be deciphered for centuries (nowadays, with the help of computers, this obviously isn't true anymore). -![Cryptography](assets/crypto_3.png) +![Cryptography](crypto_3.png) *Image: Vigenère cipher taken from Wikimedia Commons (3.10.12)* From c7e2998ce80a248b5d30c70699eb4d6960214bfd Mon Sep 17 00:00:00 2001 From: Stan Clai Date: Sat, 4 Mar 2017 01:42:08 +0300 Subject: [PATCH 3/4] Additional cleanup during conversion to html --- src/convert_to_html.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/convert_to_html.sh b/src/convert_to_html.sh index 402c0f5..35226b9 100755 --- a/src/convert_to_html.sh +++ b/src/convert_to_html.sh @@ -35,6 +35,8 @@ for d in chapter*; do pandoc -s -S --toc -f markdown -t html --css=../handbook.css --title="CryptoParty handbook - $TITLE" -B $DIR/$d/$d.before -A $DIR/$d/$d.after $DIR/$d/$d.mdidx -o $DIR/$d/$d.html python extract_toc.py $DIR/$d/$d.html | sed "s/\"#/\"$d\/$d.html#/" >> $IDX rm -f $DIR/$d/$d.mdidx + rm -f $DIR/$d/$d.before + rm -f $DIR/$d/$d.after cp -au $d/*.png $d/*.jpg $DIR/$d 2>/dev/null done cp -au handbook.css $DIR/ From 10a92148d905a4115a2b4e0a6f206a85b40cefa4 Mon Sep 17 00:00:00 2001 From: Stan Clai Date: Sat, 4 Mar 2017 01:42:47 +0300 Subject: [PATCH 4/4] Commas added to contributors list In output files the list was formed as a solid stream of words, without line breaks. One solution is to add two spaces in the end of each line. It's the way to introduce line break when converting from md to other formats. Another solution is to put some punctuation, which is more visual for editing source md. I've chosen the latter. --- src/chapter_14_appendices/contributions.md | 169 +++++++++++---------- 1 file changed, 86 insertions(+), 83 deletions(-) diff --git a/src/chapter_14_appendices/contributions.md b/src/chapter_14_appendices/contributions.md index 48e14a4..d4fcd55 100644 --- a/src/chapter_14_appendices/contributions.md +++ b/src/chapter_14_appendices/contributions.md @@ -1,84 +1,87 @@ -0xcaca0 -Adam Hyde -Ahmed Mansour -Alice Miller -A Ravi -Ariel Viera -Asher Wolf -AT -Austin Martin -Ben Weissmann -Bernd Fix -Brendan Howell -Brian Newbold -Carola Hesse -Chris Pinchen -Dan Hassan -Daniel Kinsman -Danja Vasiliev -Dévai Nándor -djmattyg007 -Douwe Schmidt -Edward Cherlin -Elemar -Emile Denichaud -Emile den Tex -Erik Stein -Erinn Clark -Freddy Martinez -Freerk Ohling -Greg Broiles -Haneef Mubarak -helen varley jamieson -Janet Swisher -Jan Gerber -Jannette Mensch -Jens Kubieziel -jmorahan -Josh Datko -Joshua Datko -Julian Oliver -Kai Engert -Karen Reilly -l3lackEyedAngels -leoj3n -LiamO -Lonneke van der Velden -Malte -Malte Dik -Marta Peirano -Mart van Santen -mdimitrova -Michael Henriksen -Nart Villeneuve -Nathan Andrew Fain -Nathan Houle -Niels Elgaard Larsen -Petter Ericson -Piers -Plato -Punkbob -Roberto Rastapopoulos -Ronald Deibert -Ross Anderson -Sacha van Geffen -Sam Tennyson -Samuel Carlisle -Samuel L. Tennyson -Seth Schoen -Steven Murdoch -StooJ -Story89 -Ted W -Ted Wood -Teresa Dillon -therealplato -Tomas Krag -Tom Boyle -Travis Tueffel -Uwe Lippmann -WillMorrison -Ximin Luo -Yuval Adam -zandi +Contributors +============ + +0xcaca0, +Adam Hyde, +Ahmed Mansour, +Alice Miller, +A Ravi, +Ariel Viera, +Asher Wolf, +AT, +Austin Martin, +Ben Weissmann, +Bernd Fix, +Brendan Howell, +Brian Newbold, +Carola Hesse, +Chris Pinchen, +Dan Hassan, +Daniel Kinsman, +Danja Vasiliev, +Dévai Nándor, +djmattyg007, +Douwe Schmidt, +Edward Cherlin, +Elemar, +Emile Denichaud, +Emile den Tex, +Erik Stein, +Erinn Clark, +Freddy Martinez, +Freerk Ohling, +Greg Broiles, +Haneef Mubarak, +helen varley jamieson, +Janet Swisher, +Jan Gerber, +Jannette Mensch, +Jens Kubieziel, +jmorahan, +Josh Datko, +Joshua Datko, +Julian Oliver, +Kai Engert, +Karen Reilly, +l3lackEyedAngels, +leoj3n, +LiamO, +Lonneke van der Velden, +Malte, +Malte Dik, +Marta Peirano, +Mart van Santen, +mdimitrova, +Michael Henriksen, +Nart Villeneuve, +Nathan Andrew Fain, +Nathan Houle, +Niels Elgaard Larsen, +Petter Ericson, +Piers, +Plato, +Punkbob, +Roberto Rastapopoulos, +Ronald Deibert, +Ross Anderson, +Sacha van Geffen, +Sam Tennyson, +Samuel Carlisle, +Samuel L. Tennyson, +Seth Schoen, +Steven Murdoch, +StooJ, +Story89, +Ted W, +Ted Wood, +Teresa Dillon, +therealplato, +Tomas Krag, +Tom Boyle, +Travis Tueffel, +Uwe Lippmann, +WillMorrison, +Ximin Luo, +Yuval Adam, +zandi, Zorrino Zorrinno