a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by briandmyers
briandmyers  ·  4261 days ago  ·  link  ·    ·  parent  ·  post: A simple hexadecimal "bignum" library, in C.

It goes without saying (or maybe it doesn't!) that you must use valid p and q values when calculating your RSA keys.

You don't say here what HB_modexp() looks like. Did you simply rename it, perhaps? The reason I didn't name it so in the first place, is because mod_exp() is not a public function. As a 'static', it is meant to be local, and only called from the encrypt/decrypt functions.