rustpq / pqcrypto

Rust Post-Quantum cryptography
226 stars 41 forks source link

Generate a Public Key directly from a Secret Key #44

Closed nv0skar closed 2 years ago

nv0skar commented 2 years ago

Problem

I've looking for a way to generate just the SK (not the keypair), and then generate a PK using the previous SK (like here). pqcrypto doesn't have a function to generate a PK from a SK (you can only generate keypair (both at the same time)), so you can't recover the PK from the SK.

Reasons why this could be useful

  1. To save up space, because you'd only have to save the SK
  2. Use custom sourced SK (maybe unsafe when used inproperly)3.
  3. There could be more...

Is this functionality already there and I haven't noticed? Thanks!

thomwiggers commented 2 years ago

That's a paradigm from RSA and Diffie Hellman that does not translate to the post quantum schemes. It is not generally possible so do this.