3 ms·
Article is somewhat mathematically educational but cryptographically not so great. e=35537 is a weird choice: 65537 is more common since it has low Hamming wei
by throwaway81523 5y ago
Article is somewhat mathematically educational but cryptographically not so great. e=35537 is a weird choice: 65537 is more common since it has low Hamming weight, i.e. you just do some squaring and one multiplication. You should not encrypt the plaintext directly, but rather use an encoding like OAEP (if that has not fallen out of favor by now). See whatever the current PKCS standards are. Finally, RSA itself has fallen out of favor, which elliptic curve methods now preferred.
- upofadown 5y agoSpeaking of curves, they have their weird gotchas as well which tend to get glossed over in simplified examples. A recent discussion: * https://research.nccgroup.com/2021/11/18/an-illustrated-guide-to-elliptic-curve-cryptography-validation/ https://research.nccgroup.com/2021/11/18/an-illustrated-guid...
- throwaway81523 5y agoThanks, that is a good article. There are a lot of tricks to implementing ECC efficiently (besides correctly), enough that writing a competitive DIY implementation is a lot of work even if you know what you're doing. That's in contrast with RSA, where the work is all in the modular exponentiation operation, which is already carefully optimized in libraries like GMP (so just call GMP and you are done). Hankerson, Menezes, and Vanstone's "Guide to Elliptic Curve Cryptography" is very helpful if you are trying to implement ECC for some reason. Most of us are probably better off using an existing implementation.