-
Notifications
You must be signed in to change notification settings - Fork 568
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 PK_Signature_Options #4318
Draft
randombit
wants to merge
42
commits into
master
Choose a base branch
from
jack/pk-sign-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.
Draft
Add PK_Signature_Options #4318
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
98f9b00
Add PK_Signature_Options
randombit 2c633fc
Fix TPM
randombit aacc762
Fix include
randombit 932f615
Add Asymmetric_Key::supports_context_data
randombit 35e8dc6
Cleanup provider handling
randombit 212351f
Improve validation
randombit 3a15aa8
fmt
randombit ab61a27
Missing add
randombit c284e9c
Attempt workaround for MSVC bug
randombit 88d31d2
Fix bogus include
randombit dbf1d07
Fix XMSS cli test
randombit 337b924
Update verification
randombit f26e63e
Apply suggestions from code review
randombit 72e3a81
Fix typo
randombit 454b42f
More stuff
randombit 92b5dc5
Gut EMSA parsing logic
randombit 455f9ef
Temporarily disable two tests that need fixing
randombit c2512b0
fixes
randombit d4e7bce
value_or
randombit 0e93767
fixes
randombit b025b41
Handle explicit trailer fields
randombit 6f75c8e
Fixes
randombit 5163ff3
f
randombit c04b241
Update some cli, examples, tests
randombit c1be281
fmt
randombit 90d854b
Move
randombit ddad2c7
shim
randombit 6a71101
f
randombit a4b80e2
Introduce a base builder as discussed here: https://github.com/random…
reneme 88af001
Consumers can specify expectations of value availability
reneme efd60ad
Split Options and Builder into two classes
reneme 589524a
Disentangle pk_keys.h and pubkey.h with fwd declares
reneme 04fa277
Go all-in on the builder pattern
reneme c82da41
remove half-baked c'tors of PK_Signer/Verifier
reneme e07e48c
.with_provider() filters out legacy 'base' provider
reneme d2d4e63
PK_Signature_Options::from_legacy()
reneme 89a8964
Code cleanup in base classes
reneme a4ef95a
Cleanups
reneme aa04f2a
Dilithium can't deal with context/prehash yet
reneme 9c79af7
Options<>::to_string() can render uint8_t buffers
reneme d3dbcc2
Test: OptionsBuilder
reneme 9d8cee0
Fix after rebase
reneme 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
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
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.
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.
From an end-user's perspective this makes it quite easy to create an RSA signature without a padding. Like so:
... this is quite the footgun and we should look into making this harder.
For instance, we could throw if neither
hash
norpadding
are defined instead of defaulting to "Raw". Note, that users may still explicitly requestwith_padding("Raw")
if they really want to.