710 likes | 896 Views
Ondřej Ševeček | PM Windows Server | GOPAS a.s. | MCM: Directory Services | MVP: Enterprise Security | ondrej@sevecek.com | www.sevecek.com |. Windows PKI. Outline. Hash algorithms Symmetric algorithms Asymmetric algorithms Current algorithms in use Cryptographic standards
E N D
Ondřej Ševeček |PM Windows Server| GOPAS a.s. | MCM: Directory Services | MVP: Enterprise Security | ondrej@sevecek.com | www.sevecek.com | Windows PKI
Outline • Hash algorithms • Symmetric algorithms • Asymmetric algorithms • Current algorithms in use • Cryptographic standards • Operating system support
Security Services • Confidentiality • Data Integrity • accidental vs. deliberate modification • Authentication • plus role-based authentication when more individuals share authentication information • Authorization • Non-repudiation • key establishment and random number
Cryptographic Algorithms • Hash algorithms • no keys • Symmetric key algorithms • secret key • Asymmetric key algorithms • public and private key
Cryptography HASH Algorithms
Hashing Clear-text Hash hash
Hash • Data authentication and integrity • in conjunction with keys • HMAC – Hashed Message Authentication Code • Compression of messages for digital signatures • Deriving keys • Generation of deterministic random numbers
Incorrect hash example • Sum alphabet letter positionsHELLO = 8 + 5 + 12 + 12 + 15 = 52 • Can obtain arbitrary clear-text (collision) without brute-forcing • Two similar clear-texts lead to similar output
Hash collisions • Pure arithmetic collisions • limited exploitability • Post-signing collisions • Chosen-prefix collisions
Post-signing collision Name: Ondrej Name: Ondrej Owes: 100 $ Owes: 1 000 000 $ To: Kamil To: Kamil Hash: 14EEDA49C1B7 Trash: XX349%$@#BB... Signature: 3911BA85 Hash: 14EEDA49C1B7 Signature: 3911BA85
Chosen-prefix collision Serial #: 325 Serial #: 325 CN: www.idtt.com CN: www.microsoft.com Valid: 2010 Valid: 2010 Public: 35B87AA11... Public: 4B3318C9D... Hash: 24ECDA49C1B7 Hash: 24ECDA49C1B7 Signature: 5919BA85 Signature: 5919BA85
MD5 problems • Pure arithmetic in 2^112 evaluations • Post-signing collisions suspected • Chosen-prefix collisions • Practically proved for certificates with predictable serial numbers • 2^50
SHA-1 problems • General brute-force attack at 2^80 • as about 12 characters complex password • Some collisions found at 2^63 • pure arithmetic collisions, no exploitation proved
Cryptography Symmetric Algorithms
Symmetric key • Data confidentiality • Authentication and integrity • MAC – Message Authentication Code, single key to generate, the same to validate • Key establishment • Generation of deterministic random numbers
Password and key Clear-text Password Hash Cipher Key Cipher-text
Encryption key Key Clear-text Cipher Key Cipher-text
Cryptography Asymmetric Algorithms
Asymmetric keys • Digital signatures • Key establishment • Generation of random numbers
Encryption and decryption keys Encryption key Clear-text Cipher Decryption key Cipher-text
Private and public key Private key Signing Public key Signature validation Public key Signature validation Public key Signature validation
Private and public key Private key Decryption Public key Signature validation Public key Signature validation Public key Encryption
Performance considerations • Asymmetric algorithms use large keys • EC is about 10 times smaller • Encryption/decryption time about 100x longer • symmetric is faster
Digital Signature (incorect) Document Private key Document
Digital Signature Document Private key Hash
Storage Encryption (slow) Public key Document
Storage Encryption Symmetric encryption key (random) Document Public key (User A) Public key (User B) Symmetric key Symmetric key
Transport encryption Public key Server Client Public key Symmetric Key Symmetric Key Data
Diffie-Hellman Key Exchange • Asymmetric algorithm for key exchange • most commonly used for key exchange • Automatically generates the same encryption key for symmetric encryption on both sides
Digital Signature and time stamping (incorrect) Document Private key Hash Timestamp
Time authority (incorrect) Document Private key TA private key Hash Timestamp
Time authority (correct) Document Private key TA private key Hash Hash Timestamp
Time authority (correct) Document Private key TA private key Hash Hash Timestamp Public key
Random Number Generators • Deterministic RNG use cryptographic algorithms and keys to generate random bits • attack on randomly generated symmetric keys • DNS cache poisoning • Nondeterministic RNG (true RNG) use physical source that is outside human control • smart cards, tokens • HSM – hardware security modules
Random Number Generators • CryptGenRandom() • hashed • Vista+ AES (NIST 800-900) • 2003- DSS (FIPS 186-2) • Entropy from • system time, process id, thread id, tick counter, virtual/physical memory performance counters of the process and system, free disk clusters, user environment, context switches, exception count, …
Random Number Generators • new Random() • just a time seed • several instances created simultaneously may have the same seed
Cryptography Current Algorithms
Symmetric algorithm history • DES (1976, 56 bit) • 3DES, TDEA (1998, 168/112 bit) • RC4 (1987, 128 bit) • AES-128, AES-192, AES-256 (2001)
Hash algorithm history • MD4 (1990, 128 bit) • MD5 (1991, 128 bit) • SHA-1 (1995, 160 bit) • SHA-224, SHA-256, SHA-384, SHA-512 (2001)
Asymmetric algorithm history • RSA (1973) • DSA (1991) • ECDSA (2000) • ECDH (2000)
Cryptography Cryptographic Standards
US standards • FIPS – Federal Information Processing Standards • provides standard algorithms • NIST – National Institute for Standards and Technology • approves the algorithms for US government non-classified but sensitive use • latest NIST SP800-57, March 2007 • NSA – National Security Agency • Suite-B for Secure and Top Secure (2005)
Hash functions (SP800-57) • SHA-1 • hash size output is 160 • SHA-2 • SHA-224, SHA-256, SHA-384, SHA-512 • hash size output is 224, 256, 384, 512
Symmetric key (SP800-57) • AES-128, AES-192, AES-256 • encrypts data in 128-bit blocks • uses 128, 192, 256-bit keys • Triple DEA (TDEA) • encrypts data in 64-bit blocks • uses three 56-bit keys
Digital Signatures (SP800-57) • DSA (Digital Signature Algorithm) • key sizes of 1024, 2048 and 3072-bit • produces 320, 448, 512-bit signatures • RSA (Rivest – Shamir – Adleman) • key sizes according to FIPS186-3 • ECDSA (Elliptic Curve DSA) • key sizes of at least 160-bit • produces 2x key length signatures • types of curves specified in FIPS186-3
Cryptography Operating System Support