Symmetric Encryption algorithms
Symmetric encryption algorithms are cryptographic algorithms that uses same key for encryption and decryption.
Block Ciphers
TODO
Stream ciphers
stream ciphers are symmetric encryption cryptography primitives that works on digits, often bits, rather than fixed-size blocks as in block-ciphers.
- Plaintext digits can be of any size, as cipher works on bits, i.e.
- is a PRG that generatoes Keystream which is a pseudorandom digit stream that is combined with plaintext to obtain ciphertext.
- Keystream is generated using a seed value using shift registers.
- Seed is the key value required for decrypting ciphertext.
- Can be approximated as one-time pad (OTP), where keystream is used only once.
- Keystream has to be updated for every new plaintext bit encrypted. Updation of keystream can depend on plaintext or can happen independent of it.
flowchart LR
k[Key]-->ksg["Key Stream Generator"]
ksg--s_i-->xor
x["Plaintext (x_i)"]:::hiddenBorder-->xor["⊕"]
xor-->y_i
y_i["Ciphertext (y_i)"]-.->ksg
Now, encryption in stream ciphers is just XOR operation, i.e. . Due to this, encryption and decrpytion is the same function which. Then, comes the major question: