Cryptography Lec 2(Historical Ciphers) - Notes
tags: Cryptography
NTU
:::spoiler 資訊安全筆記2 The Vigenere Cipher
The Vigenere Cipher是一種”polyalphabetic cipher”用一串的 Key 不斷地重複!例如 abcabcabcabc 計算方法: 例如key = d 代表a會變成d所以 w 會變成 Z
課本上的例子:
:::
:::spoiler Playfair Cipher
The Playfair Cipher Encryption Algorithm: The Algorithm consists of 2 steps:
- Generate the key Square(5×5):
- Algorithm to encrypt the plain text: The plaintext is split into pairs of two letters (digraphs). If there is an odd number of letters, a Z is added to the last letter.
For example:
1
2PlainText: "instruments" After Split: 'in' 'st' 'ru' 'me' 'nt' 'sz'
:::info Note that: Pair cannot be made with same letter. Break the letter in single and add a bogus letter to the previous letter. :::
Plain Text: “hello” After Split: ‘he’ ‘lx’ ‘lo’ Here ‘x’ is the bogus letter.
If the letter is standing alone in the process of pairing, then add an extra bogus letter with the alone letter Plain Text: “helloe” After Split: ‘he’ ‘lx’ ‘lo’ ‘ez’ Here ‘z’ is the bogus letter.
Exception
:::
Introduce the encryption flow of Enigma WWII納粹德國密碼機Enigma