RSA code: Difference between revisions

58 bytes removed ,  13 years ago
m
Integrate the wikipedia link
mNo edit summary
m (Integrate the wikipedia link)
Line 1:
{{draft task}}
[[wp:RSA|RSA]] code is used to encode secret messages. It is named after the 3 men who first published it, Rivest, Shamir, and Adleman. The advantage of this type of encryption is that you can distribute the number "n" and "e" (which make up the encryption key) to everyone. The decryption key "d" is kept secret, so only you and a select few can read the encrypted plaintext. The process by which this is done is that a message, for example "Hello World" is converted to numbers (a=01,b=02,...,z=26). This yields a string of numbers, generally referred to as "numerical plaintext", or "P". For this example, "Hello World" with n = 2537, would be [805, 1212, 1523, 1518, 1204]. The plaintext is split into blocks because no one block can be larger than the value of n, else the decryption will fail. The ciphertext, C, is then computed by taking each block of P, and computing C ≡ P^e mod(n). Similarly, to decode, one computes P ≡ C^d mod(n).
 
To generate a key, one finds 2 (large) primes p and q. the value "n" is simply: n = p*q.
Line 9:
Also important is that the security of the code is based off the secrecy of the decryption exponent "d", and therefor is based off the difficulty in factoring "n".
 
 
For more information about RSA code: [[wp:RSA|Wikipedia: RSA code]]
=={{header|J}}==
 
Anonymous user