-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extended api for allow use fixed seed for generate key pair and generate public key from private key in Signature schemes #2031
base: main
Are you sure you want to change the base?
Conversation
…on patches Signed-off-by: mraksoll4 <[email protected]>
…ey function patches Signed-off-by: mraksoll4 <[email protected]>
…from privkey function patches Signed-off-by: mraksoll4 <[email protected]>
Signed-off-by: mraksoll4 <[email protected]>
…dilithium extended api for allow use fixed seed for generate key pair and generate public key from private key in Signature schemes in this case we pass the seed as a parame. OQS_SIG_keypair_from_fseed(const OQS_SIG *sig, uint8_t *public_key, uint8_t *secret_key, const uint8_t *seed); in this case we pass the private key as a param. OQS_SIG_pubkey_from_privkey(const OQS_SIG *sig, uint8_t *public_key, const uint8_t *secret_key); falcon and dilithium at this moment - all versions. But can be done for other algos to. Signed-off-by: mraksoll4 <[email protected]>
Signed-off-by: mraksoll4 <[email protected]>
Signed-off-by: mraksoll4 <[email protected]>
I know this is a useful feature for a number of applications, but I am hesitant to add support for it to the liboqs API. Unlike the |
What apps are we talking about here, @SWilson4 @mraksoll4 ? fwiw,
A very true concern, and already visible in this PR, consisting of a gazillion patches that I am not not exactly eager to review and definitely unwilling to maintain, let alone replicate across all algorithms.
Completely agree on this too: Algorithm-specific patching should only be a method of "last resort", say if there's a security issue that an upstream cannot or does not fix in a timely manner. Using it to alter the externally visible behaviour of many, let alone all, algorithm(s) with many separate, bespoke patches --even if doing basically the same thing-- does not seem like a long-term viable way forward: Such changes should come from the upstream and be driven by a standards body (such as NIST). |
I meant "application" in the sense of an application of cryptography, as opposed to an app. I was thinking mostly of "fancy crypto" (e.g., BIP32). |
In fact, we can make a stub for the API so that it works only in supported algorithms and does not litter others, I'm a little confused there. As for patches, the function is built on the basis of the basic key pair generator, we just accept the Seed parameter from the outside, just like in the case of opening a public key from a private one we use part if it for recontrctrun pubkey - for falcon example from f and g. It seems that I succeeded in this, but the problem is with Falcon and other algorithms where there is no meta data from the supported functionality, although you can go the other way and use a template through checking the algorithm "name" |
For this to work, we also need to figure out how to securely "derive" public keys from public keys. In addition to the private key tree, there is often also a public key tree, which allows us to create a new public key and associate it with a private key without revealing the private key. |
extended api for allow use fixed seed for generate key pair and generate public key from private key in Signature schemes
in this case we pass the seed as a parame.
OQS_SIG_keypair_from_fseed(const OQS_SIG *sig, uint8_t *public_key, uint8_t *secret_key, const uint8_t *seed);
in this case we pass the private key as a param.
OQS_SIG_pubkey_from_privkey(const OQS_SIG *sig, uint8_t *public_key, const uint8_t *secret_key);
falcon and dilithium at this moment - all versions. But can be done for other algos to.
"issue #2030"
old pull request #2027 , recreated for with correct style.
it's extended api , but not affect native support old functions.