-
Notifications
You must be signed in to change notification settings - Fork 97
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
sgxs crate changes to enable offline signing #429
Merged
Merged
Conversation
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
Supports an offline signing process for the creation of the sigstruct
Pagten
approved these changes
Dec 22, 2022
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.
This looks good to me.
raoulstrackx
approved these changes
Dec 23, 2022
intel-sgx/sgxs/CHANGELOG.md
Outdated
available, reconstruct the sigstruct and call `sigstruct.cat_sign()` with the signature to get the signed | ||
and populated Sigstruct. | ||
- If you are using a custom key implementation, you will need to implement the new `SgxRsaPubOps()` | ||
trait for your key. This trait must provide a `calculate_q1_q2()` method that calculates the q1 and q1 |
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.
Nitpick: Typo "q1 and q1"
bors r=[Pagten] |
Build succeeded:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change adds new interfaces to the
sgxs
crate to make it possible to sign enclaves separately from creating the sigstructs. This is useful, for example, for performing signing via an HSM.The first two commits in this sequence come from this pull request from ravenac95: #327. I did not include the changes to the command-line sgx-sign tool from that pull request. I think we can have a separate discussion about whether we want to support that model. The library changes should be less controversial.
I also included a change to expose the hash bytes from an EnclaveHash object. That comes from #341 from trevor-crypto.
This change should be backward-compatible with old code using this crate. New code that wants to use the new
cat_sign()
method and is using a custom key implementation will need to provide the newSgxRsaPubOps()
trait for calculating the Q1 and Q2 values from a signature, instead of doing this during signing.