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

Refactor of ECDSA sign module, SEC1 support for ECDSA, PKCS1 for RSA-PSS and PKCS8 for RSAPKCS1 #23

Merged
merged 6 commits into from
Feb 20, 2025

Conversation

gasbytes
Copy link
Contributor

@gasbytes gasbytes commented Feb 14, 2025

  • Refactored the ECDSA sign module to improve code clarity;
  • Added SEC1 support for ECDSA keys;
  • PKCS1 for RSA-PSS;
  • PKCS8 for RSAPKCS1;

- Merged P-256, P-384, and P-521 structs into a single `EcdsaSigningKey`
- Determined `SignatureScheme` based on key size instead of WolfSSL curve ID
- Simplified signing logic and reduced duplicate code

Prepares for SEC1 support in future commits.
- Merged separate P-256, P-384, and P-521 verifiers into a single `EcdsaVerifier`
- Determined curve, hash function, and public key parsing based on `SignatureScheme`
- Reduced code duplication while maintaining the same logic and comments

No changes to external API; existing mappings in `verify.rs` remain unchanged.
single module called rsa.rs to better handle the different private key
formats (with matching via SignatureScheme);
- Completed support for PKCS8 for RSA-PKCS1 and PKCS1 for RSA-PSS;
@gasbytes gasbytes force-pushed the pkcs1-and-sec1-support branch from bce6498 to e96ab68 Compare February 18, 2025 16:46
@gasbytes gasbytes marked this pull request as ready for review February 18, 2025 16:47
@JacobBarthelmeh JacobBarthelmeh merged commit 6ea249a into wolfSSL:main Feb 20, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants