Applications of Cryptography Flashcards
What are the goals of cryptography ?
- Protection of data in transfer over insecure channel
- Protection of data in storage on untrusted media
- Confidentiality (prevent attacks)
- Integrity (detect attacks)
- Authenticity, origin of data (detect attacks)
What is a hash function ?
Take input of arbitrary length and map it to output with fixed length, e.g. 512 bits
What are the requirements for a hash function ?
Requirements for one-way hash function h
(easy to compute image, hard to compute source)
1. Ease of computation: given x, it is easy to compute h(x)
2. Compression: h maps inputs x of arbitrary bitlength to
outputs h(x) of a fixed bitlength n
3. One-way: given a value y, it is computationally infeasible to find an input x so that h(x) = y
4. Collision resistance: it is computationally infeasible to
find x and x’ where x /= x’ with h(x) = h(x’)
Name some frequentliy used hash functions.
- MD5: 128 bit digest
Has been broken; no longer recommended for cryptography
(But still good for e.g. fast file comparisons) - SHA-1 (“Secure Hash Algorithm”): 160 bit digest
Attacks exist; replacement recommended - SHA-2 (SHA-256/384/512), RIPEMD-160:
Still considered secure - SHA-3 as potential replacement for SHA-2 in case SHA-2 turns out to be broken
What is the differnces between a symetric and an asymetric cryptosystem ?
Symmetric cryptosystem
– Both parties use same (secret) key
Trusted channel needed to distribute key
– Fast
Asymmetric cryptosystem
– Parties have a public key (for encryption) and a private key (for decryption)
Public key can be announced in a public directory
– Slow
How does a hybrid of symetric and asymetric work ?
Generate a secret session key for a symmetric cryptosystem
Use asymmetric encryption to transmit session key
Encrypt further messages with received session key
How does the key distribution in a symetric system work ?
n parties ->
𝑛 𝑥 (𝑛−1)
2
keys (1 key per pair of parties)
Distribute secret keys in advance over trustworthy channel
How does the key distribution in a asymetric system work ?
n parties -> 2 𝑥 𝑛 keys (1 public, 1 private key per party)
Distribute only public keys in advance
Integrity+authenticity of public keys essential
How does the key distribution in a hybrid system work ?
n parties -> 2 𝑥 𝑛 keys (1 public, 1 private key per party)
Secret session key generated when needed
needs good random number generator
What is an electronic signature ?
Proof of authenticity and integrity of data
Legal recognition on same level as handwritten signature
Where are electronic signatures used ?
- Email integrity and authenticity (e.g. S/MIME, PGP)
- Submission of tax returns
- Electronic invoices
- Communication between lawyers and courts
- Emission trading
- Certificates of origin (cross-border transports)
- E-BAföG