...you could just tattoo the key onto the shaved head of a slave, wait for his hair to grow back, and then send the recipient of your message the slave.
Unfortunately, that approach doesn't scale very well. ...
"Public key cryptography is a hidden but fundamental part of modern life: even quantum leaps in computing technology aren't going to make it go away."
You're thinking in terms of, say, using the known format of a protocol header to attempt to figure out the key and so decrypt the rest of the network packet?toyotabedzrock":263qiqc7 said:If the structure and length of a message encrypted using the public key is captured and is short enough couldn't the message eventually be devised and then the rest of the session would also be readable. Of course there would be a delay.
Public key encryption must be randomized, meaning mulitple encryptions using the same public key produce completely unrelated-looking ciphertexts. So encrypting every possible short message would likely not produce an encryption that matches the one you already saw. Not sure if that's the attack you had in mind.toyotabedzrock":21gabrew said:If the structure and length of a message encrypted using the public key is captured and is short enough couldn't the message eventually be devised and then the rest of the session would also be readable. Of course there would be a delay.
My point was that the underlying assumptions aren't known to be secure. They're only thought to be secure. (But the more standard ones have been extensively studied and nobody has found a weakness...as far as we know (and without using a quantum computer).)bsiu":1o7rm4b1 said:The underlying math is supposedly secure, as Solomonoff's Secret points out.
Interesting article, thanks. Could anyone elaborate on large 'distinct' prime numbers and how that works in this context? Maybe provide examples? In a bit of searching I found a definition of distinct primes but without much of a background in this aspect of crypto I'm a bit in the dark. And by 'bit', I mean really.Choose two large, distinct prime numbers, called p and q.
Yes, correct, I've amended the post. You would want the private key corresponding to the certificate, then you could phish away.Bob.Brown":eak34av4 said:Unless I've missed something fundamental, what I really need is the bank's private key. The certificate contains the public key, as explained in the article. In fact, there's a copy of my bank's SSL certificate in my browser's certificate cache. I could set up a phishing site with it, but I'd be unable to decrypt the SSL pre-master secret sent to me by victim browsers, and the SSL/TLS handshake would fail.Break into a bank's Web server and take its HTTPS certificate and you can stick your own server on the Web and run the perfect phishing site
Distinct here just means that they are different prime numbers. That is, you can't just choose one number twice.cdclndc":n8djts7k said:Interesting article, thanks. Could anyone elaborate on large 'distinct' prime numbers and how that works in this context? Maybe provide examples? In a bit of searching I found a definition of distinct primes but without much of a background in this aspect of crypto I'm a bit in the dark. And by 'bit', I mean really.Choose two large, distinct prime numbers, called p and q.
Thanks!
If I encrypt "BUY" or "SELL" using Alice's public key and if Evil Eve knows I'll send one of those two messages and Eve can {ahem} eavesdrop on my communications, all she's got to do is encrypt both messages with Alice's public key and see which bits go by. That's one of the big advantages of the use of a random session key and hybrid encryption.Solomonoff's Secret":3j2mc16d said:Public key encryption must be randomized, meaning mulitple encryptions using the same public key produce completely unrelated-looking ciphertexts. So encrypting every possible short message would likely not produce an encryption that matches the one you already saw. Not sure if that's the attack you had in mind.
No, that doesn't work. Eve would see, say, 394783210125435349. Eve would encrypt "BUY" and "SELL" and would get 6450972965346592346 and 93426527362593535. Eve would still know nothing about which message Alice sent.Bob.Brown":2gpailr7 said:If I encrypt "BUY" or "SELL" using Alice's public key and if Evil Eve knows I'll send one of those two messages and Eve can {ahem} eavesdrop on my communications, all she's got to do is encrypt both messages with Alice's public key and see which bits go by. That's one of the big advantages of the use of a random session key and hybrid encryption.
If it's wholly divisible then you then factorize the number that's left over, starting back at 2.
Correct, updated, thanks.nodmonkey":u7eo6i4f said:If it's wholly divisible then you then factorize the number that's left over, starting back at 2.
You only have to start back with the last prime you successfully divided by.
Solomonoff's Secret":3bgc1dz8 said:No, that doesn't work. Eve would see, say, 394783210125435349. Eve would encrypt "BUY" and "SELL" and would get 6450972965346592346 and 93426527362593535. Eve would still know nothing about which message Alice sent.Bob.Brown":3bgc1dz8 said:If I encrypt "BUY" or "SELL" using Alice's public key and if Evil Eve knows I'll send one of those two messages and Eve can {ahem} eavesdrop on my communications, all she's got to do is encrypt both messages with Alice's public key and see which bits go by. That's one of the big advantages of the use of a random session key and hybrid encryption.
Generally, in order for public key encryption to be secure (against chosen-plaintext attacks, in other words, CPA-secure), it needs to pass the following game. Choose a security parameter k, a positive integer that basically determines the key length. Alice generates a key pair for the chosen k. Let Eve be some adversary and choose two messages m1 and m2. Alice chooses a random message m among m1 and m2 to encrypt with the key, getting encryption c. Eve gets the public key, m1, m2, and c but doesn't know which message was encrypted to get c. Eve can repeatedly choose messages to encrypt and see the encryptions. Eventually, she has to decide which of m1 and m2 was encrypted to get c. If she can guess with probably non-negligibly better than 1/2, specifically, 1/2 + 1/p(k) for some polynomial p, she wins. If any Eve wins with any messages m1 and m2, the algorithm is insecure.
bsiu":ukuckafb said:Great article, Peter. Congratulations.
Will you followup with a write up on all that can go wrong with PKI? CAs being compromised, CRIME and BEAST attacks, etc. All of these are practical attacks. The underlying math is supposedly secure, as Solomonoff's Secret points out.
--B
Aha! That explains it. Although Evil Eve can see the (encrypted) 64 bits of padding, she cannot decrypt them without the corresponding private key. So, with a small number of known plaintext possibilities, Eve must make 2^64 or more encryption computations for each known plaintext possibility.Stubabe":ce7te454 said:[snip] PAD is a zero terminated padding field (of not less than 8 random bytes) that is filled with random non-zero bytes so a minimum of 2^64 bytes of entropy to randomise the message.
p and q are prime; e and d and phiEricOnTheWebz":3zdmkivz said:Nevermind
DrPizza":c8kntkai said:Perhaps oddly (it always seems odd to me, at any rate) picking prime numbers is relatively easy; there are "fast" algorithms (here "fast" means "polynomial time") for proving that a number is composite (not a prime). However, those algorithms don't tell you what the number's factors are; only that they exist. It seems strange that you can do one without the other.
Is AKS not fast enough to use in practice? It's deterministic and polynomial time, but even polynomial time doesn't guarantee that constant factors don't kill you.Stubabe":2hgfgtfy said:DrPizza":2hgfgtfy said:Perhaps oddly (it always seems odd to me, at any rate) picking prime numbers is relatively easy; there are "fast" algorithms (here "fast" means "polynomial time") for proving that a number is composite (not a prime). However, those algorithms don't tell you what the number's factors are; only that they exist. It seems strange that you can do one without the other.
They all basically on the fact that that certain relationships only hold if the number is prime, otherwise terms start to cancel internally.
e.g.
Fermat’s Little Theorem states for any prime number p, and for any number a such that 0 < a < p
a^(p − 1) = 1 (mod p).
For non primes p if a has any common factors then the equation will fail. Obviously trying every possible a isn't going to be any faster than trial factoring but rearrangements of formulas such as these allows faster systems to be produced. Also remember that many primeality tests are probabilistic (i.e. you would keep trying different values of a until the odds p isn't prime are vanishingly small) since absolute primeality testing of RSA sized primes would still take many hours on a modern computer so would make keygen too slow. e.g. for RSA keygen you normally aim for odds less that 1 in 2^100 that p is composite.
Of course you not only have to worry about the constant factor, but also the power. I don't know if there's a tight bound on the running time of AKS, but the known bounds have relatively high powers, so it'd probably be quite slow for large primes.DrPizza":2oewa6k7 said:Is AKS not fast enough to use in practice? It's deterministic and polynomial time, but even polynomial time doesn't guarantee that constant factors don't kill you.
DrPizza":20tmuyn9 said:Is AKS not fast enough to use in practice? It's deterministic and polynomial time, but even polynomial time doesn't guarantee that constant factors don't kill you.
DrPizza":18vq5rzu said:And before anyone says; yes, I know that RSA isn't the only key exchange algorithm in common use. I'm not ignoring Diffie Hellman through ignorance; I'm ignoring it through a desire to keep things relatively straightforward. Likewise DSA, ECC, and so on. There are oblique references if you know what to look for (e.g. discrete logarithm).
atom944":2xqo0q6w said:For anyone interested in this, I suggest the book The Science of Secrecy by Simon Singh. He also did a TV show by the same name, although I've never watched it.
Bob.Brown":1fih1fws said:If I encrypt "BUY" or "SELL" using Alice's public key and if Evil Eve knows I'll send one of those two messages and Eve can {ahem} eavesdrop on my communications, all she's got to do is encrypt both messages with Alice's public key and see which bits go by. That's one of the big advantages of the use of a random session key and hybrid encryption.Solomonoff's Secret":1fih1fws said:Public key encryption must be randomized, meaning mulitple encryptions using the same public key produce completely unrelated-looking ciphertexts. So encrypting every possible short message would likely not produce an encryption that matches the one you already saw. Not sure if that's the attack you had in mind.