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

Expose extra Signer functions #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trevor-crypto
Copy link

Also allow getting hash from EnclaveHash

This is necessary for a custom signer that I'm working on where I need to access the sighash to be signed to distribute to multiple parties. It will help me reduce copy/paste and maintaining a fork, and it should not cause any backward compatibility issues.

Also allow getting hash from EnclaveHash
bors bot added a commit that referenced this pull request Jan 3, 2023
429: sgxs crate changes to enable offline signing r=[Pagten] a=arai-fortanix

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 new `SgxRsaPubOps()` trait for calculating the Q1 and Q2 values from a signature, instead of doing this during signing.

Co-authored-by: Reuven V. Gonzales <reuven@oasislabs.com>
Co-authored-by: Daniel Arai <daniel@fortanix.com>
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.

None yet

1 participant