Professional Documents
Culture Documents
Symmetric
Cryptography
Encryption Scheme
Llave Llave
secreta secreta
Algoritmo de Algoritmo de
cifrado descifrado
Alicia Mensaje Mensaje Mensaje Beto
en claro cifrado en claro
Classification Modern
Ciphers
Stream
Block Ciphers
Ciphers
RC4, Salsa20,
Public Key Private Key
Chacha20
Mobile Add/Multiplica
Exponentation AES
Phones, WLAN tion
Stream
Ciphers
The algorithm is applied to
one element (character or bit)
using a stream random key.
The process is done bit by bit.
Stream vs Block
Block Ciphers
Impossible Slow
to introduce Likely to
extra blocks have errors
without on the
detection process
Advantages Disadvantages
Fast Independent
Resistant to elements can
errors be modified
Stream Ciphers
Stream Ciphers
How to stream ciphering?
•
•
•
•
Stream Cipher
C C
Message M XOR XOR Message M
Cryptomessages bits
Sequence Si Sequence Si
Basic Stream Cipher
•
•
•
•
Basic Stream Cipher
K K
Sequence
C
Deterministic S S Deterministic
Å Å
Algorithm Algorithm
Message M M Message
Stream Ciphers from Pseudo-random Functions
•
• Fk K
c m Fk
Example A' = 6510 = 64+1 = 26+20 = 010000012
Linear Feedback Shift Registers
•
•
•
Linear
Feedback Shift
Registers
Pseudo-random Sequence S
•
•
•
•
Stream Cipher Examples
•
• http://youtu.be/LgZAI3DdUA4
•
• http://rc4.online-domain-tools.com/
•
• https://youtu.be/UeIpq-C-GSA
A5 Algorithm
•
•
•
RC4 algorithm
•
•
•
Chacha 20
Chacha20 ChaCha is a family of stream ciphers by Daniel J. Bernstein
based on a variant of Salsa20.
•
Basic Function
•
•
•
•
•
1.
2.
3.
PRGs for ChaCha
•
•
•
•
•
•
Advantages
•
•
Practical
Session 1
Block Ciphers
Block Encryption / Decryption Scheme
MESSAGE (N bits)
BLOCK A BLOCK B A Å Xi B Å Xi
N/2 N/2
Å Å
ki ki
FUNCTION f FUNCTION f
Xi Xi
Å Å Å Å
A Å Xi B Å Xi A B
Given that Y Å Xi Å Xi = Y
Feistel Cipher
•
•
Feistel Cipher
•
•
•
Example
•
•
•
•
•
•
Feistel Ciphers
•
AES -
Advanced Encryption
Standard
The latest standard AES
•
General Characteristics
of AES
•
Bytes operations •
in AES
•
•
Description of the algorithm
1.
2.
•
3.
•
•
•
4.
•
•
•
Byte SUB
• Each byte ai,j in the
state is replaced with
its entry in a fixed 8-
bit lookup table S
(Substitution Box)
bij = S(aij)
• The s-box used is
derived from the
multiplicative inverse
over GF(28), known to
have good non-
linearity properties.
The ShiftRows step
•
AES
• https://youtu.be/gP4PqVGudtg
Example - AES
AddRoundKey
SubBytes
ShiftRows
MixColumns
AddRoundKey
Final State
Known Attacks
•
•
Known Attacks
•
•
Pros and cons on simetric key criptosystems
PROS CONS
• •
•
•
•
• https://www.cryptool.org/en/cto/aes-step-by-
step
• https://nvlpubs.nist.gov/nistpubs/fips/NIST.FIPS.1
97.pdf
Referencias • https://www.kavaliro.com/wp-
content/uploads/2014/03/AES.pdf
Cipher Modes
Cipher Modes
•
Cipher Modes •
•
Electronic
Codebook (ECB)
•
Electronic Codebook (ECB)
Cipher Block Chaining (CBC)
•
Cipher Block Chaining (CBC)
Cipher Block Chaining (CBC)
Problems with CBC mode
•
Propagating •
Cipher Block
Chaining
Propagating Cipher Block Chaining
Cipher •
Feedback (CFB)
Cipher Feedback (CFB)
Output
•
Feedback (OFB)
Output Feedback (OFB)
Counter (CTR)
•
Counter (CTR)
Counter (CTR)
Galois Counter Mode (GCM)
•
•
•
•
•
•
•
•
•