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

Expose interface for secret key to public key conversion. #115

Open
jakubtrnka opened this issue Apr 6, 2021 · 2 comments
Open

Expose interface for secret key to public key conversion. #115

jakubtrnka opened this issue Apr 6, 2021 · 2 comments

Comments

@jakubtrnka
Copy link

jakubtrnka commented Apr 6, 2021

I implemented a simple certificate infrastructure.
The server is sending certificate with its static public key signed by some authority to a client.
The server on startup reads file with the certificate and its secret static key.

I want to implement validation of the server's secret key against the public key in the certificate so that I can tell "This secret key belongs to that public key".

There is, no api for this. I need to take the cryptographic algorithm and do the check manually, bypassing the abstraction layers that are hiding details about the underlying algorithms.

I imagine something like adding a method to the Builder: Builder::build_keypair(&self) -> Result<Keypair, Error> that doesn't generate new keypair but instead takes local private key that was set previously with method local_private_key and calculates corresponding public key. Perhaps even exploit generate_key_pair for that purpose in case user sets explicitly private key.

@jakubtrnka
Copy link
Author

I'm willing to implement this if the idea gets positive acknowledgement.

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

2 participants
@jakubtrnka and others