INTRODUCTION TO CRYPTOGRAPHY -
D334 QUESTIONS AND SOLUTIONS
XOR the following ji ji ji
0101110101010111
1001100000111010
------------------ - answers1100010101101101 ji ji
asymmetric key-based encryption ji ji
-typical methods - answersRSA ji ji ji
DSA
El Gamal ji
Symmetric key-based encryption ji ji
-Typical Methods - answersRC2- 40 bit key size 64 bit block ji ji ji ji ji ji ji ji ji ji
RC4- (Stream Cipher)- Used in SSL and WEP ji ji ji ji ji ji ji
RC5- (Variable Key size, 32, 64, or 128 bit block size)
ji ji ji ji ji ji ji ji ji ji
AES- (128, 192 or 256 bit key size, 128 bit block size)
ji ji ji ji ji ji ji ji ji ji ji
DES- (56 bit key size. 64 bit Block size) ji ji ji ji ji ji ji ji
3DES- (112 bit key size, 64 bit block size) ji ji ji ji ji ji ji ji
Block Encryption - answersRC2(40 bit key size) ji ji ji ji ji ji ji
RC5(Variable block size) ji ji
IDEA
DES
3DES
AES (Rijndael) ji
Blowfish
twofish
stream encryption - answersRC4 ji ji ji
Chacha
Rainbow Attack - answersThe method of knowing the mapping between the hashed values ji ji ji ji ji ji ji ji ji ji ji ji
and the original data
ji ji ji ji
Dictionary-type attack - answersa brute force analysis ji ji ji ji ji ji
∉ - answersdoes not belong to
ji ji ji ji ji
when an object is not in a set ji ji ji ji ji ji ji
∈ - answersBelongs to
ji ji ji
when an object is within a set ji ji ji ji ji ji
⊆ - answerssubset
ji ji
subset has fewer elements or equal to the set ji ji ji ji ji ji ji ji
,A ∪ B - answersunion (objects that belong to set A or set B)
ji ji ji ji ji ji ji ji ji ji ji ji ji
| - answerssuch that
ji ji ji
A ∩ B - answersIntersection: in both A and B
ji ji ji ji ji ji ji ji ji
Enigma Machine -Cypher 10 - answersUsed a polyalphabetic substitution cipher, which did
ji ji ji ji ji ji ji ji ji ji ji
not repeat within a reasonable time period, along with a secret key. For the cracking of the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Enigma cipher, the challenge was thus to determine both the algorithm used and the key.
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Enigma's main weakness, though, was that none of the plain text letters could be ciphered as
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
itself.
ji
Four-square cipher9 - answersUses four 5 × 5 matrices arranged in a square, are where each ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
matrix contains 25 letters for encoding and decoding operations.
ji ji ji ji ji ji ji ji ji
One-time pad cypher8 - answersCypher Code mapping that is only used once. ji ji ji ji ji ji ji ji ji ji ji ji
Advantage: it is essentially unbreakable. ji ji ji ji ji
Disadvantage: it takes lots of work as you would have to generate the pad to be used, each time. ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Vigenere Cipher 7 - answersPolyalphabetic cipher that involves using a different mapping, ji ji ji ji ji ji ji ji ji ji ji
based on a keyword, for each character of the cipher. An advantage of this type of cipher is that
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
the same plaintext character is likely to be coded to different mappings, depending on the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
position of the keyword, making guessing more difficult.
ji ji ji ji ji ji ji ji
Ceasar Cipher6 - answersMono-alphabetic substitution cipher known as "shift" cipher.
ji ji ji ji ji ji ji ji ji
Involves plaintext being replaced by a letter some fixed number of positions down the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji
alphabet. i.e., a Caesar Cipher using a shift of +3 would mean a plaintext letter A would result in
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
a ciphertext letter D (a shift of three positions to the right in the alphabet)
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Morse Code cipher 5 - answersEncoding method, rather than a cipher, that works by
ji ji ji ji ji ji ji ji ji ji ji ji ji
translating characters into sequences of dots (.) and dashes (-)
ji ji ji ji ji ji ji ji ji ji
Playfair Cipher 4 - answers5 × 5 matrix containing the alphabet less the letter J.
ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Cipher/decipher process consists of a set of rules outlining use of column and row
ji ji ji ji ji ji ji ji ji ji ji ji ji ji
combinations.
ji
BIFID Cipher 3 - answersMakes use of a grid and which maps the letters into numeric values.
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Rail Code Cipher 2 - answersEmploys a method to scramble text by writing it in a sequence
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
across a number of rails.
ji ji ji ji ji
Pig Pen Cipher 1 - answersMono- alphabetic substitution cipher that makes use of mapping
ji ji ji ji ji ji ji ji ji ji ji ji ji
plaintext characters to graphical characters rather than to alphabetic ones. i.e. A=(pick a
ji ji ji ji ji ji ji ji ji ji ji ji ji
symbol), vs A=(pick a letter). Disadvantage: once the mapping is known, it is difficult to keep the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
message secret.
ji ji
Encryption - answersin simplest terms is changing plaintext into ciphertext ji ji ji ji ji ji ji ji ji
Decryption - answersThe process of converting a ciphertext into plaintext. ji ji ji ji ji ji ji ji ji
, AESCrypt - answersEncrypt individual files and encrypt full disks with options such as ji ji ji ji ji ji ji ji ji ji ji ji
Bitlocker and FileVault
ji ji ji
Mono-alphabetic - answersc code or substitution is where a single mapping from our alphabet ji ji ji ji ji ji ji ji ji ji ji ji ji
to a cipher alphabet is created. Many early cryptosystems used this.
ji ji ji ji ji ji ji ji ji ji ji
Polyalphabetic - answersrefers to the mapping of our alphabet to a number of cipher ji ji ji ji ji ji ji ji ji ji ji ji ji
alphabets. This approach added a bit of complexity to early cryptosystems.
ji ji ji ji ji ji ji ji ji ji ji
One-time pad - answersis considered to be unbreakable since it only uses its cipher code once. ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Pseudo-Random Number Generators (PRNGs) - answersThis method repeats the random ji ji ji ji ji ji ji ji ji
numbers after a given time (periodic). They are fast and are also deterministic and are useful in
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
producing a repeatable set of random numbers.
ji ji ji ji ji ji ji
Frequency Analysis - answersis cipher cracking methodology that involves identifying ji ji ji ji ji ji ji ji ji
patterns and variations in the probability of codes. i.e. a three-letter ciphered text combination
ji ji ji ji ji ji ji ji ji ji ji ji ji ji
spotted at the beginning of a string too often could tip us off that those three letters correlate the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
letters THE in the English alphabet.
ji ji ji ji ji ji
True Random Number Generators (TRNGs) - answersThis method generates a true random
ji ji ji ji ji ji ji ji ji ji ji
number and uses some form of random process. One approach is to monitor the movements of
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
a mouse pointer on a screen or from the pauses between keystrokes. Overall, the method is
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
generally slow, especially if it involves human interaction, but is non-deterministic and
ji ji ji ji ji ji ji ji ji ji ji ji
aperiodic.
ji
Entropy - answersmeasures level of unpredictability; in encryption relates to the degree of
ji ji ji ji ji ji ji ji ji ji ji ji
uncertainty of the encryption process.
ji ji ji ji ji
ASCII - answers8-bit values, up to 256 characters
ji ji ji ji ji ji ji
UTF-16 - answers16- bit values, up to 65,536 characters ji ji ji ji ji ji ji ji
Hardware vs Software encryption - answersHardware encryption is more efficient than ji ji ji ji ji ji ji ji ji ji
software encryption.
ji ji
Hardware Security Module (HSM) - answersis a tamper-evident and intrusion-resistant ji ji ji ji ji ji ji ji ji
physical device that safeguards and manages cryptographic keys and provides
ji ji ji ji ji ji ji ji ji ji
cryptographic processing.
ji ji
Trusted Platform Module (TPM) - answersis a dedicated processor that handles hardware-
ji ji ji ji ji ji ji ji ji ji ji
level encryption; allows the use of full disk encryption on a hard drive in a manner that minimizes
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
the impact on system performance. TPM contains the encryption keys.
ji ji ji ji ji ji ji ji ji ji
Combination vs. Permutation - answerscombinations = not concerned with the ji ji ji ji ji ji ji ji ji
order//permutations = all options considered including sequence.
ji ji ji ji ji ji ji
Secret Key - answersencryption (symmetric Cryptography) makes use of a single secret key
ji ji ji ji ji ji ji ji ji ji ji ji
for both encryption and decryption.
ji ji ji ji ji
D334 QUESTIONS AND SOLUTIONS
XOR the following ji ji ji
0101110101010111
1001100000111010
------------------ - answers1100010101101101 ji ji
asymmetric key-based encryption ji ji
-typical methods - answersRSA ji ji ji
DSA
El Gamal ji
Symmetric key-based encryption ji ji
-Typical Methods - answersRC2- 40 bit key size 64 bit block ji ji ji ji ji ji ji ji ji ji
RC4- (Stream Cipher)- Used in SSL and WEP ji ji ji ji ji ji ji
RC5- (Variable Key size, 32, 64, or 128 bit block size)
ji ji ji ji ji ji ji ji ji ji
AES- (128, 192 or 256 bit key size, 128 bit block size)
ji ji ji ji ji ji ji ji ji ji ji
DES- (56 bit key size. 64 bit Block size) ji ji ji ji ji ji ji ji
3DES- (112 bit key size, 64 bit block size) ji ji ji ji ji ji ji ji
Block Encryption - answersRC2(40 bit key size) ji ji ji ji ji ji ji
RC5(Variable block size) ji ji
IDEA
DES
3DES
AES (Rijndael) ji
Blowfish
twofish
stream encryption - answersRC4 ji ji ji
Chacha
Rainbow Attack - answersThe method of knowing the mapping between the hashed values ji ji ji ji ji ji ji ji ji ji ji ji
and the original data
ji ji ji ji
Dictionary-type attack - answersa brute force analysis ji ji ji ji ji ji
∉ - answersdoes not belong to
ji ji ji ji ji
when an object is not in a set ji ji ji ji ji ji ji
∈ - answersBelongs to
ji ji ji
when an object is within a set ji ji ji ji ji ji
⊆ - answerssubset
ji ji
subset has fewer elements or equal to the set ji ji ji ji ji ji ji ji
,A ∪ B - answersunion (objects that belong to set A or set B)
ji ji ji ji ji ji ji ji ji ji ji ji ji
| - answerssuch that
ji ji ji
A ∩ B - answersIntersection: in both A and B
ji ji ji ji ji ji ji ji ji
Enigma Machine -Cypher 10 - answersUsed a polyalphabetic substitution cipher, which did
ji ji ji ji ji ji ji ji ji ji ji
not repeat within a reasonable time period, along with a secret key. For the cracking of the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Enigma cipher, the challenge was thus to determine both the algorithm used and the key.
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Enigma's main weakness, though, was that none of the plain text letters could be ciphered as
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
itself.
ji
Four-square cipher9 - answersUses four 5 × 5 matrices arranged in a square, are where each ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
matrix contains 25 letters for encoding and decoding operations.
ji ji ji ji ji ji ji ji ji
One-time pad cypher8 - answersCypher Code mapping that is only used once. ji ji ji ji ji ji ji ji ji ji ji ji
Advantage: it is essentially unbreakable. ji ji ji ji ji
Disadvantage: it takes lots of work as you would have to generate the pad to be used, each time. ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Vigenere Cipher 7 - answersPolyalphabetic cipher that involves using a different mapping, ji ji ji ji ji ji ji ji ji ji ji
based on a keyword, for each character of the cipher. An advantage of this type of cipher is that
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
the same plaintext character is likely to be coded to different mappings, depending on the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
position of the keyword, making guessing more difficult.
ji ji ji ji ji ji ji ji
Ceasar Cipher6 - answersMono-alphabetic substitution cipher known as "shift" cipher.
ji ji ji ji ji ji ji ji ji
Involves plaintext being replaced by a letter some fixed number of positions down the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji
alphabet. i.e., a Caesar Cipher using a shift of +3 would mean a plaintext letter A would result in
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
a ciphertext letter D (a shift of three positions to the right in the alphabet)
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Morse Code cipher 5 - answersEncoding method, rather than a cipher, that works by
ji ji ji ji ji ji ji ji ji ji ji ji ji
translating characters into sequences of dots (.) and dashes (-)
ji ji ji ji ji ji ji ji ji ji
Playfair Cipher 4 - answers5 × 5 matrix containing the alphabet less the letter J.
ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Cipher/decipher process consists of a set of rules outlining use of column and row
ji ji ji ji ji ji ji ji ji ji ji ji ji ji
combinations.
ji
BIFID Cipher 3 - answersMakes use of a grid and which maps the letters into numeric values.
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Rail Code Cipher 2 - answersEmploys a method to scramble text by writing it in a sequence
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
across a number of rails.
ji ji ji ji ji
Pig Pen Cipher 1 - answersMono- alphabetic substitution cipher that makes use of mapping
ji ji ji ji ji ji ji ji ji ji ji ji ji
plaintext characters to graphical characters rather than to alphabetic ones. i.e. A=(pick a
ji ji ji ji ji ji ji ji ji ji ji ji ji
symbol), vs A=(pick a letter). Disadvantage: once the mapping is known, it is difficult to keep the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
message secret.
ji ji
Encryption - answersin simplest terms is changing plaintext into ciphertext ji ji ji ji ji ji ji ji ji
Decryption - answersThe process of converting a ciphertext into plaintext. ji ji ji ji ji ji ji ji ji
, AESCrypt - answersEncrypt individual files and encrypt full disks with options such as ji ji ji ji ji ji ji ji ji ji ji ji
Bitlocker and FileVault
ji ji ji
Mono-alphabetic - answersc code or substitution is where a single mapping from our alphabet ji ji ji ji ji ji ji ji ji ji ji ji ji
to a cipher alphabet is created. Many early cryptosystems used this.
ji ji ji ji ji ji ji ji ji ji ji
Polyalphabetic - answersrefers to the mapping of our alphabet to a number of cipher ji ji ji ji ji ji ji ji ji ji ji ji ji
alphabets. This approach added a bit of complexity to early cryptosystems.
ji ji ji ji ji ji ji ji ji ji ji
One-time pad - answersis considered to be unbreakable since it only uses its cipher code once. ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
Pseudo-Random Number Generators (PRNGs) - answersThis method repeats the random ji ji ji ji ji ji ji ji ji
numbers after a given time (periodic). They are fast and are also deterministic and are useful in
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
producing a repeatable set of random numbers.
ji ji ji ji ji ji ji
Frequency Analysis - answersis cipher cracking methodology that involves identifying ji ji ji ji ji ji ji ji ji
patterns and variations in the probability of codes. i.e. a three-letter ciphered text combination
ji ji ji ji ji ji ji ji ji ji ji ji ji ji
spotted at the beginning of a string too often could tip us off that those three letters correlate the
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
letters THE in the English alphabet.
ji ji ji ji ji ji
True Random Number Generators (TRNGs) - answersThis method generates a true random
ji ji ji ji ji ji ji ji ji ji ji
number and uses some form of random process. One approach is to monitor the movements of
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
a mouse pointer on a screen or from the pauses between keystrokes. Overall, the method is
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
generally slow, especially if it involves human interaction, but is non-deterministic and
ji ji ji ji ji ji ji ji ji ji ji ji
aperiodic.
ji
Entropy - answersmeasures level of unpredictability; in encryption relates to the degree of
ji ji ji ji ji ji ji ji ji ji ji ji
uncertainty of the encryption process.
ji ji ji ji ji
ASCII - answers8-bit values, up to 256 characters
ji ji ji ji ji ji ji
UTF-16 - answers16- bit values, up to 65,536 characters ji ji ji ji ji ji ji ji
Hardware vs Software encryption - answersHardware encryption is more efficient than ji ji ji ji ji ji ji ji ji ji
software encryption.
ji ji
Hardware Security Module (HSM) - answersis a tamper-evident and intrusion-resistant ji ji ji ji ji ji ji ji ji
physical device that safeguards and manages cryptographic keys and provides
ji ji ji ji ji ji ji ji ji ji
cryptographic processing.
ji ji
Trusted Platform Module (TPM) - answersis a dedicated processor that handles hardware-
ji ji ji ji ji ji ji ji ji ji ji
level encryption; allows the use of full disk encryption on a hard drive in a manner that minimizes
ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji ji
the impact on system performance. TPM contains the encryption keys.
ji ji ji ji ji ji ji ji ji ji
Combination vs. Permutation - answerscombinations = not concerned with the ji ji ji ji ji ji ji ji ji
order//permutations = all options considered including sequence.
ji ji ji ji ji ji ji
Secret Key - answersencryption (symmetric Cryptography) makes use of a single secret key
ji ji ji ji ji ji ji ji ji ji ji ji
for both encryption and decryption.
ji ji ji ji ji