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

Add a RustCrypto based backend for cryptographic COSE operations #22

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

pulsastrix
Copy link
Member

@pulsastrix pulsastrix commented Aug 5, 2024

Basically the same as was done for openssl in #13, just based on the RustCrypto collection of crates.

The easiest way of using this backend is by enabling the rustcrypto feature.
However, if minimal binary size is desired, you can instead also limit the supported algorithms by adding only the rustcrypto-* features you need.

Resolves #20

@pulsastrix pulsastrix added the enhancement New feature or request label Aug 5, 2024
@pulsastrix pulsastrix added this to the Version 0.5 milestone Aug 5, 2024
@pulsastrix pulsastrix requested a review from falko17 August 5, 2024 22:07
@pulsastrix pulsastrix self-assigned this Aug 5, 2024
@coveralls
Copy link

coveralls commented Aug 5, 2024

Pull Request Test Coverage Report for Build 10322512694

Details

  • 260 of 309 (84.14%) changed or added relevant lines in 15 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 84.95%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/token/cose/crypto_impl/rustcrypto/encrypt/aes_gcm.rs 26 30 86.67%
src/token/cose/crypto_impl/rustcrypto/mac/hmac.rs 34 38 89.47%
src/token/cose/crypto_impl/rustcrypto/key_distribution/aes_key_wrap.rs 24 30 80.0%
src/token/cose/crypto_impl/rustcrypto/sign/ecdsa.rs 45 57 78.95%
src/token/cose/crypto_impl/rustcrypto/mod.rs 15 38 39.47%
Totals Coverage Status
Change from base Build 10239244251: -0.02%
Covered Lines: 2986
Relevant Lines: 3515

💛 - Coveralls

build.rs Outdated Show resolved Hide resolved
Copy link
Member

@falko17 falko17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only 5 minor comments, then this should be good to go.

Cargo.toml Outdated Show resolved Hide resolved
build.rs Outdated Show resolved Hide resolved
src/token/cose/crypto_impl/rustcrypto/mac/hmac.rs Outdated Show resolved Hide resolved
src/token/cose/crypto_impl/rustcrypto/mod.rs Outdated Show resolved Hide resolved
src/token/cose/crypto_impl/rustcrypto/sign/ecdsa.rs Outdated Show resolved Hide resolved
src/token/cose/crypto_impl/rustcrypto/mac/hmac.rs Outdated Show resolved Hide resolved
src/token/cose/crypto_impl/rustcrypto/mac/hmac.rs Outdated Show resolved Hide resolved
src/token/cose/crypto_impl/rustcrypto/mac/hmac.rs Outdated Show resolved Hide resolved
src/token/cose/crypto_impl/rustcrypto/mac/hmac.rs Outdated Show resolved Hide resolved
pulsastrix added a commit that referenced this pull request Aug 9, 2024
@pulsastrix pulsastrix requested a review from falko17 August 9, 2024 16:14
falko17
falko17 previously approved these changes Aug 9, 2024
Copy link
Member

@falko17 falko17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now! Please rebase and then we can merge.

@pulsastrix pulsastrix merged commit 0f6a7c2 into main Aug 9, 2024
9 checks passed
@pulsastrix pulsastrix deleted the rustcrypto_backend branch August 9, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add COSE cryptography backend based on RustCrypto crates
3 participants