-
Notifications
You must be signed in to change notification settings - Fork 133
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
PasswordRecipientInfoBuilder for CMS #1273
Open
bkstein
wants to merge
41
commits into
RustCrypto:master
Choose a base branch
from
bkstein:cms/pwri-builder
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
c0c3195
Implemented PasswordRecipientInfoBuilder for cms
bkstein d819cd4
Clippy and rustfmt
bkstein a3a6708
Link RFC 3211
bkstein ee851f5
Improve code readability
bkstein 7b23a0f
Fix construction of `wrapped_cek`
bkstein d0a4f8e
Changed `PwriEncryptor` return types to Result<>
bkstein b505f04
Merge branch 'master' of https://github.com/RustCrypto/formats into c…
bkstein 0abe441
Fixed type declaration
bkstein 572d2d0
Removed debugging code.
bkstein 7cd04da
Fixed key derivation for PwriEncryptor in test
bkstein 33f7abb
Adding CEK to wrapped key.
bkstein 86c7e2e
Fixed appending CEK to wrapped CEK.
bkstein 483f977
Fixed padded key length calculation
bkstein 7126d8e
Added decryption in Pwri test
bkstein 32fd0e1
Clippy...
bkstein f56f075
Fixed invalid encoding of rsaEncryption AlgorithmIdentifier
bkstein 603ca6d
cms: do not hold a mutable reference to Rng
baloo 14ca4dd
Merge branch 'master' into cms/pwri-builder
bkstein ed0aa1c
Fixed a clippy
bkstein 49d443c
Trigger build
bkstein b29c6c8
Merge branch 'master' into cms/pwri-builder
bkstein ffb8356
Cargo.lock update
bkstein 88e3f59
Merge branch 'master' into cms/pwri-builder
bkstein ad8f402
Saving work
bkstein c624f74
Update to current master
kletterstein ebf849d
Updated pwri changes in cms.
kletterstein 66a4e7c
Fixed Cargo.lock
kletterstein 4117ae4
Merge remote-tracking branch 'rustcrypto/master' into cms/pwri-builder
kletterstein a51145c
Merge remote-tracking branch 'rustcrypto/master' into cms/pwri-builder
kletterstein b62fc35
Merge remote-tracking branch 'rustcrypto/master' into cms/pwri-builder
kletterstein 8044862
Fixing dependency versions (aes)
kletterstein 201ddbb
Fixed clippies
kletterstein d57c3ab
Before update to official master
kletterstein cbd8f27
Merge remote-tracking branch 'rustcrypto/master' into cms/pwri-builder
kletterstein 5fdf587
Saving work before baloo merge
kletterstein 765e447
Merge remote-tracking branch 'baloolocal/cms/pwri-builder' into cms/p…
kletterstein 05c23aa
Fixed some merge errors
kletterstein 33cf7a6
PwriRecipientInfoBuilder test completed
kletterstein 85845d7
Formatting
kletterstein 48e0a4e
Rustfmt
kletterstein e374257
Merge remote-tracking branch 'rustcrypto/master' into cms/pwri-builder
kletterstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
target/ | ||
**/*.rs.bk | ||
|
||
# CLion IDE | ||
# IDEs | ||
.idea | ||
.vscode | ||
|
||
# Artifacts | ||
*.orig |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be worth changing the signature of
RecipientInfoBuilder::build
trait function tobuild_with_rng
, just so we don't have to bind the rng like that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe not, it's not object-safe anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we leave it as it is? Or what kind of binding would you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too fan of the
&mut R
in an object. I think that makes it harder to use. You need two instances of the RNG: for example in the context of HSM, you might not have two references to the RNG easily (kough pkcs11 kough).If we could bring in the rng "late" (it's already in the
EnvelopedDataBuilder::build_with_rng
context), that be great. But theVec<Box<dyn RecipientInfoBuilder>>
requires it to be object-safe, which makes it impossible.I don't have a good solution to offer, but that's my concern here (not a blocker obviously).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only solution I could come up with is this one: bkstein#1
But this introduces some API breakage in the builder (but we can just push that in a cms-0.3)