Cryptography Additional Study Guide
Cryptography Additional Study Guide
Contents:
1. Chapter Recaps (1-10, 12)
2. Consolidated Algorithms List
1. Chapter Recaps
Chapter 1 Fundamentals Recap
➢ Encryption in simplest terms is changing plaintext into ciphertext; decryption is the process of changing it back.
➢ Encryption should be applied to information you want to protect at rest as well as in transit.
➢ You can use Aescrypt to encrypt individual files. You can use Bitlocker or FileVault to encrypt full disks.
➢ Mono-alphabetic code or substitution is where a single mapping from our alphabet to a cipher alphabet is created. Many early
cryptosystems used this. Polyalphabetic refers to the mapping of our alphabet to a number of cipher alphabets. This approach
added a bit of complexity to early cryptosystems.
➢ One-time pad is considered to be unbreakable since it only uses its cipher code once.
➢ Pseudo-Random Number Generators (PRNGs). This method repeats the random numbers after a given time (periodic). They
are fast and are also deterministic and are useful in producing a repeatable set of random numbers.
➢ True Random Number Generators (TRNGs). This method generates a true random number and uses some form of random
process. One approach is to monitor the movements of a mouse pointer on a screen or from the pauses between keystrokes.
Overall, the method is generally slow, especially if it involves human interaction, but is non-deterministic and aperiodic.
➢ Frequency Analysis is a cipher cracking methodology that involves identifying patterns and variations in the probability of
codes. i.e. a three-letter ciphered text combination spotted at the beginning of a string too often could tip us off that those three
letters correlate the letters THE in the English alphabet.
➢ Entropy measures level of unpredictability; in encryption relates to the degree of uncertainty of the encryption process. ➢ Two
common binary to characters encoding methods are ASCII (8-bit values, up to 256 characters) and UTF-16 (16- bit values, up to
65,536 characters).
➢ Hardware vs Software encryption. Hardware encryption is more efficient than software encryption.
➢ A hardware security module (HSM) is a tamper-evident and intrusion-resistant physical device that safeguards and manages
cryptographic keys and provides cryptographic processing.
➢ A trusted platform module (TPM) is a dedicated processor that handles hardware-level encryption; allows the use of full disk
encryption on a hard drive in a manner that minimizes the impact on system performance. TPM contains the encryption keys.
Chapter 1 Early Cryptosystems Recap
Early Ciphers
Name Description
Pigpen Mono- alphabetic substitution cipher that makes use of mapping plaintext characters to graphical characters rather than to alphabetic
ones. i.e. A=(pick a symbol), vs A=(pick a letter). Disadvantage: once the mapping is known, it is difficult to keep the message secret.
Rail Code Employs a method to scramble text by writing it in a sequence across a number of rails.
BIFID Makes use of a grid and which maps the letters into numeric values.
5 × 5 matrix containing the alphabet less the letter J. Cipher/decipher process consists of a set of rules outlining use of column and row
Playfair combinations.
Morse Code Encoding method, rather than a cipher, that works by translating characters into sequences of dots (.) and dashes (-)
Mono-alphabetic substitution cipher known as "shift" cipher. Involves plaintext being replaced by a letter some fixed number of
positions down the alphabet. i.e., a Caesar Cipher using a shift of +3 would mean a plaintext letter A would result in a ciphertext letter D
Caesar (a shift of three positions to the right in the alphabet).
Polyalphabetic cipher that involves using a different mapping, based on a keyword, for each character of the cipher. An advantage of
this type of cipher is that the same plaintext character is likely to be coded to different mappings, depending on the position of the
Vigenere keyword, making guessing more difficult.
Cipher code mapping that is used only once. Advantage is it is essentially unbreakable, disadvantage is it takes lots of work as you'd
One Time Pad have to generate the pad to be used, each time.
Four-square Cipher Uses four 5 × 5 matrices arranged in a square, are where each matrix contains 25 letters for encoding and decoding operations.
Used a polyalphabetic substitution cipher, which did not repeat within a reasonable time period, along with a secret key. For the
Enigma Machine
cracking of the Enigma cipher, the challenge was thus to determine both the algorithm used and the key. Enigma’s main weakness,
though, was that none of the plain text letters could be ciphered as itself.
Chapter 1 Number Theory Recap
Binary Math: Basic premise is knowing what combination of binary Set Theory:
digits will produce a binary “1”. AND requires two 1’s to output a 1;
OR requires at least one 1 to output a 1, and with XOR, there must
be a mismatch (i.e., one 1 and one 0) to output a 1.
With AND, both the first and second 11110
numbers you are ANDing must be 1 10100
for the answer to be 1. Anything else = 0 10100
Block cipher modes merely outline how the blocks will be handled depending on the
implementation selected (i.e., which mode is used). Implementation selection can be
based on anything just as type of cipher can. Factors can include security needs or
not, processing capacity, organization preference and so on.
At minimum, each block of data will be encrypted using the encryption key of the
block cipher being used as you will see with ECB. Other variations are configured to
incorporate additional components to meet desired security and/or performance.
Chapter 2 Block Cipher Modes Basic Components
Block of Encryption Ciphertext
Function
IV
plaintext
This represents This symbol This represents This represents This symbol This represents
the individual fittingly the encryption or an initialization annotates the the resultant
block of represents the cipher process, vector (IV) used exclusive or (X-OR) ciphertext
plaintext. The encryption key, i.e., where the to incorporate function. output from a
size depends which again is key is applied to randomness. given stage.
on the specific based on the encipher inputs. With CTR mode
block cipher specific cipher you will see an
being used. For being used. alternative
instance, if DES method to
is being used, achieve this
the size of each annotated by
block will be 64 similar green
bits. boxes.
Chapter 2 Block Cipher Modes - ECB
Block 1 Block 2
Initialization is encrypted
Creates
Message Sent
Message Sent
Transport mode = end-to-end encryption (i.e., from one end-user through that
user’s internal network, the internet, & the receiver’s internal network)
Internal Network A The Internet/unsafe cyberspace Internal Network B
User Y
User X
Unencrypted
Clear text User Y
traffic
User X
ChaCha Uses a 256-bit key and a 64-bit nonce. ~ three times faster than software-enabled
AES and is not sensitive to timing attacks.
Cryptographic Hash
Name Hash Value in Bits
MD2 128
MD4 128
MD5 128
MD6 1-512
SHA-1 160
SHA-2 256, 384, or 512
SHA-3 Variable
SHA-256 256
SHA-512 512
Conventional Cryptosystems, cont.
Asymmetric
Name Quick Fact
Partially homomorphic crypto system that leverages prime number characteristics, 1024-4096
RSA
variable key size, 1 round.
ECC Improved solution over RSA often used with key exchange methods as well as with DSA in
creating digital signatures.
EL Gamal Used in both encryption and digital signing.
DSA Federal Information Processing Standard (FIPS 186) for digital signatures, based on the
mathematical concept of modular exponentiation and the discrete logarithm problem.
Key Exchange
Name Quick Fact
Name Block Size (In Bits) Key Size (In Bits) Rounds Key attributes for light-weight suitability
Light-weight Hashing
Hash Value (In
Name Key attributes for light-weight suitability
Bits)
80, 128, 160, 224 or
PHOTON Small memory footprint and have a target an input of just 256 characters (whereas typical
256-bit
hash functions support up to 264 bits). Different size hash values available.
88, 128, 160, 224 or
SPONGENT Small memory footprint and have a target an input of just 256 characters (whereas typical
256
hash functions support up to 264 bits). Different size hash values available.
Lesamnta-LW 256 Small memory footprint and have a target an input of just 256 characters (whereas typical
hash functions support up to 264 bits). Fast (five times faster than SHA-256). Primary
target implementation is 8-bit CPUs for short message hashing.
Quark 64 or 112 Small memory footprint and have a target an input of just 256 characters (whereas typical
hash functions support up to 264 bits). Can be used for hashing and in stream encryption.
Light-weight Cryptosystems, cont.
Light-weight Signing
Key Size
Name Description
(In Bits)
Light-weight cryptography method for signing messages (MAC).
Relatively undemanding hardware implementation (only ~3,333
Chaskey 128
gates required at 1MHz clock rate) making it suitable for IoT
implementation.
Light-weight Public-Key
Name Description
Elli Light-Weight public key solution. Short for "Elliptic Light". Uses Elliptic
Curves along with a Diffie-Hellman related handshake between the RFID
tag and the RFID reader in RFID implementations.