From a2a6cced6d9c8c0da87a07181276befdce1a7e9a Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Wed, 24 Apr 2024 22:25:08 -0400 Subject: [PATCH] Update cipher properties --- .../combination/AdfgvxCipherController.java | 4 +- .../combination/AdfgxCipherController.java | 4 +- .../AffineCipherController.java | 4 +- .../AtbashCipherController.java | 4 +- .../AutokeyCipherController.java | 4 +- .../BaconianCipherController.java | 4 +- .../BaseXCipherController.java | 4 +- .../BeaufortCipherController.java | 4 +- .../CaesarCipherController.java | 4 +- .../OneTimePadCipherController.java | 4 +- .../PortaCipherController.java | 4 +- .../SubstitutionCipherController.java | 4 +- .../VigenereCipherController.java | 4 +- .../BifidCipherController.java | 4 +- .../ColumnarCipherController.java | 4 +- .../HillCipherController.java | 4 +- .../polysubstitution/MorseCodeController.java | 4 +- .../PlayfairCipherController.java | 4 +- .../PolybiusSquareController.java | 4 +- .../polysubstitution/RailFenceController.java | 4 +- .../TrifidCipherController.java | 4 +- src/main/resources/ciphers.properties | 341 +++++++++++------- 22 files changed, 253 insertions(+), 172 deletions(-) diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/combination/AdfgvxCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/combination/AdfgvxCipherController.java index 11c3dcd..4331b97 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/combination/AdfgvxCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/combination/AdfgvxCipherController.java @@ -30,9 +30,9 @@ public class AdfgvxCipherController{ private String adfgvxName; @Value("${cipher.combination.adfgvx.description}") private String adfgvxDescription; - @Value("${cipher.combination.adfgvx.explanation}") + @Value("#{${cipher.combination.adfgvx.explanation}}") private List adfgvxExplanation; - @Value("${cipher.combination.adfgvx.facts}") + @Value("#{${cipher.combination.adfgvx.facts}}") private List adfgvxFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/combination/AdfgxCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/combination/AdfgxCipherController.java index 4e30c48..2344ff7 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/combination/AdfgxCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/combination/AdfgxCipherController.java @@ -30,9 +30,9 @@ public class AdfgxCipherController{ private String adfgxName; @Value("${cipher.combination.adfgx.description}") private String adfgxDescription; - @Value("${cipher.combination.adfgx.explanation}") + @Value("#{${cipher.combination.adfgx.explanation}}") private List adfgxExplanation; - @Value("${cipher.combination.adfgx.facts}") + @Value("#{${cipher.combination.adfgx.facts}}") private List adfgxFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AffineCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AffineCipherController.java index 1c0653a..8541842 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AffineCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AffineCipherController.java @@ -30,9 +30,9 @@ public class AffineCipherController{ private String affineName; @Value("${cipher.mono.affine.description}") private String affineDescription; - @Value("${cipher.mono.affine.explanation}") + @Value("#{${cipher.mono.affine.explanation}}") private List affineExplanation; - @Value("${cipher.mono.affine.facts}") + @Value("#{${cipher.mono.affine.facts}}") private List affineFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AtbashCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AtbashCipherController.java index 0a015fa..70f6793 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AtbashCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AtbashCipherController.java @@ -30,9 +30,9 @@ public class AtbashCipherController{ private String atbashName; @Value("${cipher.mono.atbash.description}") private String atbashDescription; - @Value("${cipher.mono.atbash.explanation}") + @Value("#{${cipher.mono.atbash.explanation}}") private List atbashExplanation; - @Value("${cipher.mono.atbash.facts}") + @Value("#{${cipher.mono.atbash.facts}}") private List atbashFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AutokeyCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AutokeyCipherController.java index 1c84349..0666386 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AutokeyCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/AutokeyCipherController.java @@ -30,9 +30,9 @@ public class AutokeyCipherController{ private String autokeyName; @Value("${cipher.mono.autokey.description}") private String autokeyDescription; - @Value("${cipher.mono.autokey.explanation}") + @Value("#{${cipher.mono.autokey.explanation}}") private List autokeyExplanation; - @Value("${cipher.mono.autokey.facts}") + @Value("#{${cipher.mono.autokey.facts}}") private List autokeyFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BaconianCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BaconianCipherController.java index eb1aa2b..673b074 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BaconianCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BaconianCipherController.java @@ -30,9 +30,9 @@ public class BaconianCipherController{ private String baconianName; @Value("${cipher.mono.baconian.description}") private String baconianDescription; - @Value("${cipher.mono.baconian.explanation}") + @Value("#{${cipher.mono.baconian.explanation}}") private List baconianExplanation; - @Value("${cipher.mono.baconian.facts}") + @Value("#{${cipher.mono.baconian.facts}}") private List baconianFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BaseXCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BaseXCipherController.java index 4b3829a..c4bc372 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BaseXCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BaseXCipherController.java @@ -30,9 +30,9 @@ public class BaseXCipherController{ private String baseXName; @Value("${cipher.mono.basex.description}") private String baseXDescription; - @Value("${cipher.mono.baseX.explanation}") + @Value("#{${cipher.mono.basex.explanation}}") private List baseXExplanation; - @Value("${cipher.mono.baseX.facts}") + @Value("#{${cipher.mono.basex.facts}}") private List baseXFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BeaufortCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BeaufortCipherController.java index c6b5769..3798259 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BeaufortCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/BeaufortCipherController.java @@ -30,9 +30,9 @@ public class BeaufortCipherController{ private String beaufortName; @Value("${cipher.mono.beaufort.description}") private String beaufortDescription; - @Value("${cipher.mono.beaufort.explanation}") + @Value("#{${cipher.mono.beaufort.explanation}}") private List beaufortExplanation; - @Value("${cipher.mono.beaufort.facts}") + @Value("#{${cipher.mono.beaufort.facts}}") private List beaufortFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/CaesarCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/CaesarCipherController.java index 399d564..03f9b8e 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/CaesarCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/CaesarCipherController.java @@ -30,9 +30,9 @@ public class CaesarCipherController{ private String caesarName; @Value("${cipher.mono.caesar.description}") private String caesarDescription; - @Value("${cipher.mono.caesar.explanation}") + @Value("#{${cipher.mono.caesar.explanation}}") private List caesarExplanation; - @Value("${cipher.mono.caesar.facts}") + @Value("#{${cipher.mono.caesar.facts}}") private List caesarFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/OneTimePadCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/OneTimePadCipherController.java index 2314d0b..b537444 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/OneTimePadCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/OneTimePadCipherController.java @@ -30,9 +30,9 @@ public class OneTimePadCipherController{ private String oneTimePadName; @Value("${cipher.mono.onetimepad.description}") private String oneTimePadDescription; - @Value("${cipher.mono.oneTimePad.explanation}") + @Value("#{${cipher.mono.onetimepad.explanation}}") private List oneTimePadExplanation; - @Value("${cipher.mono.oneTimePad.facts}") + @Value("#{${cipher.mono.onetimepad.facts}}") private List oneTimePadFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/PortaCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/PortaCipherController.java index 28658a7..84fed88 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/PortaCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/PortaCipherController.java @@ -30,9 +30,9 @@ public class PortaCipherController{ private String portaName; @Value("${cipher.mono.porta.description}") private String portaDescription; - @Value("${cipher.mono.porta.explanation}") + @Value("#{${cipher.mono.porta.explanation}}") private List portaExplanation; - @Value("${cipher.mono.porta.facts}") + @Value("#{${cipher.mono.porta.facts}}") private List portaFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/SubstitutionCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/SubstitutionCipherController.java index def410e..b8f272f 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/SubstitutionCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/SubstitutionCipherController.java @@ -30,9 +30,9 @@ public class SubstitutionCipherController{ private String substitutionName; @Value("${cipher.mono.substitution.description}") private String substitutionDescription; - @Value("${cipher.mono.substitution.explanation}") + @Value("#{${cipher.mono.substitution.explanation}}") private List substitutionExplanation; - @Value("${cipher.mono.substitution.facts}") + @Value("#{${cipher.mono.substitution.facts}}") private List substitutionFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/VigenereCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/VigenereCipherController.java index 2cf7a1e..4d57729 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/VigenereCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/monosubstitution/VigenereCipherController.java @@ -30,9 +30,9 @@ public class VigenereCipherController{ private String vigenereName; @Value("${cipher.mono.vigenere.description}") private String vigenereDescription; - @Value("${cipher.mono.vigenere.explanation}") + @Value("#{${cipher.mono.vigenere.explanation}}") private List vigenereExplanation; - @Value("${cipher.mono.vigenere.facts}") + @Value("#{${cipher.mono.vigenere.facts}}") private List vigenereFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/BifidCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/BifidCipherController.java index 463fbba..4898500 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/BifidCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/BifidCipherController.java @@ -30,9 +30,9 @@ public class BifidCipherController{ private String bifidName; @Value("${cipher.poly.bifid.description}") private String bifidDescription; - @Value("${cipher.poly.bifid.explanation}") + @Value("#{${cipher.poly.bifid.explanation}}") private List bifidExplanation; - @Value("${cipher.poly.bifid.facts}") + @Value("#{${cipher.poly.bifid.facts}}") private List bifidFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/ColumnarCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/ColumnarCipherController.java index 57e79ee..82d6305 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/ColumnarCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/ColumnarCipherController.java @@ -30,9 +30,9 @@ public class ColumnarCipherController{ private String columnarName; @Value("${cipher.poly.columnar.description}") private String columnarDescription; - @Value("${cipher.poly.columnar.explanation}") + @Value("#{${cipher.poly.columnar.explanation}}") private List columnarExplanation; - @Value("${cipher.poly.columnar.facts}") + @Value("#{${cipher.poly.columnar.facts}}") private List columnarFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/HillCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/HillCipherController.java index 922d68e..2aa48ae 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/HillCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/HillCipherController.java @@ -32,9 +32,9 @@ public class HillCipherController{ private String hillName; @Value("${cipher.poly.hill.description}") private String hillDescription; - @Value("${cipher.poly.hill.explanation}") + @Value("#{${cipher.poly.hill.explanation}}") private List hillExplanation; - @Value("${cipher.poly.hill.facts}") + @Value("#{${cipher.poly.hill.facts}}") private List hillFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/MorseCodeController.java b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/MorseCodeController.java index fbeeec3..6defdfd 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/MorseCodeController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/MorseCodeController.java @@ -30,9 +30,9 @@ public class MorseCodeController{ private String morseName; @Value("${cipher.poly.morse.description}") private String morseDescription; - @Value("${cipher.poly.morse.explanation}") + @Value("#{${cipher.poly.morse.explanation}}") private List morseExplanation; - @Value("${cipher.poly.morse.facts}") + @Value("#{${cipher.poly.morse.facts}}") private List morseFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/PlayfairCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/PlayfairCipherController.java index e53ddae..b204cae 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/PlayfairCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/PlayfairCipherController.java @@ -30,9 +30,9 @@ public class PlayfairCipherController{ private String playfairName; @Value("${cipher.poly.playfair.description}") private String playfairDescription; - @Value("${cipher.poly.playfair.explanation}") + @Value("#{${cipher.poly.playfair.explanation}}") private List playfairExplanation; - @Value("${cipher.poly.playfair.facts}") + @Value("#{${cipher.poly.playfair.facts}}") private List playfairFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/PolybiusSquareController.java b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/PolybiusSquareController.java index 60c5819..3a28e67 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/PolybiusSquareController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/PolybiusSquareController.java @@ -30,9 +30,9 @@ public class PolybiusSquareController{ private String polybiusName; @Value("${cipher.poly.polybius.description}") private String polybiusDescription; - @Value("${cipher.poly.polybius.explanation}") + @Value("#{${cipher.poly.polybius.explanation}}") private List polybiusExplanation; - @Value("${cipher.poly.polybius.facts}") + @Value("#{${cipher.poly.polybius.facts}}") private List polybiusFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/RailFenceController.java b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/RailFenceController.java index 2e12101..92ea539 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/RailFenceController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/RailFenceController.java @@ -30,9 +30,9 @@ public class RailFenceController{ private String railFenceName; @Value("${cipher.poly.railfence.description}") private String railFenceDescription; - @Value("${cipher.poly.railfence.explanation}") + @Value("#{${cipher.poly.railfence.explanation}}") private List railFenceExplanation; - @Value("${cipher.poly.railfence.facts}") + @Value("#{${cipher.poly.railfence.facts}}") private List railFenceFacts; diff --git a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/TrifidCipherController.java b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/TrifidCipherController.java index a4673b0..8bbf996 100644 --- a/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/TrifidCipherController.java +++ b/src/main/java/com/mattrixwv/cipherstream/controller/polysubstitution/TrifidCipherController.java @@ -30,9 +30,9 @@ public class TrifidCipherController{ private String trifidName; @Value("${cipher.poly.trifid.description}") private String trifidDescription; - @Value("${cipher.poly.trifid.explanation}") + @Value("#{${cipher.poly.trifid.explanation}}") private List trifidExplanation; - @Value("${cipher.poly.trifid.facts}") + @Value("#{${cipher.poly.trifid.facts}}") private List trifidFacts; diff --git a/src/main/resources/ciphers.properties b/src/main/resources/ciphers.properties index d85886a..b1600c6 100644 --- a/src/main/resources/ciphers.properties +++ b/src/main/resources/ciphers.properties @@ -2,218 +2,299 @@ #Affine cipher.mono.affine.name=Affine cipher.mono.affine.description= -cipher.mono.affine.explanation=The Affine cipher is a monoalphabetic substitution cipher, where each letter in an alphabet is mapped to a numeric equivalent, encrypted, and then converted back to a letter. \ -The formula used in this encryption is F(x) = (ax + b) % m, where x is the original letter, a and b are the keys of the cipher, and m is the length of the alphabet, with a and m being coprime.\ -Decryption is performed using the formula F(x) = a^-1(x - b) % m.\ -The Affine cipher is a relatively weak cipher compared to modern encryption methods because it's vulnerable to frequency analysis and other cryptanalysis techniques. However, it's simple to implement and understand, making it a good introduction to encryption concepts. -cipher.mono.affine.facts= +cipher.mono.affine.explanation={\ + "The Affine cipher is a monoalphabetic substitution cipher, where each letter in an alphabet is mapped to a numeric equivalent, encrypted, and then converted back to a letter.",\ + "The formula used in this encryption is F(x) = (ax + b) % m, where x is the original letter, a and b are the keys of the cipher, and m is the length of the alphabet, with a and m being coprime.",\ + "Decryption is performed using the formula F(x) = a^-1(x - b) % m.",\ + "The Affine cipher is a relatively weak cipher compared to modern encryption methods because it's vulnerable to frequency analysis and other cryptanalysis techniques. However, it's simple to implement and understand, making it a good introduction to encryption concepts."\ + } +cipher.mono.affine.facts={\ + "This isn't, a test",\ + "This isn't, test #2"\ + } #Atbash cipher.mono.atbash.name=Atbash cipher.mono.atbash.description= -cipher.mono.atbash.explanation=The Atbash cipher is a monoalphabetic substitution cipher and is one of the simplest and oldest forms of encryption. \ -Encryption involves replacing each letter with its reverse counterpart. i.e. A becomes Z, B becomes Y, etc. \ -Decryption is performed using the same formula as encryption. \ -Atbash cipher can effectively obscure the meaning of a message to those unfamiliar with the technique. However, it's very vulnerable to cryptanalysis, especially frequency analysis, and it provides very little security against modern decryption techniques. -cipher.mono.atbash.facts=Atbash gets its name from a technique using the Hebrew alphabet, where the first letter "Aleph" is replaced with the last latter "Tav", "Bet" is replaced with "shin", etc. \ -The Atbash cipher is a special case of the Affine cipher with a = 25 and b = 25. +cipher.mono.atbash.explanation={\ + "The Atbash cipher is a monoalphabetic substitution cipher and is one of the simplest and oldest forms of encryption.",\ + "Encryption involves replacing each letter with its reverse counterpart. i.e. A becomes Z, B becomes Y, etc.",\ + "Decryption is performed using the same formula as encryption.",\ + "Atbash cipher can effectively obscure the meaning of a message to those unfamiliar with the technique. However, it's very vulnerable to cryptanalysis, especially frequency analysis, and it provides very little security against modern decryption techniques."\ + } +cipher.mono.atbash.facts={\ + "Atbash gets its name from a technique using the Hebrew alphabet, where the first letter 'Aleph' is replaced with the last latter 'Tav', 'Bet' is replaced with 'shin', etc.",\ + "The Atbash cipher is a special case of the Affine cipher with a = 25 and b = 25."\ + } #Autokey cipher.mono.autokey.name=Autokey cipher.mono.autokey.description= -cipher.mono.autokey.explanation=The autokey cipher extends the Vigenere cipher. Like the Vigenere cipher it uses a keyword to encrypt plaintext, but it also incorporates the plaintext itself into the keystream. \ -Encryption works by concatenating the message to the keyword. Then you convert the resulting key into a series of numeric values mod 26. Then you advance each letter the indicated number of letters similar to the Caesar cipher. \ -Decryption works by converting the key the same as encryption, but instead of advancing each letter the given amount the values retreat. As each letter is decrypted the letter needs added to the key as well as the output so that decryption can continue. \ -The Autokey cipher is more secure than the Vigenere cipher due to the keyword including part of the text to be encoded. However, like the Vigenere cipher, the Autokey cipher is vulnerable to frequency analysis and other cryptanalysis techniques, especially if the keyword is short or if there are patterns in the plaintext. -cipher.mono.autokey.facts= +cipher.mono.autokey.explanation={\ + "The autokey cipher extends the Vigenere cipher. Like the Vigenere cipher it uses a keyword to encrypt plaintext, but it also incorporates the plaintext itself into the keystream.",\ + "Encryption works by concatenating the message to the keyword. Then you convert the resulting key into a series of numeric values mod 26. Then you advance each letter the indicated number of letters similar to the Caesar cipher.",\ + "Decryption works by converting the key the same as encryption, but instead of advancing each letter the given amount the values retreat. As each letter is decrypted the letter needs added to the key as well as the output so that decryption can continue.",\ + "The Autokey cipher is more secure than the Vigenere cipher due to the keyword including part of the text to be encoded. However, like the Vigenere cipher, the Autokey cipher is vulnerable to frequency analysis and other cryptanalysis techniques, especially if the keyword is short or if there are patterns in the plaintext."\ + } +cipher.mono.autokey.facts={\ + } #Baconian cipher.mono.baconian.name=Baconian cipher.mono.baconian.description= -cipher.mono.baconian.explanation=The Baconian cipher, also known as the Baconian alphabet or Bacon's cipher, is a type of substitution cipher used for encoding and decoding messages. \ -In the Baconian cipher, each letter of the alphabet is replaced by a sequence of five characters, consisting of 'A' and 'B'. \ -These characters represent the binary encoding of the letter, where 'A' stands for one binary digit (usually 0) and 'B' stands for the other binary digit (usually 1). \ -During encoding I and J are generally encoded as the same letter. \ -To encode a message using the Baconian cipher, each letter of the plaintext is replaced by its corresponding binary sequence according to the table above. Spaces and punctuation are typically ignored. \ -The Baconian cipher is relatively easy to encode and decode, especially with the aid of a table or key. However, it provides only limited security against modern cryptanalysis techniques and is mainly of historical interest. -cipher.mono.baconian.facts=It was developed by Sir Francis Bacon in the late 16th century. +cipher.mono.baconian.explanation={\ + "The Baconian cipher, also known as the Baconian alphabet or Bacon's cipher, is a type of substitution cipher used for encoding and decoding messages.",\ + "In the Baconian cipher, each letter of the alphabet is replaced by a sequence of five characters, consisting of 'A' and 'B'.",\ + "These characters represent the binary encoding of the letter, where 'A' stands for one binary digit (usually 0) and 'B' stands for the other binary digit (usually 1).",\ + "During encoding I and J are generally encoded as the same letter.",\ + "To encode a message using the Baconian cipher, each letter of the plaintext is replaced by its corresponding binary sequence according to the table above. Spaces and punctuation are typically ignored.",\ + "The Baconian cipher is relatively easy to encode and decode, especially with the aid of a table or key. However, it provides only limited security against modern cryptanalysis techniques and is mainly of historical interest."\ + } +cipher.mono.baconian.facts={\ + "It was developed by Sir Francis Bacon in the late 16th century."\ + } #TODO #Base X cipher.mono.basex.name=Base X cipher.mono.basex.description= -cipher.mono.basex.explanation=Base X is an abstraction for Base 2, Base 16, etc. Base X uses the integer values for each character and displays them in the desired base. -cipher.mono.basex.facts= +cipher.mono.basex.explanation={\ + "Base X is an abstraction for Base 2, Base 16, etc. Base X uses the integer values for each character and displays them in the desired base."\ + } +cipher.mono.basex.facts={\ + } #Beaufort cipher.mono.beaufort.name=Beaufort cipher.mono.beaufort.description= -cipher.mono.beaufort.explanation=The Beaufort cipher is a type of substitution cipher similar to the Vigenere cipher but with a different method of encryption. \ -In the Beaufort cipher, encryption and decryption are performed by using a keyword to determine the amount of backward displacement within the alphabet for each letter of the text, unlike the Vigenere cipher, where the key is added. \ -The Beaufort cipher, like the Vigenere cipher, is vulnerable to frequency analysis and other cryptanalysis techniques, especially if the keyword is short or if there are patterns in the plaintext. \ -However, it provides some variation in encryption compared to the Vigenere cipher, which may offer slightly different cryptographic properties. -cipher.mono.beaufort.facts=It was named after Sir Francis Beaufort, an Irish hydrographer, and admiral. +cipher.mono.beaufort.explanation={\ + "The Beaufort cipher is a type of substitution cipher similar to the Vigenere cipher but with a different method of encryption.",\ + "In the Beaufort cipher, encryption and decryption are performed by using a keyword to determine the amount of backward displacement within the alphabet for each letter of the text, unlike the Vigenere cipher, where the key is added.",\ + "The Beaufort cipher, like the Vigenere cipher, is vulnerable to frequency analysis and other cryptanalysis techniques, especially if the keyword is short or if there are patterns in the plaintext.",\ + "However, it provides some variation in encryption compared to the Vigenere cipher, which may offer slightly different cryptographic properties."\ + } +cipher.mono.beaufort.facts={\ + "It was named after Sir Francis Beaufort, an Irish hydrographer, and admiral."\ + } #Caesar cipher.mono.caesar.name=Caesar cipher.mono.caesar.description= -cipher.mono.caesar.explanation=The Caesar cipher is one of the simplest and most widely known encryption techniques. It's a type of substitution cipher where each letter in the plaintext is shifted a certain number of places down or up the alphabet. \ -For encryption a shift value is used which determines how many letters forward each letter in the text should be shifted. \ -Decryption uses the same shift, but shifts each letter down rather than up. \ -The Caesar cipher is a special case of the substitution cipher with a fixed shift. While it's straightforward to implement and understand, it's also highly vulnerable to cryptanalysis, especially through frequency analysis. \ -With only 25 possible keys, it's easily broken by trying all possible shifts. Despite its simplicity, it's still sometimes used as a part of more complex encryption algorithms or for educational purposes. -cipher.mono.caesar.facts=The Caesar cipher, named after Julius Caesar who is said to have used it for communication. +cipher.mono.caesar.explanation={\ + "The Caesar cipher is one of the simplest and most widely known encryption techniques. It's a type of substitution cipher where each letter in the plaintext is shifted a certain number of places down or up the alphabet.",\ + "For encryption a shift value is used which determines how many letters forward each letter in the text should be shifted.",\ + "Decryption uses the same shift, but shifts each letter down rather than up.",\ + "The Caesar cipher is a special case of the substitution cipher with a fixed shift. While it's straightforward to implement and understand, it's also highly vulnerable to cryptanalysis, especially through frequency analysis.",\ + "With only 25 possible keys, it's easily broken by trying all possible shifts. Despite its simplicity, it's still sometimes used as a part of more complex encryption algorithms or for educational purposes."\ + } +cipher.mono.caesar.facts={\ + "The Caesar cipher, named after Julius Caesar who is said to have used it for communication."\ + } #One-Time Pad cipher.mono.onetimepad.name=One-Time Pad cipher.mono.onetimepad.description= -cipher.mono.onetimepad.explanation=A One-Time Pad cipher is a type of encryption technique that provides perfect secrecy when used correctly. The essence of a One-Time Pad cipher lies in the use of a randomly generated key that is at least as long as the message being encrypted. \ -The key is never reused and is kept completely secret between the sender and the recipient. Each character of the plaintext message is combined with the corresponding bit or character of the key using a the same shift as the Caesar cipher. \ -In a slightly less secure, but more practical key selection, the passage of a book can also be used. Preferably one with a good mix of many characters that would make frequency analysis more difficult. \ -When these principles are followed, the One-Time Pad provides perfect secrecy, meaning that the ciphertext reveals no information about the plaintext, even when the attacker has unlimited computational power. However, achieving and maintaining these conditions in practice can be extremely challenging, which limits the practical use of the One-Time Pad cipher. -cipher.mono.onetimepad.facts=It was invented independently by Gilbert Vernam in 1917 and later rediscovered by Joseph Mauborgne and patented by both in 1919. +cipher.mono.onetimepad.explanation={\ + "A One-Time Pad cipher is a type of encryption technique that provides perfect secrecy when used correctly. The essence of a One-Time Pad cipher lies in the use of a randomly generated key that is at least as long as the message being encrypted.",\ + "The key is never reused and is kept completely secret between the sender and the recipient. Each character of the plaintext message is combined with the corresponding bit or character of the key using a the same shift as the Caesar cipher.",\ + "In a slightly less secure, but more practical key selection, the passage of a book can also be used. Preferably one with a good mix of many characters that would make frequency analysis more difficult.",\ + "When these principles are followed, the One-Time Pad provides perfect secrecy, meaning that the ciphertext reveals no information about the plaintext, even when the attacker has unlimited computational power. However, achieving and maintaining these conditions in practice can be extremely challenging, which limits the practical use of the One-Time Pad cipher."\ + } +cipher.mono.onetimepad.facts={\ + "It was invented independently by Gilbert Vernam in 1917 and later rediscovered by Joseph Mauborgne and patented by both in 1919."\ + } #Porta cipher.mono.porta.name=Porta cipher.mono.porta.description= -cipher.mono.porta.explanation=The Porta cipher, also known as the Porta square or Portax cipher, is a variant of the Vigenere cipher and shares some similarities with it. \ -In the Porta cipher, encryption and decryption are performed using a keyword and a tabula recta or Porta square. The Porta square is a table that consists of 26 rows and 26 columns, where each row represents the alphabet shifted by a certain number of positions. \ -The Porta square is constructed by shifting the letters of the alphabet by an amount determined by the keyword. \ -Each row of the square represents a different shift of the alphabet, with the first row being shifted by 0 positions, the second row by 1 position, the third row by 2 positions, and so on until the last row, which is shifted by 25 positions. \ -The Porta cipher provides stronger encryption than simple substitution ciphers. However, it is still susceptible to frequency analysis and other cryptanalysis techniques. -cipher.mono.porta.facts=It was invented by Giovanni Battista della Porta in the 16th century. +cipher.mono.porta.explanation={\ + "The Porta cipher, also known as the Porta square or Portax cipher, is a variant of the Vigenere cipher and shares some similarities with it.",\ + "In the Porta cipher, encryption and decryption are performed using a keyword and a tabula recta or Porta square. The Porta square is a table that consists of 26 rows and 26 columns, where each row represents the alphabet shifted by a certain number of positions.",\ + "The Porta square is constructed by shifting the letters of the alphabet by an amount determined by the keyword.",\ + "Each row of the square represents a different shift of the alphabet, with the first row being shifted by 0 positions, the second row by 1 position, the third row by 2 positions, and so on until the last row, which is shifted by 25 positions.",\ + "The Porta cipher provides stronger encryption than simple substitution ciphers. However, it is still susceptible to frequency analysis and other cryptanalysis techniques."\ + } +cipher.mono.porta.facts={\ + "It was invented by Giovanni Battista della Porta in the 16th century."\ + } #Substitution cipher.mono.substitution.name=Substitution cipher.mono.substitution.description= -cipher.mono.substitution.explanation=A substitution cipher is a method of encryption where each letter in the plaintext is replaced by another letter or symbol according to a predetermined set of rules. In other words, it substitutes each plaintext character with another character. \ -Substitution ciphers are among the simplest forms of encryption and have been used throughout history for secret communication. \ -However, they are generally less secure compared to modern encryption techniques and are vulnerable to various cryptanalysis methods, such as frequency analysis, which exploits patterns in the ciphertext to reveal information about the plaintext. \ -Despite their vulnerabilities, substitution ciphers are often used in educational settings to introduce basic concepts of cryptography. -cipher.mono.substitution.facts= +cipher.mono.substitution.explanation={\ + "A substitution cipher is a method of encryption where each letter in the plaintext is replaced by another letter or symbol according to a predetermined set of rules. In other words, it substitutes each plaintext character with another character.",\ + "Substitution ciphers are among the simplest forms of encryption and have been used throughout history for secret communication.",\ + "However, they are generally less secure compared to modern encryption techniques and are vulnerable to various cryptanalysis methods, such as frequency analysis, which exploits patterns in the ciphertext to reveal information about the plaintext.",\ + "Despite their vulnerabilities, substitution ciphers are often used in educational settings to introduce basic concepts of cryptography."\ + } +cipher.mono.substitution.facts={\ + } #Vigenere cipher.mono.vigenere.name=Vigenere cipher.mono.vigenere.description= -cipher.mono.vigenere.explanation=The Vigenere cipher adds more security compared to simple monoalphabetic substitution ciphers like the Caesar cipher. \ -In the Vigenere cipher, encryption and decryption are performed using a keyword or keyphrase. The key is used to determine the shift applied to each letter in the plaintext, with different parts of the key determining different shifts. \ -Decryption is performed by applying the reverse process. Given the ciphertext and the keyword, the original plaintext can be recovered. \ The Vigenere cipher provides stronger encryption compared to simple substitution ciphers because it uses multiple Caesar ciphers in a repeating pattern determined by the keyword. \ -However, it is still vulnerable to frequency analysis and other cryptanalysis techniques, especially if the keyword is short or if there are patterns in the plaintext. \Despite its vulnerabilities, the Vigenere cipher was considered unbreakable for centuries and was widely used for secure communication. -cipher.mono.vigenere.facts=It was invented by Giovan Battista Bellaso in the 16th century and later misattributed to Blaise de Vigenere, hence the name. +cipher.mono.vigenere.explanation={\ + "The Vigenere cipher adds more security compared to simple monoalphabetic substitution ciphers like the Caesar cipher.",\ + "In the Vigenere cipher, encryption and decryption are performed using a keyword or keyphrase. The key is used to determine the shift applied to each letter in the plaintext, with different parts of the key determining different shifts.",\ + "Decryption is performed by applying the reverse process. Given the ciphertext and the keyword, the original plaintext can be recovered.",\ + "The Vigenere cipher provides stronger encryption compared to simple substitution ciphers because it uses multiple Caesar ciphers in a repeating pattern determined by the keyword.",\ + "However, it is still vulnerable to frequency analysis and other cryptanalysis techniques, especially if the keyword is short or if there are patterns in the plaintext.",\ + "Despite its vulnerabilities, the Vigenere cipher was considered unbreakable for centuries and was widely used for secure communication."\ + } +cipher.mono.vigenere.facts={\ + "It was invented by Giovan Battista Bellaso in the 16th century and later misattributed to Blaise de Vigenere, hence the name."\ + } #Poly-Substitution #Bifid cipher.poly.bifid.name=Bifid cipher.poly.bifid.description= -cipher.poly.bifid.explanation=The Bifid cipher is a type of polyalphabetic substitution cipher that combines elements of both transposition and substitution. \ -It was invented by Felix Delastelle in 1901 and was considered one of the strongest ciphers at the time due to its complexity. \ -Encryption is done by creating a 5x5 grid, known as the Polybius square, is created. The letters of the alphabet (excluding 'J' in most cases) are arranged in the grid, typically starting with 'A' and ending with 'Z', omitting 'J'. \ -Each letter of the plaintext is first converted into its corresponding row and column numbers in the grid. For example, the letter 'C' may correspond to the row 1, column 3. These numerical representations are then combined into pairs of numbers. \ -The pairs of numbers are then arranged into a single line of digits. For example, if the plaintext is "HELLO", and the corresponding pairs of numbers are (1,3), (4,1), (2,4), (2,4), and (4,2), then the resulting line of digits would be "134142442". \ -The resulting line of digits is then transposed using a keyword or keyphrase. This typically involves writing the digits into a grid of a certain width determined by the length of the keyword, and then reading the columns of the grid in the order specified by the keyword. \ -The transposed digits are then converted back into pairs of row and column numbers, which correspond to the letters in the Polybius square. The resulting pairs of numbers are then used to retrieve the ciphertext letters from the grid. \ -The Bifid cipher provides a higher level of security compared to simple substitution ciphers due to its combination of fractionation and transposition. However, it can still be susceptible to cryptanalysis, especially if the keyword is short or if there are patterns in the plaintext. \ -Overall, the Bifid cipher is a historically significant encryption technique that demonstrates the use of both fractionation and transposition in cryptography. -cipher.poly.bifid.facts= +cipher.poly.bifid.explanation={\ + "The Bifid cipher is a type of polyalphabetic substitution cipher that combines elements of both transposition and substitution.",\ + "It was invented by Felix Delastelle in 1901 and was considered one of the strongest ciphers at the time due to its complexity.",\ + "Encryption is done by creating a 5x5 grid, known as the Polybius square, is created. The letters of the alphabet (excluding 'J' in most cases) are arranged in the grid, typically starting with 'A' and ending with 'Z', omitting 'J'.",\ + "Each letter of the plaintext is first converted into its corresponding row and column numbers in the grid. For example, the letter 'C' may correspond to the row 1, column 3. These numerical representations are then combined into pairs of numbers.",\ + "The pairs of numbers are then arranged into a single line of digits. For example, if the plaintext is 'HELLO', and the corresponding pairs of numbers are (1,3), (4,1), (2,4), (2,4), and (4,2), then the resulting line of digits would be '134142442'.",\ + "The resulting line of digits is then transposed using a keyword or keyphrase. This typically involves writing the digits into a grid of a certain width determined by the length of the keyword, and then reading the columns of the grid in the order specified by the keyword.",\ + "The transposed digits are then converted back into pairs of row and column numbers, which correspond to the letters in the Polybius square. The resulting pairs of numbers are then used to retrieve the ciphertext letters from the grid.",\ + "The Bifid cipher provides a higher level of security compared to simple substitution ciphers due to its combination of fractionation and transposition. However, it can still be susceptible to cryptanalysis, especially if the keyword is short or if there are patterns in the plaintext.",\ + "Overall, the Bifid cipher is a historically significant encryption technique that demonstrates the use of both fractionation and transposition in cryptography."\ + } +cipher.poly.bifid.facts={\ + } #Columnar cipher.poly.columnar.name=Columnar cipher.poly.columnar.description= -cipher.poly.columnar.explanation=The Columnar cipher, also known as the Columnar Transposition cipher, is a type of transposition cipher where the characters of the plaintext are rearranged according to a specific method based on the columns of a grid. \ -Start by writing the plaintext message into a grid, row by row, with a fixed number of columns. The number of columns is determined by the key, which is a word or a sequence of letters chosen by the sender. \ -Arrange the columns of the grid in alphabetical order based on the letters of the key. For example, if the key is "KEYWORD", arrange the columns of the grid in the order of the letters in "KEYWORD". \ -Read the ciphertext from the grid by going column by column, starting with the column that corresponds to the first letter of the key, then the second letter of the key, and so on, until all columns have been read. \ -The Columnar cipher is relatively simple to implement and understand, and it provides a moderate level of security against casual attempts to decrypt it. However, it is vulnerable to more sophisticated cryptanalysis methods, especially if the key is short or if there are patterns in the plaintext. -cipher.poly.columnar.facts= +cipher.poly.columnar.explanation={\ + "The Columnar cipher, also known as the Columnar Transposition cipher, is a type of transposition cipher where the characters of the plaintext are rearranged according to a specific method based on the columns of a grid.",\ + "Start by writing the plaintext message into a grid, row by row, with a fixed number of columns. The number of columns is determined by the key, which is a word or a sequence of letters chosen by the sender.",\ + "Arrange the columns of the grid in alphabetical order based on the letters of the key. For example, if the key is 'KEYWORD', arrange the columns of the grid in the order of the letters in 'KEYWORD'.",\ + "Read the ciphertext from the grid by going column by column, starting with the column that corresponds to the first letter of the key, then the second letter of the key, and so on, until all columns have been read.",\ + "The Columnar cipher is relatively simple to implement and understand, and it provides a moderate level of security against casual attempts to decrypt it. However, it is vulnerable to more sophisticated cryptanalysis methods, especially if the key is short or if there are patterns in the plaintext."\ + } +cipher.poly.columnar.facts={\ + } #Hill cipher.poly.hill.name=Hill cipher.poly.hill.description= -cipher.poly.hill.explanation=The Hill cipher is a type of polygraphic substitution cipher based on linear algebra and is one of the earliest known examples of a block cipher. The Hill cipher operates on blocks of plaintext letters and uses matrix multiplication to encrypt and decrypt messages. \ -The encryption key in the Hill cipher is a square matrix called the encryption matrix. The size of the matrix (i.e., the number of rows and columns) depends on the key length and the block size of the plaintext. The determinant of the encryption matrix must be relatively prime to the size of the alphabet used (typically 26 for English text) to ensure that the encryption matrix is invertible. \ -To encrypt a message, the plaintext is divided into blocks of letters, each block matching the size of the encryption matrix. Each block is then represented as a column vector, with each element of the vector representing the numerical value of a letter in the plaintext. The encryption matrix is multiplied by each column vector of plaintext letters modulo the size of the alphabet. The resulting matrix of encrypted numerical values is then converted back into ciphertext letters. \ -Decryption is performed by multiplying the ciphertext column vectors by the inverse of the encryption matrix modulo the size of the alphabet. The resulting numerical values are converted back into plaintext letters. \ -The Hill cipher offers a higher level of security compared to simple substitution ciphers because it operates on blocks of letters rather than individual letters, making it resistant to frequency analysis. However, it is vulnerable to known plaintext attacks if the attacker can obtain enough ciphertext and corresponding plaintext pairs to deduce the encryption matrix. \ -One limitation of the Hill cipher is that it requires the plaintext to be divided into blocks of fixed length, which can result in padding if the plaintext length is not a multiple of the block size. Additionally, the size of the encryption matrix and the choice of plaintext block size can impact the complexity and security of the cipher. -cipher.poly.hill.facts=It was invented by Lester S. Hill in 1929. +cipher.poly.hill.explanation={\ + "The Hill cipher is a type of polygraphic substitution cipher based on linear algebra and is one of the earliest known examples of a block cipher. The Hill cipher operates on blocks of plaintext letters and uses matrix multiplication to encrypt and decrypt messages.",\ + "The encryption key in the Hill cipher is a square matrix called the encryption matrix. The size of the matrix (i.e., the number of rows and columns) depends on the key length and the block size of the plaintext. The determinant of the encryption matrix must be relatively prime to the size of the alphabet used (typically 26 for English text) to ensure that the encryption matrix is invertible.",\ + "To encrypt a message, the plaintext is divided into blocks of letters, each block matching the size of the encryption matrix. Each block is then represented as a column vector, with each element of the vector representing the numerical value of a letter in the plaintext. The encryption matrix is multiplied by each column vector of plaintext letters modulo the size of the alphabet. The resulting matrix of encrypted numerical values is then converted back into ciphertext letters.",\ + "Decryption is performed by multiplying the ciphertext column vectors by the inverse of the encryption matrix modulo the size of the alphabet. The resulting numerical values are converted back into plaintext letters.",\ + "The Hill cipher offers a higher level of security compared to simple substitution ciphers because it operates on blocks of letters rather than individual letters, making it resistant to frequency analysis. However, it is vulnerable to known plaintext attacks if the attacker can obtain enough ciphertext and corresponding plaintext pairs to deduce the encryption matrix.",\ + "One limitation of the Hill cipher is that it requires the plaintext to be divided into blocks of fixed length, which can result in padding if the plaintext length is not a multiple of the block size. Additionally, the size of the encryption matrix and the choice of plaintext block size can impact the complexity and security of the cipher."\ + } +cipher.poly.hill.facts={\ + "It was invented by Lester S. Hill in 1929."\ + } #Morse cipher.poly.morse.name=Morse Code cipher.poly.morse.description= -cipher.poly.morse.explanation=Morse code is a method of transmitting text information as a series of on-off tones, lights, or clicks. Morse code encodes characters (letters, numbers, and punctuation) as sequences of dots (short signals) and dashes (long signals) arranged in specific patterns. \ -The basic elemens of Morse Code are dots and dashes. Each letter, number, or punctuation mark is represented by a unique combination of dots and dashes. Numbers and punctuation marks also have their own Morse code representations. \ -Morse code has been widely used in various forms of communication, including telegraphy, radio communication, aviation, and navigation. Despite advances in technology, Morse code remains relevant today, particularly in emergency communication, amateur radio, and certain military applications. It is also used by some individuals for its simplicity and effectiveness in situations where other forms of communication may be unreliable or unavailable. -cipher.poly.morse.facts=It was developed in the early 19th century by Samuel Morse and Alfred Vail as a means of long-distance communication using telegraphy. +cipher.poly.morse.explanation={\ + "Morse code is a method of transmitting text information as a series of on-off tones, lights, or clicks. Morse code encodes characters (letters, numbers, and punctuation) as sequences of dots (short signals) and dashes (long signals) arranged in specific patterns.",\ + "The basic elemens of Morse Code are dots and dashes. Each letter, number, or punctuation mark is represented by a unique combination of dots and dashes. Numbers and punctuation marks also have their own Morse code representations.",\ + "Morse code has been widely used in various forms of communication, including telegraphy, radio communication, aviation, and navigation. Despite advances in technology, Morse code remains relevant today, particularly in emergency communication, amateur radio, and certain military applications. It is also used by some individuals for its simplicity and effectiveness in situations where other forms of communication may be unreliable or unavailable."\ + } +cipher.poly.morse.facts={\ + "It was developed in the early 19th century by Samuel Morse and Alfred Vail as a means of long-distance communication using telegraphy."\ + } #Playfair cipher.poly.playfair.name=Playfair cipher.poly.playfair.description= -cipher.poly.playfair.explanation=The Playfair cipher is a type of digraph substitution cipher. It was used for secure communication in the early days of telegraphy. \ -To encode start with a 5x5 grid, known as the Playfair square. The letters of the alphabet (usually excluding 'J', which is combined with 'I') are written into the grid in order, omitting any duplicates. Choose a keyword or keyphrase and use it to fill in the rest of the grid, omitting any duplicate letters. \ -To encrypt a message, split the plaintext into pairs of letters (digraphs). If the pair consists of two identical letters, insert a filler letter (often 'X') between them. For each digraph, apply the following rules:\n\ -If both letters are in the same row of the grid, replace each letter with the letter to its right (wrapping around to the beginning of the row if necessary).\n\ -If both letters are in the same column, replace each letter with the letter below it (wrapping around to the top of the column if necessary).\n\ -If the letters form a rectangle, replace them with the letters on the same row, but in the column of the other letter.\n\ -To decrypt a message, the reverse of the encryption process is performed. Each digraph is replaced by the letters that are in the same row, column, or rectangle in the Playfair square. \ -The Playfair cipher provides a higher level of security compared to simple substitution ciphers because it operates on pairs of letters rather than individual letters. However, it is still vulnerable to cryptanalysis, especially if the key is short or if there are patterns in the plaintext. \ -Overall, the Playfair cipher is a historically significant encryption technique that demonstrates the use of digraph substitution in cryptography. -cipher.poly.playfair.facts=It was invented by Charles Wheatstone and popularized by Lyon Playfair in the 19th century. +cipher.poly.playfair.explanation={\ + "The Playfair cipher is a type of digraph substitution cipher. It was used for secure communication in the early days of telegraphy.",\ + "To encode start with a 5x5 grid, known as the Playfair square. The letters of the alphabet (usually excluding 'J', which is combined with 'I') are written into the grid in order, omitting any duplicates. Choose a keyword or keyphrase and use it to fill in the rest of the grid, omitting any duplicate letters.",\ + "To encrypt a message, split the plaintext into pairs of letters (digraphs). If the pair consists of two identical letters, insert a filler letter (often 'X') between them. For each digraph, apply the following rules:",\ + "If both letters are in the same row of the grid, replace each letter with the letter to its right (wrapping around to the beginning of the row if necessary).",\ + "If both letters are in the same column, replace each letter with the letter below it (wrapping around to the top of the column if necessary).",\ + "If the letters form a rectangle, replace them with the letters on the same row, but in the column of the other letter.",\ + "To decrypt a message, the reverse of the encryption process is performed. Each digraph is replaced by the letters that are in the same row, column, or rectangle in the Playfair square.",\ + "The Playfair cipher provides a higher level of security compared to simple substitution ciphers because it operates on pairs of letters rather than individual letters. However, it is still vulnerable to cryptanalysis, especially if the key is short or if there are patterns in the plaintext.",\ + "Overall, the Playfair cipher is a historically significant encryption technique that demonstrates the use of digraph substitution in cryptography."\ + } +cipher.poly.playfair.facts={\ + "It was invented by Charles Wheatstone and popularized by Lyon Playfair in the 19th century."\ + } #Polybius cipher.poly.polybius.name=Polybius cipher.poly.polybius.description= -cipher.poly.polybius.explanation=The Polybius Square cipher, also known as the Polybius checkerboard, is a method of encryption that replaces pairs of letters with coordinates from a grid. \ -The cipher typically uses a 5x5 grid, with the letters of the alphabet (usually excluding 'J') arranged within it. Each letter is represented by its row and column coordinates in the grid. For example, if 'A' is in the first row and first column, it could be represented as "11", and if 'B' is in the first row and second column, it could be represented as "12". \ -In this grid, each letter is represented by its row and column coordinates. For instance, 'A' is at coordinates (1,1), so it's encoded as "11", 'B' is at (1,2), so it's encoded as "12", and so on. \ -To encrypt a message using the Polybius Square cipher, each letter is first located in the grid, and then its coordinates are noted down. These coordinates form the encrypted message. To decrypt the message, the process is reversed: each pair of coordinates is converted back into the corresponding letter from the grid. \ -It's a relatively simple cipher, but it provides a method of encryption that can be implemented by hand without requiring complex mathematical operations. However, it's also relatively easy to break using frequency analysis or other cryptographic techniques. -cipher.poly.polybius.facts= It was named after the ancient Greek historian Polybius who first described it. +cipher.poly.polybius.explanation={\ + "The Polybius Square cipher, also known as the Polybius checkerboard, is a method of encryption that replaces pairs of letters with coordinates from a grid.",\ + "The cipher typically uses a 5x5 grid, with the letters of the alphabet (usually excluding 'J') arranged within it. Each letter is represented by its row and column coordinates in the grid. For example, if 'A' is in the first row and first column, it could be represented as '11', and if 'B' is in the first row and second column, it could be represented as '12'.",\ + "In this grid, each letter is represented by its row and column coordinates. For instance, 'A' is at coordinates (1,1), so it's encoded as '11', 'B' is at (1,2), so it's encoded as '12', and so on.",\ + "To encrypt a message using the Polybius Square cipher, each letter is first located in the grid, and then its coordinates are noted down. These coordinates form the encrypted message. To decrypt the message, the process is reversed: each pair of coordinates is converted back into the corresponding letter from the grid.",\ + "It's a relatively simple cipher, but it provides a method of encryption that can be implemented by hand without requiring complex mathematical operations. However, it's also relatively easy to break using frequency analysis or other cryptographic techniques."\ + } +cipher.poly.polybius.facts={\ + "It was named after the ancient Greek historian Polybius who first described it."\ + } #Rail Fence cipher.poly.railfence.name=Rail Fence cipher.poly.railfence.description= -cipher.poly.railfence.explanation=The Rail Fence cipher is a transposition cipher that works by writing the plaintext in a zigzag pattern across a number of "rails" or "fences," and then reading off the ciphertext from the pattern formed by the rails. \ -We first write the message in a zigzag pattern across 3 "rails." Then we read off the ciphertext by concatenating the characters from each rail. So, "HELLO WORLD" is encrypted to "HOLL ELWRLOL" using the Rail Fence cipher with 3 rails. \ -To decrypt a Rail Fence ciphertext, the process is reversed. Write the ciphertext in a zigzag pattern across the rails. Read off the plaintext from the pattern formed by the rails. \ -The Rail Fence cipher is relatively easy to implement and understand, but it's not very secure against modern cryptanalysis techniques. It's often used as a teaching tool rather than for serious encryption. -cipher.poly.railfence.facts= +cipher.poly.railfence.explanation={\ + "The Rail Fence cipher is a transposition cipher that works by writing the plaintext in a zigzag pattern across a number of 'rails' or 'fences,'' and then reading off the ciphertext from the pattern formed by the rails.",\ + "We first write the message in a zigzag pattern across 3 'rails.'' Then we read off the ciphertext by concatenating the characters from each rail. So, 'HELLO WORLD' is encrypted to 'HOLL ELWRLOL' using the Rail Fence cipher with 3 rails.",\ + "To decrypt a Rail Fence ciphertext, the process is reversed. Write the ciphertext in a zigzag pattern across the rails. Read off the plaintext from the pattern formed by the rails.",\ + "The Rail Fence cipher is relatively easy to implement and understand, but it's not very secure against modern cryptanalysis techniques. It's often used as a teaching tool rather than for serious encryption."\ + } +cipher.poly.railfence.facts={\ + } #Trifid cipher.poly.trifid.name=Trifid cipher.poly.trifid.description= -cipher.poly.trifid.explanation=The trifid cipher is a polygraphic substitution cipher and is an extention of the Bifid cipher. \ -To encode, a key matrix is generated, typically a permutation of the alphabet plus some additional symbols. Each letter of the plaintext is converted into its corresponding coordinates in the 3x3x3 grid. For example, if the letter is 'A', it could be represented as (1,1,1). \ -The coordinates are then rearranged according to the key matrix and teh plaintext coordinate is (1,1,1), in might be rearranged to 2,3,1 based on the position of 'A' in the key matrix. The rearranged coordinates are converted back into letters. \ -The process is reversed. The ciphertext is first converted into coordinates, rearranged back using the key matrix, and then converted back into plaintext. \ -The Trifid cipher provides a higher degree of security compared to simpler ciphers like Caesar or Atbash, but it's still vulnerable to cryptanalysis, especially with modern computational methods. Despite its age, it remains an interesting historical cipher and is occasionally used in puzzles and cryptography challenges. -cipher.poly.trifid.facts=It was invented by Felix Delastelle in 1901. +cipher.poly.trifid.explanation={\ + "The trifid cipher is a polygraphic substitution cipher and is an extention of the Bifid cipher.",\ + "To encode, a key matrix is generated, typically a permutation of the alphabet plus some additional symbols. Each letter of the plaintext is converted into its corresponding coordinates in the 3x3x3 grid. For example, if the letter is 'A', it could be represented as (1,1,1).",\ + "The coordinates are then rearranged according to the key matrix and teh plaintext coordinate is (1,1,1), in might be rearranged to 2,3,1 based on the position of 'A' in the key matrix. The rearranged coordinates are converted back into letters.",\ + "The process is reversed. The ciphertext is first converted into coordinates, rearranged back using the key matrix, and then converted back into plaintext.",\ + "The Trifid cipher provides a higher degree of security compared to simpler ciphers like Caesar or Atbash, but it's still vulnerable to cryptanalysis, especially with modern computational methods. Despite its age, it remains an interesting historical cipher and is occasionally used in puzzles and cryptography challenges."\ + } +cipher.poly.trifid.facts={\ + "It was invented by Felix Delastelle in 1901."\ + } #Combination #ADFGVX cipher.combination.adfgvx.name=ADFGVX cipher.combination.adfgvx.description= -cipher.combination.adfgvx.explanation=The ADFGVX cipher is a fractionating transposition cipher and was named after the six letters used in the cipher. \ -This cipher was notable for its use of a 6x6 grid to encode letters, making it more complex than many other ciphers of its time. \ -To encode a 6x6 grid, usually called the Polybius square, is created. The rows and columns are labeled with the letters A, D, F, G, V, and X. \ -Each letter of the plaintext is replaced with its corresponding pair of letters from the grid. For example, if the letter 'C' corresponds to 'FD', then 'C' is replaced with 'FD' in the ciphertext. \ -The resulting fractionated ciphertext is then transposed using a keyword or keyphrase. The transposition can be done in various ways, such as columnar transposition. \ -The final step is to arrange the transposed ciphertext into a single line to produce the encrypted message. \ -The use of both fractionation and transposition makes the ADFGVX cipher more secure than simple substitution ciphers. The fractionation step increases the complexity of the cipher, making it resistant to frequency analysis, while the transposition step further scrambles the ciphertext. \ -Overall, the ADFGVX cipher is a historically significant encryption technique that demonstrates the use of both fractionation and transposition in cryptography. -cipher.combination.adfgvx.facts=It was used by the German Army during World War 1. \ -It was used extensively by the German Army during World War I for secure communication. However, it was eventually broken by French cryptanalysts, contributing to the Allies' efforts in the war. +cipher.combination.adfgvx.explanation={\ + "The ADFGVX cipher is a fractionating transposition cipher and was named after the six letters used in the cipher.",\ + "This cipher was notable for its use of a 6x6 grid to encode letters, making it more complex than many other ciphers of its time.",\ + "To encode a 6x6 grid, usually called the Polybius square, is created. The rows and columns are labeled with the letters A, D, F, G, V, and X.",\ + "Each letter of the plaintext is replaced with its corresponding pair of letters from the grid. For example, if the letter 'C' corresponds to 'FD', then 'C' is replaced with 'FD' in the ciphertext.",\ + "The resulting fractionated ciphertext is then transposed using a keyword or keyphrase. The transposition can be done in various ways, such as columnar transposition.",\ + "The final step is to arrange the transposed ciphertext into a single line to produce the encrypted message.",\ + "The use of both fractionation and transposition makes the ADFGVX cipher more secure than simple substitution ciphers. The fractionation step increases the complexity of the cipher, making it resistant to frequency analysis, while the transposition step further scrambles the ciphertext.",\ + "Overall, the ADFGVX cipher is a historically significant encryption technique that demonstrates the use of both fractionation and transposition in cryptography."\ + } +cipher.combination.adfgvx.facts={\ + "It was used by the German Army during World War 1.",\ + "It was used extensively by the German Army during World War I for secure communication. However, it was eventually broken by French cryptanalysts, contributing to the Allies' efforts in the war."\ + } #ADFGX cipher.combination.adfgx.name=ADFGX cipher.combination.adfgx.description= -cipher.combination.adfgx.explanation=The ADFGX cipher is a variant of the ADFGVX cipher. Both the ADFGX and ADFGVX ciphers are similar in structure and operation, but the ADFGX cipher uses a 5x5 grid instead of a 6x6 grid. \ -A 5x5 grid, usually called the Polybius square, is created. The rows and columns are labeled with the letters A, D, F, G, and X. \ -Each letter of the plaintext is replaced with its corresponding pair of letters from the grid. For example, if the letter 'C' corresponds to 'DG', then 'C' is replaced with 'DG' in the ciphertext. \ -The resulting fractionated ciphertext is then encrypted using a keyword or keyphrase, similar to the ADFGVX cipher. This typically involves a transposition step, such as columnar transposition, to rearrange the letters of the fractionated ciphertext. \ -The transposed ciphertext is then arranged into a single line to produce the final encrypted message. \ -Like the ADFGVX cipher, the ADFGX cipher combines both fractionation and transposition to enhance security. The fractionation step increases the complexity of the cipher, making it resistant to frequency analysis, while the transposition step further scrambles the ciphertext. \ -Overall, the ADFGX cipher is a historically significant encryption technique that demonstrates the use of both fractionation and transposition in cryptography. -cipher.combination.adfgx.facts=It was used by the German Army during World War 1. \ -It was used extensively by the German Army during World War I for secure communication. However, it was eventually broken by French cryptanalysts, contributing to the Allies' efforts in the war. +cipher.combination.adfgx.explanation={\ + "The ADFGX cipher is a variant of the ADFGVX cipher. Both the ADFGX and ADFGVX ciphers are similar in structure and operation, but the ADFGX cipher uses a 5x5 grid instead of a 6x6 grid.",\ + "A 5x5 grid, usually called the Polybius square, is created. The rows and columns are labeled with the letters A, D, F, G, and X.",\ + "Each letter of the plaintext is replaced with its corresponding pair of letters from the grid. For example, if the letter 'C' corresponds to 'DG', then 'C' is replaced with 'DG' in the ciphertext.",\ + "The resulting fractionated ciphertext is then encrypted using a keyword or keyphrase, similar to the ADFGVX cipher. This typically involves a transposition step, such as columnar transposition, to rearrange the letters of the fractionated ciphertext.",\ + "The transposed ciphertext is then arranged into a single line to produce the final encrypted message.",\ + "Like the ADFGVX cipher, the ADFGX cipher combines both fractionation and transposition to enhance security. The fractionation step increases the complexity of the cipher, making it resistant to frequency analysis, while the transposition step further scrambles the ciphertext.",\ + "Overall, the ADFGX cipher is a historically significant encryption technique that demonstrates the use of both fractionation and transposition in cryptography."\ + } +cipher.combination.adfgx.facts={\ + "It was used by the German Army during World War 1.",\ + "It was used extensively by the German Army during World War I for secure communication. However, it was eventually broken by French cryptanalysts, contributing to the Allies' efforts in the war."\ + }