You can check that the RSA conditions are satisfied, p and q are prime, N = p*q, and e*d % ((p-1)*(q-1)) = 1 (this last condition is what allows RSA decryption to work via Euler's theorem ). To keep the example simpler, I only used 256-bit RSA (weak), in reality you should use at least 2048-bit RSA these days, in which case have p, q, N, and d will each have eight times the number of digits. Here's an example of a key I just generated. RSA encryption generates the ciphertext by m^e mod N, where (N, e) are your public key and decryption works via c^d mod N where (N, d) are the private key which is calculated efficiently when you know p and q the large primes. RSA decryption is slow compared to encryption as d the private exponent is necessarily large, while (with proper use of RSA) there's no reason the public exponent can't be chosen to be small like 65537 (or even 3).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |