580 likes | 759 Views
GOPAS TechEd 2012. Ing. Ondřej Ševeček | GOPAS a.s. | MCM: Directory Services | MVP: Enterprise Security | ondrej@sevecek.com | www.sevecek.com |. PKI Design. PKI Design. Algorithms. Cryptographic Algorithms. Hash algorithms no keys MD4, MD5, SHA-1, SHA-256, SHA-384, SHA-512
E N D
GOPAS TechEd 2012 Ing. Ondřej Ševeček | GOPAS a.s. | MCM: Directory Services | MVP: Enterprise Security | ondrej@sevecek.com | www.sevecek.com | PKI Design
PKI Design Algorithms
Cryptographic Algorithms • Hash algorithms • no keys • MD4, MD5, SHA-1, SHA-256, SHA-384, SHA-512 • Symmetric key algorithms • secret key • RC4, DES, 3-DES, AES • Asymmetric key algorithms • public and private key • RSA, DH, EC
PKI Design Thoughts ON Hashing
Hash example (not good) • Sum alphabet letter positionsHELLO = 8 + 5 + 12 + 12 + 15 = 52 • Can obtain arbitrary clear-text (collision) without brute-forcing • Several 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: 4E9618C9D... 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
PKI Design Algorithm Combinations
Performance considerations • Asymmetric algorithms use large keys • EC is about 10 times smaller • Encryption/decryption time about 100x longer • symmetric is faster
Digital Signature (not good) 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) Symmetric key
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
PKI Design Fun With Random Numbers
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, …
PKI Design 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)
NSA Suite-B Algorithms • NSA publicly published algorithms (2005) • as against Suite-A which is private • AES-128, ECDH-256, ECDSA-256, SHA-256 • Secret • AES-256, ECDH-384, ECDSA-384, SHA-384 • Top Secret
PKI Design OperatinG System Support
Cryptographic Providers • Cryptographic Service Provider – CSP • Windows 2000+ • can use only V1 and V2 templates • Cryptography Next Generation – CNG • Windows Vista+ • require V3 templates • enables use of ECC • CERTUTIL -CSPLIST
SHA-2 Support • Windows XP • Windows 2003 + KB938397 • Windows Phone 7 • AD CS on Windows 2008+ • Autoenrollment on XP with KB • TMG 2010 with KB in the future
CNG (v3) Not Supported • EFS • Windows 2008/Vista- • VPN/WiFi Client (EAPTLS, PEAP Client) • Windows 2008/7- • user or computer certificate authentication • TMG 2010 • server certificates on web listeners • Outlook 2003 • user email certificates for signatures or encryption • Kerberos • Windows 2008/Vista- DC certificates • System Center Operations Manager 2007 R2System Center Configuration Manager 2007 R2 • SQL Server 2008 R2- • Forefront Identity Manager 2010 (Certificate Management)
PKI Design CA Hierarchy
CA Hierarchy IDTT Root CA IDTT Roma CA IDTT London CA IDTT Paris CA Leaf certificate Leaf certificate Leaf certificate Leaf certificate Leaf certificate Leaf certificate Leaf certificate Leaf certificate Leaf certificate Leaf certificate
Offline Root • Root CA cannot be revoked if compromised • Making new RootCA trusted may be difficult • Delegation of administration • Must issue CRLs • the more frequent the more secure, but more “costly”
Active Directory • Group Policy • every 120 minutes by default • Trusted Root CAs • Untrusted CAs • NTAuth CA issues logon certificates
PKI Design AD CS Features
Role Separation • Enrollment Agent = Registration Authority • sign cert request • Certificate Managers • approve cert requests • Different groups of EA/CM approve requests for different groups of Enrollees
PKI Design Public Certificates
SSL Certificate prices • Verisign – 1999 • 300$ year • Thawte – 2003 • 150$ year • Go Daddy – 2005 • 60$ year • GlobalSign – 2006 • 250$ year • StartCom – 2009 • free
EV Certificate prices • Verisign – 1999 • 1500$ year • Thawte – 2003 • 600$ year • Go Daddy – 2005 • 100$ year • GlobalSign – 2006 • 900$ year • StartCom – 2009 • 50$ year