4- Hash, MAC, Dsign, freshness, passwords Flashcards
Data integrity problems
1- accidental errors
-> parity checks, CRC
2- active attack:
prevent attacker from creating fake integrity digest
-> include DOA
Hash function
accepts variable size message and creates fixed-size message
Hash function uses (5)
1- one-way function
2- component of crypto primitive
3- bind documents
4- source of pseudorandomness
5- bitcoin
Hash functions requirements
1- preimage resistance
h(x)=z - it’s impossible to find input x
2- 2nd preimage resistance
impossible to find h(x1)=z so that h(x1)=h(x)=z
3- collision resistance
impossible to find x1 such that h(x1)=h(x2)
Applications of hash resistances
1- preimage:
pw check and storage
2- 2nd preimage:
software downloading
3- collision:
contractual commitment
Hash security
birthday paradox 2^(L/2)
MAC - message authentication codes
cryptographic checksum sent along with a message to provide assurance of DOA
MAC process
MAC(m) = f (k, m)
k(ab)
MAC security (2)
assures:
- data was not altered
- is from the alleged sender
MAC algortihms
1) CBC-MAC (use last block of CBC), no IV
2) HMAC - hash based MAC
hash+key
HMAC process
0- have K1 and K2
1- h (K2 | m)
2- h (K1 | h (K2 | m))
HMAC security
- key security
- h-function security
- length of MAC output
MAC + confidentiality
1- MAC -> encrypt
2- encrypt -> MAC
Digital signature services
- DOA
- NR
Dsign computed with…
data and signer’s parameter
Dsign requirements
- easy to sign
- easy to verify
- hard to forge
RSA-based Dsigns process
1- h (doc)
2- apply key and sign. algo to the h
3- send doc and sign
4- receiver:
- computes h (doc)
- runs sign through verification algo with a verification key
5- compares results of both (same+>ok)
Reasons for hashing before signing
- efficiency
- prevention of modification attacks
- prevention of existential forgeries
RSA Dsign process with formulas
1- h=h(P)
2- s=h^d mod n
3- A sends (P,s) to B
4- B computes h(P)
- B computes s^e mod n
- B compares h(P) to s^e mod n
Additional steps after Dsign
- A encrypts data P and signarture s with B’s public key
- A adds A identity to encryption
- A adds B identity to signature
// => avoid impersonator’s attacks
Entity Authentication
assurance that entity is involved and currently active in session
EA dangers and mechanisms
- danger: impersonator’s attack
- mech: freshness
Freshness mechanisms
- clock-based (synchronisation)
- sequence numbers (storage)
- nonces (rng)
Pw problems
- length
- complexity
- repeatability
- vulnerabillity
Dynamic password schemes
combine pw and freshness
Dynamic password schemes mechanisms
1- synchronisation
2- challenge
3- counter