3 ms·
P stays the same, but Q and R are randomly chosen for each bit. That wasn't clear to me at first, but see the commented-out definition of the "encrypt" function
by sp332 9y ago
P stays the same, but Q and R are randomly chosen for each bit. That wasn't clear to me at first, but see the commented-out definition of the "encrypt" function in the code block.
- madrafi 9y agonice catch I wanted to make the values small so the reader can follow with pen and paper since that was the way I learned how it works .
- sp332 9y agoSo to be clear - do you need to store all those Q's and R's somewhere to decrypt, or does it still work if you throw them away because of all the mod's?
- madrafi 9y agoNo the point of secret key here is that you only need the p to encrypt and decrypt in the code example q, r are random in each run.