Encryption question..

ATC9001

Senior member
Apr 14, 2002
991
0
76
I'm having some difficulty understanding asymmetric (public key+symetric) encryption.
My understanding is the public key is known by everyone...(which in itself seems to make it not encrypted at all) then computer A randomly selects a symetric key, encrypts it with the public key and sends it to computer B. Computer B decrypts using public and now has the same symetric key. They then both use the symetric key for secure communication...
*edit* I don't get how a computer can encrypt a message and send it and the other computer can't decrypt it? I know it's supposed to only be decrypted with both keys...but if a computer can encrypt something, how can't the other computer backdrive the original message?


But My issue with this, is how is this secure? If anyone is snooping the connection they will see you sending the publicly encrypted symetric key and decrypt it themselves and they can continue to snoop as much as they want? Am I missing something or is this true?

The only way I can see this being secure is if A+B share the key via a different medium that is not monitored by someone.
 
Last edited:

seepy83

Platinum Member
Nov 12, 2003
2,132
3
71
The key (no pun intended) to Public Key crypto is that if something in encrypted with my Public Key, it can only be decrypted with my Private Key.
 

ATC9001

Senior member
Apr 14, 2002
991
0
76
I'm not understanding how something can be only encrypted by a key and not decrypted by the same key? It seems like algebra to me....you only need to know 2 of the 3 variables...A is the public key, B is the message, C is the encrypted message...
We can figure what A B or C is as long as we know 2 of 3.
 

seepy83

Platinum Member
Nov 12, 2003
2,132
3
71
The algorithms that are used to create the Public and Private keys just don't work like that. It's not simple math. I've never bothered to try and understand it, because I'm not a mathematician. I'm sure there must be some great literature out there if you really need to know how it works.
 

Reel

Diamond Member
Jul 14, 2001
4,484
0
76
The challenge in the algorithms are that they are really easy one direction but really hard in another direction. This does not mean they are unbreakable. Rather it means that the computation required to break them is not really feasible at this time.

The math that we tend to rely on now is the factoring of prime numbers. This isn't the full details but the summary is that when creating the factorization of two numbers, it is really easy to multiply them together. However, going from that multiplied number to figure out the two primes that generated that number is much more difficult.
See this blurb for a more accurate description: http://en.wikipedia.org/wiki/RSA#Key_generation
 

takt

Junior Member
Mar 19, 2010
3
0
0
The Code Book by Simon Singh is a pretty good read about cryptography. Goes from ancient times evolving to "modern" forms of it (published 2000).