Skip to content
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

Is there a method to display the public key of signatures? #1401

Closed
JannisFengler opened this issue Jan 19, 2023 · 5 comments
Closed

Is there a method to display the public key of signatures? #1401

JannisFengler opened this issue Jan 19, 2023 · 5 comments
Assignees

Comments

@JannisFengler
Copy link

There are 2 ways to init the signatures. One is to initiate with
signer.Init(sigName, nil)
After that, a keypair can be generated with
signer.GenerateKeyPair()
which returns the public key.

The second way is to initiate with:
signer.Init(sigName, secretKeyBytes)

This function doesn't return a public key. I also didn't find a function like:
signer.publicKey()

Is there a best practice for extracting the public key? It would be great if this function would be part of the liboqs-go library.

@vsoftco vsoftco self-assigned this Jan 25, 2023
@dstebila
Copy link
Member

dstebila commented Feb 9, 2023

No, there's no method for extracting the public key from the signature object, since the signature object may not know the public key due to being initalized via signer.Init(sigName, secretKeyBytes). Note that being initialized with the secret key does not necessarily imply one can derive the public key, since there may not be a one-to-one mapping from secret keys to public keys.

@dstebila dstebila closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2023
@JannisFengler
Copy link
Author

Because it's for falcon possible to deterministic derive the public key from the private key, can we open this issue again?
Or maybe move it to liboqs?
https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/3Cu70s0doYY

@baentsch baentsch transferred this issue from open-quantum-safe/liboqs-go Feb 23, 2023
@baentsch
Copy link
Member

As this is a general API question, not specific to one language wrapper, reopening it here for wider discussion.
My personal vote would be to not include an API that cannot be implemented for all PQ algorithms. The discussion thread referenced above also hints at a very special, Falcon-only, use case. Opinions to the contrary welcome.

@baentsch baentsch reopened this Feb 23, 2023
@dstebila
Copy link
Member

I agree with Michael, I'm not inclined to add an API that can only be implemented by some algorithms.

@vsoftco
Copy link
Member

vsoftco commented Feb 26, 2023

Agree as well

@dstebila dstebila closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants