Some Crypto Notes

So here are some cryptography notes for myself for various tests and things I have to study for.

Terms to know:

Stream Ciphers – This is a class of cipher that encrypts one bit of data at a time. The length of the encrypted text is the same length as the plain text content.  Types of Stream cciphers: RC4, A5/I, E0, VEST, Salsa20, etc.

Block Ciphers -Encrypts data one block at a time. When the data given is an uneven length, then it is padded at the end to create an even block length. PKCS5 or PKCS7 are typically used to pad the data for any uneven blocks. Example Block ciphers: AES, DES, 3DES, Blowfish, Twofish, etc.

Block Cipher Modes:

  • Electronic Codebook
  • Cipher Block Chaining Mode – a plaintext block of data is XOR’ed with the output of the previous cipher text block before it is encrypted. This is an effort to add randomness to each encryption operation and prevent duplicate blocks.
  • Cipher Feedback
  • Output Feedback
  • Counter – A block cipher acting as a stream cipher in a small way. The IV is concatenated with a counter value that represents the input for the algorithm,

 

Analysis:

ent – pseudo random number sequence test  “sudo apt-get install ent

tcpick – This can track, reassemble and reorder TCP streams. Only TCP though, so maybe scapy is a better way to go.