Flashcards in Crypto Deck (18)
takes n bits as input and produces n bits. Based on iteration.
n or block size is 64 bits. Key size is 168 bits. FiestelNetwork. Half of bits are unchanged.
n or block size is 128 bits. Key size is 156, 512, 1025. Permutation Substitution network.
Modes of operation
use the same key to encrypt multiple times
Cipher block chaining with random IV
Carter Wagman MAC
Use the fast hash function on the larger input and use slower encryption algorithm on hashed output.
Markel dagmard function, davies mayer compressionl
Provides ciphertext integrity, cannot protect against replay attacks.
mac then encrypt E(Ke, m||tag)
enc then mac E(ke,m) and calculate tag on the message.
enc then mac E(ke,m) and calculate tag on the cipher text. IPSec is the best option.
Authenticated encryption modes
combining encryption and MAC
ctr mode encryption then cw-mac (cartel wagman)
cbc mac then ctr mode encryption. Uses AES.
( CBC AES-128, HMAC-SHA1). Mac then encypt.
Browser side enc (k b->s, data, ctr b->s) :
1. Tag – S(kmac, [++ctr b->s||header||data) value of ctr is included in tag. Ctr is acting as nonce and not send since both sides know what ctr has to be.
2. Pad [header||data||tag] to AES block.
3. CBC encypt with k and new random IV
4. prepend header.
Server side dec(kb->s, record, ctr b->s)
1.CBC decrpt record using kenc
2.Check pad format : send bad_record_mac if invalid
3.Check tag on [++ctr b->s||header||data]. Send bad_record_mac if invalid.
Replay attack prevented using ctr, since ctr won’t match.
Password based KDF
uses salt and slow hash function. PKCS#5. H©(pwd||salt) – iterate hash function c times.
G generates public, private key pair
E (publickey, m)
D (privatekey, c)