SlideShare une entreprise Scribd logo
1  sur  49
Cryptography and SSL in Smalltalk Martin Kobetic Cincom Smalltalk Development January 2003
Cryptography ,[object Object],[object Object],[object Object],[object Object]
Cryptography ,[object Object],[object Object],[object Object],[object Object],[object Object]
Secure Solutions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cryptographic Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Encryption ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Secret Key Ciphers ,[object Object],[object Object],[object Object],[object Object],[object Object]
Secret Key Ciphers ,[object Object],[object Object],[object Object],[object Object],[object Object]
Secret Key Ciphers ,[object Object],10 12 yrs 3s .01s .2  s $1T 10 15 yrs 1h 13s .2ms $1G 10 18 yrs 37d 3.5h .2s $1M 10 19 yrs 1yr 35h 2s $100K 128b 64b 56b 40b
Stream Ciphers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],RC4 (1992) next key-stream byte: i = (i + 1) mod 256 j = (j+S i ) mod 256 swap S i  and S j t = (S i  + S j ) mod 256 K = S t S-Box initialization: S = 0, ..., 255 K = 256B of replicated key for i=0 to 255: j = (j + S i  + K i ) mod 256 swap S i  and S j
Stream Ciphers - KAK ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Stream Ciphers - CTAK ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers ,[object Object],[object Object],[object Object]
DES (1977) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - Padding ,[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - Padding ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - ECB ,[object Object],[object Object],[object Object],[object Object]
Block Ciphers - CBC ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - CBC ,[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - OFB ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - CTR ,[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - CFB ,[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - Mixing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Block Ciphers - Mixing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
AES (2001) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Blowfish (1993) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Public Key Ciphers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Public Key Ciphers ,[object Object],[object Object],[object Object],2304 1792 768 512 384 128 112 80 64 56
RSA (1977) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RSA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hash Functions ,[object Object],[object Object],[object Object],[object Object]
Hash Functions ,[object Object],[object Object],[object Object],[object Object],[object Object]
Hash Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MD5 (1992) ,[object Object],[object Object],[object Object],[object Object]
SHA (1993) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Message Authentication ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
HMAC ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Digital Signatures ,[object Object],[object Object],[object Object],[object Object]
RSA ,[object Object],[object Object],[object Object],[object Object],[object Object]
DSA (1994) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DSA ,[object Object],[object Object],[object Object],[object Object],[object Object]
Key Management ,[object Object],[object Object],[object Object],[object Object]
Diffie-Hellman (1976) ,[object Object],[object Object],[object Object]
Diffie-Hellman ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Digital Certificates ,[object Object],[object Object],[object Object],[object Object],[object Object]
X.509 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Random Numbers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SSL ,[object Object],[object Object]

Contenu connexe

Tendances

ImplementingCryptoSecurityARMCortex_Doin
ImplementingCryptoSecurityARMCortex_DoinImplementingCryptoSecurityARMCortex_Doin
ImplementingCryptoSecurityARMCortex_Doin
Jonny Doin
 
How to write rust instead of c and get away with it
How to write rust instead of c and get away with itHow to write rust instead of c and get away with it
How to write rust instead of c and get away with it
Flavien Raynaud
 
Go Native : Squeeze the juice out of your 64-bit processor using C++
Go Native : Squeeze the juice out of your 64-bit processor using C++Go Native : Squeeze the juice out of your 64-bit processor using C++
Go Native : Squeeze the juice out of your 64-bit processor using C++
Fernando Moreira
 
Aprils fool 2014
Aprils fool 2014Aprils fool 2014
Aprils fool 2014
bijan_
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
FFRI, Inc.
 

Tendances (20)

Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
 
ImplementingCryptoSecurityARMCortex_Doin
ImplementingCryptoSecurityARMCortex_DoinImplementingCryptoSecurityARMCortex_Doin
ImplementingCryptoSecurityARMCortex_Doin
 
How to write rust instead of c and get away with it
How to write rust instead of c and get away with itHow to write rust instead of c and get away with it
How to write rust instead of c and get away with it
 
Go Native : Squeeze the juice out of your 64-bit processor using C++
Go Native : Squeeze the juice out of your 64-bit processor using C++Go Native : Squeeze the juice out of your 64-bit processor using C++
Go Native : Squeeze the juice out of your 64-bit processor using C++
 
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
 
Introducing redis
Introducing redisIntroducing redis
Introducing redis
 
Rust vs C++
Rust vs C++Rust vs C++
Rust vs C++
 
SSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and SchedulingSSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and Scheduling
 
Tuga IT 2017 - Redis
Tuga IT 2017 - RedisTuga IT 2017 - Redis
Tuga IT 2017 - Redis
 
Aprils fool 2014
Aprils fool 2014Aprils fool 2014
Aprils fool 2014
 
.NET 2015: Будущее рядом
.NET 2015: Будущее рядом.NET 2015: Будущее рядом
.NET 2015: Будущее рядом
 
Lec06
Lec06Lec06
Lec06
 
0 to 31337 Real Quick: Lessons Learned by Reversing the Flare-On Challenge
0 to 31337 Real Quick: Lessons Learned by Reversing the Flare-On Challenge0 to 31337 Real Quick: Lessons Learned by Reversing the Flare-On Challenge
0 to 31337 Real Quick: Lessons Learned by Reversing the Flare-On Challenge
 
System Calls
System CallsSystem Calls
System Calls
 
Whispered secrets
Whispered secretsWhispered secrets
Whispered secrets
 
Score (smart contract for icon)
Score (smart contract for icon) Score (smart contract for icon)
Score (smart contract for icon)
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
 
Defcon 23 - Daniel Selifonov - drinking from LETHE
Defcon 23 - Daniel Selifonov - drinking from LETHEDefcon 23 - Daniel Selifonov - drinking from LETHE
Defcon 23 - Daniel Selifonov - drinking from LETHE
 
IT6712 lab manual
IT6712 lab manualIT6712 lab manual
IT6712 lab manual
 

En vedette

Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computation
prasadmvreddy
 
6. cryptography
6. cryptography6. cryptography
6. cryptography
7wounders
 
Biometric security using cryptography
Biometric security using cryptographyBiometric security using cryptography
Biometric security using cryptography
Sampat Patnaik
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
patisa
 

En vedette (20)

Cryptography
CryptographyCryptography
Cryptography
 
File+upload+test
File+upload+testFile+upload+test
File+upload+test
 
computer-security-and-cryptography-a-simple-presentation
computer-security-and-cryptography-a-simple-presentationcomputer-security-and-cryptography-a-simple-presentation
computer-security-and-cryptography-a-simple-presentation
 
PKI by Tim Polk
PKI by Tim PolkPKI by Tim Polk
PKI by Tim Polk
 
Securitych1
Securitych1Securitych1
Securitych1
 
Cryptography ppt
Cryptography pptCryptography ppt
Cryptography ppt
 
Wireless Network Security
Wireless Network SecurityWireless Network Security
Wireless Network Security
 
Network security and cryptography
Network security and cryptographyNetwork security and cryptography
Network security and cryptography
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Theory of computation Lec1
Theory of computation Lec1Theory of computation Lec1
Theory of computation Lec1
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computation
 
6. cryptography
6. cryptography6. cryptography
6. cryptography
 
Cryptography - An Overview
Cryptography - An OverviewCryptography - An Overview
Cryptography - An Overview
 
Biometric security using cryptography
Biometric security using cryptographyBiometric security using cryptography
Biometric security using cryptography
 
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Network Security Fundamentals
Network Security FundamentalsNetwork Security Fundamentals
Network Security Fundamentals
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 

Similaire à Cryptography and SSL in Smalltalk - StS 2003

12 symmetric key cryptography
12   symmetric key cryptography12   symmetric key cryptography
12 symmetric key cryptography
drewz lin
 
Computer network (3)
Computer network (3)Computer network (3)
Computer network (3)
NYversity
 
Cybersecurity Research Paper
Cybersecurity Research PaperCybersecurity Research Paper
Cybersecurity Research Paper
Shubham Gupta
 

Similaire à Cryptography and SSL in Smalltalk - StS 2003 (20)

introduction to cryptography
introduction to cryptographyintroduction to cryptography
introduction to cryptography
 
crypto1.ppt
crypto1.pptcrypto1.ppt
crypto1.ppt
 
needed.ppt
needed.pptneeded.ppt
needed.ppt
 
introduction to cryptography (basics of it)
introduction to cryptography (basics of it)introduction to cryptography (basics of it)
introduction to cryptography (basics of it)
 
crypto.ppt
crypto.pptcrypto.ppt
crypto.ppt
 
12 symmetric key cryptography
12   symmetric key cryptography12   symmetric key cryptography
12 symmetric key cryptography
 
Computer network (3)
Computer network (3)Computer network (3)
Computer network (3)
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batch
 
6.hash mac
6.hash mac6.hash mac
6.hash mac
 
AllBits presentation - Security in Theory
AllBits presentation - Security in TheoryAllBits presentation - Security in Theory
AllBits presentation - Security in Theory
 
A TLS Story
A TLS StoryA TLS Story
A TLS Story
 
Encryption
EncryptionEncryption
Encryption
 
Module 1-Block Ciphers and the Data Encryption Standard.pptx
Module 1-Block Ciphers and the Data Encryption Standard.pptxModule 1-Block Ciphers and the Data Encryption Standard.pptx
Module 1-Block Ciphers and the Data Encryption Standard.pptx
 
Overview on Cryptography and Network Security
Overview on Cryptography and Network SecurityOverview on Cryptography and Network Security
Overview on Cryptography and Network Security
 
Cybersecurity Research Paper
Cybersecurity Research PaperCybersecurity Research Paper
Cybersecurity Research Paper
 
Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)
 
TLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkTLS/SSL Internet Security Talk
TLS/SSL Internet Security Talk
 
Getting Started with Raspberry Pi - DCC 2013.1
Getting Started with Raspberry Pi - DCC 2013.1Getting Started with Raspberry Pi - DCC 2013.1
Getting Started with Raspberry Pi - DCC 2013.1
 
Ntewrok secuirty cs7
Ntewrok secuirty cs7Ntewrok secuirty cs7
Ntewrok secuirty cs7
 

Cryptography and SSL in Smalltalk - StS 2003

  • 1. Cryptography and SSL in Smalltalk Martin Kobetic Cincom Smalltalk Development January 2003
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.

Notes de l'éditeur

  1. hot air, bag of tricks, no proofs but growing lists of weaknesses
  2. peer review vs security through obscurity
  3. value of the protected entity cost of protection cost of breaking the protection understand the properties thoroughly e.g. latest side-channel (timing) attacks on SSL server implementations
  4. confidentiality - prevent eavesdropping (passive attack) integrity - prevent undetected modification (active attack) authentication - proof of origin (active attack) non-repudiation - undeniable proof of origin SSL provides authentication but doesn’t provide non-repudiation SMIME does both (theoretically) point-to-point vs end-to-end
  5. Hardware implementations
  6. Key stream reuse disastrous, xoring 2 ciphertexts yields 2 xored plaintexts, easy to break (P1 xor K) xor (P2 xor K) = P1 xor (K xor K) xor P2 = P1 xor P2
  7. - RC4
  8. DEA (ANSI), DEA-1 (ISO) Lucifer descendant (IBM), NSA evaluated reviewed every 5 years 1983 – recertified, 1987 – recertified “last time” after public outcry 1993 – recertified, still no alternatives 1999 – reaffirmed 3DES, AES not finished yet
  9. ADV: parallelization DIS: plaintext patterns, manipulation, synchronization, noise
  10. IV should be unique, but doesn’t have to be secret (pseudo random, timestamp value, counter, …) ADV: decryption parallelizable, random access DIS: synchronization, noise
  11. N-bit OFB: smaller than block processing No need to pad. Doesn’t need decryption operation.
  12. Nonce: usually message number combined with additional data to guarantee uniqueness N-bit CTR: smaller than block processing No need to pad. Doesn’t need decryption operation.
  13. N-bit CFB: smaller than block processing No need to pad. Doesn’t need decryption operation.
  14. double encryption – meet in the middle attach 2^n+1 instead of 2^2n tripple encryption – 2key or 3key cascading – beware of algorithm interactions
  15. Rijndael – Joan Daemen, Vincent Rijmen (Netherlands) Serpent – Ross Anderson (Cambridge, UK) Twofish – Bruce Schneier (Counterpane Inc) MARS – Don Coppersmith (IBM) RC6 – Ron Rivest (RSA Labs)
  16. much slower: expensive operations, sparse key space (much longer keys) eliptic curve crypto – same ciphers, different number field (faster)
  17. no good for a small set of plaintexts (dictionary attack) encryption key is public => attacker can get as much chosen plaintext as she wants
  18. Rivest, Shamir, Adelman use small e to optimize encryption/verification don’t use the same key to encrypt and sign; decrypting c is the same operation as signing c ! don’t reuse n (more material for cryptanalysis) not good with small messages; if modular reduction doesn’t occur (good chance with small e), the plaintext can be recoverd by simple (non-modular) e-th root computation; in fact any kind of structure in the message seems to facilitate attacks; messages should be protected against that using suitable “encoding” (PKCS#1 v2.1 – OAEP)
  19. MD-strengthening: with inclusion of the length no encoded input is a prefix of another encoded input “ length extension attack”: if M2 = M1’ || X => h(M2) = h ( h (M1) || X)) M1’ means, the original M1 message padded as prescribed by the hash function possible fixes: h(h(M), M) – expensive, or h(h(M)) - weaker; MACs usually address the weakness as well
  20. can get digest value in progress can clone a digest in progress blockSize, digestSize
  21. CBC-MAC: encrypt the message in CBC mode and throw away all but last block of ciphertext. don’t forget MD-strengthening and paddding SSL 3.0 MAC (1996) hash(MAC_write_secret + pad_2 + (hash(MAC_write_secret + pad_1 + seq_num + type + length + content))
  22. - all usual hash API applies
  23. - expand the digest to match the bit-size of n (seed a random generator with the digest and use as many bytes as possible)
  24. man-in-the-middle attack small subgroup attack - small order g ss is in that subgroup, if the group is small enough, it can be searched for solution: safe primes p = 2q + 1; q prime optimization - using smaller, but sufficiently large subgroups: p = Nq + 1; q prime (> 160b); N suitably large integer find g of order q (mod p), thus g > 1 and g^q=1 (mod p) then any r^e = r^(e mod q) (mod p), for any r from the subgroup. consequently 1 < x < q always check that received value belongs to the subgroup, i.e. 1 < r < p and r^q = 1