69 makes a nice public exponent for RSA.
Conversation
Notices
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Sunday, 03-Mar-2024 09:56:51 JST Ryan Castellucci :nonbinary_flag: -
Embed this notice
Botahamec (botahamec@mas.to)'s status on Wednesday, 06-Mar-2024 09:32:42 JST Botahamec @ryanc I'm confused. Am I crazy? Aren't the public exponents supposed to be prime?
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Wednesday, 06-Mar-2024 09:32:42 JST Ryan Castellucci :nonbinary_flag: @botahamec That is common misconception, but no, the public exponent just needs to have no common factors with p-1 and q-1.
65537 is typically used because it only has two 1 bits set which allows for faster exponentiation, and it being prime means the odds of it being a factor of p-1 or q-1 are low.
This assumes the key uses two primes as the factors of the modulus. That brings me to another common misconception, that the RSA modulus needs to be semiprime - having exactly two factors.
The math all works just fine with three or more primes.
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Wednesday, 06-Mar-2024 09:55:30 JST Ryan Castellucci :nonbinary_flag: Here's an RSA key with a public exponent of 69 and 69 prime factors for a 2048 bit modulus.
https://gist.github.com/ryancdotorg/cf07dfb71eb817a3d54f6cb5066d0367
-
Embed this notice