zig icon indicating copy to clipboard operation
zig copied to clipboard

std.crypto: Add public RSA module

Open clickingbuttons opened this issue 1 year ago • 3 comments

RSA is still widely used for general cryptography. As such, it deserves a public module.

  1. Move RSA functions from Certificate and tls.Client to new rsa module.
  2. Add serialization
  3. Fix side channel vulnerabilities
  4. Add key generation

clickingbuttons avatar Apr 26 '24 21:04 clickingbuttons

RSA-KEM[1] is useful to have, and due to arbitrary RSA key length it can serve as a hedge against PQC algos breaking by pushing quantum computer requirements higher.

[1] https://datatracker.ietf.org/doc/html/rfc5990

voidastro4 avatar May 09 '24 04:05 voidastro4

RSA-KEM[1] is useful to have, and due to arbitrary RSA key length it can serve as a hedge against PQC algos breaking by pushing quantum computer requirements higher.

Post-quantum safe RSA would require 1 terabyte keys. https://cr.yp.to/papers/pqrsa-20170419.pdf

Not exactly practical.

jedisct1 avatar May 09 '24 11:05 jedisct1

RSA-KEM[1] is useful to have, and due to arbitrary RSA key length it can serve as a hedge against PQC algos breaking by pushing quantum computer requirements higher.

Post-quantum safe RSA would require 1 terabyte keys. https://cr.yp.to/papers/pqrsa-20170419.pdf

Not exactly practical.

On the premise that no quantum computer could ever be constructed to crack them.

With MP-RSA and 1-10 MB keys you can buy decades at the very least.

voidastro4 avatar May 11 '24 04:05 voidastro4