-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
signer: replace SpxSigner.new_ with raw keygen func
* Removes previously added SpxSigner.new_ key pair generation method. This method may be convenient to quickly test spx signing, but does not fit well into the signer API usage pattern, where key generation; public key and signer URI loading; and signer loading (from URI) plus signing are separate workflows. * Adds function to generate and return raw key pair bytes. * This function is "syntactic sugar" (quote @jku) over the PySPX library. * It is added here to provide consistent error handling, if the optional library is not available. * Otherwise, it needs additional tooling to fit well into the signer API, e.g. an interface that stores the created private bytes to a place from where they can be loaded using Signer.from_priv_key_uri. * Adds helper factory method to create an SpxKey instance from raw bytes. * Adopts changes in usage example and tests.
- Loading branch information
Showing
3 changed files
with
36 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters