| about | help | code help+videos | done | prefs | 
apcsaEncryptFindPrivateKey
(HARD) Given a public key exponent and the "totient," the result of multiplying (prime1-1)*(prime2-1) from the two primes used to create the public key, discover the private key exponent. The private key is the smallest number x such that (publicKey * x) % totient == 1. The public key exponent is available to anyone, as is the modulus (prime1*prime2), but the totient number is kept secret as are the two primes themselves. This problem is based on, and helps to construct, the simplified public key encryption algorithm found at https://en.wikibooks.org/wiki/Cryptography/A_Basic_Public_Key_ExampleapcsaEncryptFindPrivateKey(7, 12) → 7 apcsaEncryptFindPrivateKey(7, 24) → 7 apcsaEncryptFindPrivateKey(3, 40) → 27 ...Save, Compile, Run (ctrl-enter)  | 
Progress graphs: 
 Your progress graph for this problem
 Random user progress graph for this problem 
 Random Epic Progress Graph
Difficulty: 320
Copyright Nick Parlante 2017 - privacy