BA Chapter5 Authentication and Key Agreement
BA Chapter5 Authentication and Key Agreement
► Integrity protection
§ Message Authentication Codes and digital signatures schemes
► Confidentiality
§ Symmetric and asymmetric encryption schemes
► authenticate entities, i.e., check that they are who they claim to be
● Building Blocks for Entity Authentication ● Key Distribution with trusted Third Parties
► Signature-based authentication
Objectives
► Correctness: A can always successfully
authenticate to B
Unilateral entity authentication of A to B
► Resistance against transferability: After A
► A (claimant) proofs its identity to B (verifier)
authenticated to B successfully, B cannot
► B is assured that A is currently interacting with B
authenticate as A to C (∗)
(∗) Except for with negligible probability: guessing is of course always possible
IT-Security - Chapter 5: Authentication and Key Establishment 4
Example
● Assume A and B have agreed upon a secret password when they last met
Response
Idea:
► B generates a fresh challenge
§ E.g., a random number or a time stamp (implicit challenge) Response Calculation must
► A proofs its identity by computing a response that guarantee that the objectives hold
§ Depends on the challenge and a secret
𝐾 𝐾 𝐾 𝐾
𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥ 𝑅𝐴𝑁𝐷
𝑀𝐴𝐶𝐾 (𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝) 𝑀𝐴𝐶𝐾 (𝑅𝐴𝑁𝐷)
Check 𝑀𝐴𝐶 Check 𝑀𝐴𝐶 by computing it
Verify 𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 is current on sent 𝑅𝐴𝑁𝐷
► Alice computes a 𝑀𝐴𝐶 on timestamp ► Bob selects a random number RAND as challenge
► Bob verifies 𝑀𝐴𝐶 by computing 𝑀𝐴𝐶 on received ► Alice computes a MAC on RAND using K
timestamp and comparing it to received 𝑀𝐴𝐶 ► Bob verifies that the received MAC corresponds to
► Bob checks if 𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 is in an acceptable range the one he computes using RAND as input
Unilateral authentication of A to B based on a private key 𝑠𝑘 of Alice assuming Bob knows Alice’s public key 𝑝𝑘
Alice Bob Alice Bob
𝑝𝑘 𝑝𝑘
𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥ 𝑅𝐴𝑁𝐷
sig𝑠𝑘 (𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝) 𝑠𝑖𝑔𝑠𝑘 (𝑅𝐴𝑁𝐷)
Check sig𝑠𝑘 with 𝑝𝑘
Verify 𝑠𝑖𝑔𝑠𝑘 𝑅𝐴𝑁𝐷
Verify 𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 is current
on sent 𝑅𝐴𝑁𝐷 with 𝑝𝑘
► Alice computes a signature on the current ► Bob selects a random number 𝑅𝐴𝑁𝐷 as challenge
timestamp (implicit challenge) using 𝑠𝑘 and sends it to Alice
► Sends the 𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 and the signature to Bob ► Alice computes a signature on 𝑅𝐴𝑁𝐷
► Bob verifies signature with 𝑝𝑘 and checks if ► Bob verifies that the received signature is a
𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 is in an acceptable range signature on the sent 𝑅𝐴𝑁𝐷
IT-Security - Chapter 5: Authentication and Key Establishment 8
Example Building Bocks for Mutual Entity Authentication
𝐾 𝐾 𝐾 𝐾
𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥ 𝑅𝐴𝑁𝐷𝐵
𝑀𝐴𝐶𝐾 (𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥ 𝐼𝐷𝐴)
𝑀𝐴𝐶𝐾 (𝑅𝐴𝑁𝐷𝐴 ∥ RANDB) ∥ RANDA
𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥
𝑀𝐴𝐶𝐾 (𝑅𝐴𝑁𝐷𝐵 ∥ RANDA)
𝑀𝐴𝐶𝐾 (𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥ 𝐼𝐷𝐵)
● Making A and B compute MACs on different messages, where each message contains input
controlled by the other part protects these building blocks from reflection attacks
𝑅𝐴𝑁𝐷𝐵
𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥
? ? ∥ 𝑅𝐴𝑁𝐷 ?
𝑀𝐴𝐶𝐾 (𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥ 𝐼𝐷𝐴)
Can’t compute
𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥ 𝑀𝐴𝐶𝐾(𝑅𝐴𝑁𝐷𝐵 ∥ 𝑅𝐴𝑁𝐷)
𝑀𝐴𝐶𝐾 (𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 ∥ 𝐼𝐷𝐴)
𝑀𝐴𝐶𝐾 (𝑅𝐴𝑁𝐷𝐵 ∥ 𝑅𝐴𝑁𝐷)
► Attacker can only reflect message including Alice’s ► Attacker can only reflect with the random number
ID which will be detected by Alice in Bob’s order not in the order expected from Alice
● Building Blocks for Entity Authentication ● Key Distribution with trusted Third Parties
► Signature-based authentication
There are two types of key establishment protocols § Computes 𝐸𝐾 (𝑆𝐾) and sends it to B
§ B decrypts 𝐸𝐾 (𝑆𝐾) with K and thus obtains 𝑆𝐾
► Key transport protocols
§ Key generated by one party, securely transported to the ► Diffie-Hellman key agreement (Chapter4)
§ shared key is derived from input of bother parties, e.g. § Parties exchange the public values
like in the Diffie-Hellman key agreement protocol § Each computes that key as function of own
private and other party’s public value
► Implicit key authentication: a party is generated and not a replayed old key
assured that no other party but a ► Perfect forward secrecy: a future compromise of long-
particular second party may gain access term keys does not compromise past session keys
to the established key ► Protection against known-key attacks: the
compromise of a past session key does not allow
Explicit key authentication
§ a passive adversary to compromise future session keys
► Implicit key authentication
§ an active attacker to impersonate a party in the future
► Key confirmation: a party is assured
that a second party has possession of
the established key
The objectives can hold for none, only one or both parties
𝐸𝐾 (𝑆𝐾) ones
► B decrypts 𝐸𝐾 (𝑆𝐾) with K and thus obtains 𝑆𝐾 § Yes, from A’s point of view
► Key freshness
§ Yes, from both parties’ point of view Choose random 𝑎 Choose random 𝑏
Compute 𝐴 = 𝑔( mod 𝑝 Compute 𝐵 = 𝑔) mod 𝑝
► Perfect forward secrecy
𝐴
§ Yes, future keys completely independent
Compute K = 𝐴) mod 𝑝
► Protection against known keys 𝐵
► Key freshness
§ Yes, from both parties’ point of view Choose 𝑎 Choose 𝑏
Compute 𝐴 = 𝑔( mod 𝑝 Compute 𝐵 = 𝑔) mod 𝑝
► Perfect forward secrecy
𝐴
§ Yes, future keys completely independent
Compute K = 𝐴) mod 𝑝
► Protection against known keys 𝐵
● 𝑆𝐾 often used to derive additional keys, e.g. RANDs Key establishment protocol
● Building Blocks for Entity Authentication ● Key Distribution with trusted Third Parties
► Signature-based authentication
► The key distribution center helps to establish ► The certification authority helps to distribute
keys between its clients authentic copies of public keys
► The key distribution center helps to establish ► The certification authority helps to distribute
keys between its clients authentic copies of public keys
● Certification Authority
Certificate
► Sings a certificate for each of its clients
owner ID
► Certificate
§ owner ID: identifier of the owner of the public key public key of owner
§ public key of owner
issuer ID
§ issuer ID: identifier for the CA that issued the certificate
validity period
§ Validity period: not before, until dates defining when this
certificate becomes valid and when it expires signature of issuer
§ Signature of the issuing CA on all of the content of the
certificate, binds public key to owner ID
► CRL includes serial numbers of all revoked the revocation status of certificates
► Disadvantage: revocation only as timely as ► May add additional overhead and requires
period used to publish CRLs connectivity to the OSCP server
validity period
verify
signature of CA
validity period
verify
signature of CA
● Building Blocks for Entity Authentication ● Key Distribution with trusted Third Parties
► Signature-based authentication
► Mainly because they cannot remember random Potential Passwords Passwords Selected by Users
Banking PINS
● General recommendation
somewhere Key
► Decryption adds overhead a57987a344d32336
Store 𝐡 𝒑𝒘𝒅 using a cryptographic hash function Better: store random salt and 𝐡 𝒑𝒘𝒅 ∥ 𝒔𝒂𝒍𝒕
► Attacker only learns hashes from file ► Now users using the same passwords will
● Dictionary
Attack on a stolen password file with salts
► List of commonly used passwords
► Compute 𝐡 𝒑𝒘𝒅 ∥ 𝒔𝒂𝒍𝒕 for any 𝑠𝑎𝑙𝑡 in
● Dictionary attack the password file and any 𝑝𝑤𝑑 in the
dictionary
Compute
𝑺𝑲 = 𝐻𝑀𝐴𝐶𝑲(𝑅𝐴𝑁𝐷𝐴 ∥ RANDB)
Verify 𝑀𝐴𝐶 received
► an unforgeable proof that the other entity is active in the current protocol
► unilateral or mutual
► be based on
§ secret keys using message authentication codes
§ or public/private key pairs
► key freshness
► The larger the alphabet and the longer the password the stronger the password is
● W. Stallings, Cryptography and Network Security: Principles and Practice, 8th edition, Pearson 2022