Skip to content

Commit 462cb46

Browse files
committed
Fix speling for Vigenère
1 parent b369ea4 commit 462cb46

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

trainingportal/qna.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ let caesarEnc = (mes, key) => {
7979
return getRes(mes, shifted);
8080
}
8181

82-
let vignereEnc = (mes, key) => {
82+
let vigenereEnc = (mes, key) => {
8383
let keyArray = [];
8484
let keyLen = 3;
8585

@@ -193,7 +193,7 @@ let analysisEnc = (mes) => {
193193
let goldenKeyShift = goldenKeyWords[1];
194194
let goldenKeySaltHash = crypto.createHash('md5').update(goldenKeySalt).digest("hex");
195195
let goldenKeyShiftHash = crypto.createHash('md5').update(goldenKeyShift).digest("hex");
196-
let goldenKeyScramble = vignereEnc(goldenKeyMaterial,goldenKeyShift).code;
196+
let goldenKeyScramble = vigenereEnc(goldenKeyMaterial,goldenKeyShift).code;
197197
let pass = Buffer.from(goldenKeyMaterial);
198198
let salt = Buffer.from(goldenKeySalt);
199199
let keyBytes = 32;
@@ -221,7 +221,7 @@ let analysisEnc = (mes) => {
221221

222222
const DEFS = {
223223
"crypto_caesar": caesarEnc,
224-
"crypto_vignere": vignereEnc,
224+
"crypto_vigenere": vigenereEnc,
225225
"crypto_ascii": asciiEnc,
226226
"crypto_base64": base64Enc,
227227
"crypto_hash": hashEnc,

trainingportal/static/lessons/cryptoBreaker/crypto_vignere.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
The Vignere cipher is a variation of the Caesar cipher. Vignere uses longer keys, which are harder to guess.
2+
The Vigenère cipher is a variation of the Caesar cipher. Vigenère uses longer keys, which are harder to guess.
33

44
#### Algorithm
55
The key contains a sequence of characters which represent shifts. For example `A` would represent `0` shifts being the first letter of the alphabet. `B` would represent `1` shift.
@@ -11,7 +11,7 @@ Given the key `ABCD`.
1111
`ABCD` becomes `ACEG`
1212

1313
##### Weakness
14-
The Vignere was considered unbreakable for almost 200 years until the discovery of a method called Kasiski examination.
14+
The Vigenère was considered unbreakable for almost 200 years until the discovery of a method called Kasiski examination.
1515

1616
This method takes advantage of the fact that for a large block of text with a fixed length key, common words tend to repeat.
1717

@@ -20,7 +20,7 @@ For example using the key `ABC` we have the following substitution.
2020
`what is the name of the store`
2121
`wict ju tig nboe ph tig suqrf`
2222

23-
In the case of the Caesar cipher we were able to determine the code for letter `e`, knowing that `e` must be the most common letter in the text. The Vignere cipher can address this problem if the key is sufficiently long.
23+
In the case of the Caesar cipher we were able to determine the code for letter `e`, knowing that `e` must be the most common letter in the text. The Vigenère cipher can address this problem if the key is sufficiently long.
2424

2525
In the example we notice the word `tig` appears twice and assuming this word represents `the`, one of the most common English words, we can easily derive the key.
2626

@@ -36,4 +36,4 @@ Modern cryptographic algorithms use multiple rounds of transformations. Each rou
3636

3737
#### References
3838

39-
[Wikipedia: Vignere Cipher](https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher)
39+
[Wikipedia: Vigenère Cipher](https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher)

trainingportal/static/lessons/cryptoBreaker/definitions.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"codeBlockIds":[]
1313
},
1414
{
15-
"id":"crypto_vignere",
16-
"name":"Vignere Cipher",
17-
"description": "crypto_vignere.md",
15+
"id":"crypto_vigenere",
16+
"name":"Vigenère Cipher",
17+
"description": "crypto_vigenere.md",
1818
"type":"quiz",
1919
"mission":"Decode the cipher below. As before, the plain text is in Latin.",
2020
"codeBlockIds":[]

trainingportal/test/qna.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ describe("qna", () => {
2828
});
2929

3030

31-
test("vignere should return plain text for 'AAA'",()=>{
31+
test("vigenere should return plain text for 'AAA'",()=>{
3232
let text = "PLAIN TEXT";
3333
let expected = "BYOUA HQKH"
3434
let key = "MNO"
35-
let res = qna.getCode("crypto_vignere",text,key);
35+
let res = qna.getCode("crypto_vigenere",text,key);
3636
assert.strictEqual(res.code, expected, "Did not result in the same cipher for key: 'MNO'");
3737

3838
});

0 commit comments

Comments
 (0)