-
Notifications
You must be signed in to change notification settings - Fork 16
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
Problem: no proof that a keypair was generated inside NE (fixes #92) #95
Conversation
from cose.keys.ec2 import EC2 | ||
from cose.keys.curves import P384 | ||
from cose.messages import Sign1Message | ||
from Crypto.Util.number import long_to_bytes |
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.
blacklist: The pyCrypto library and its module long_to_bytes are no longer actively maintained and have been deprecated. Consider using pyca/cryptography library.
(at-me in a reply with help
or ignore
)
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.
@sonatype-lift ignore
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've recorded this as ignored for this pull request. If you change your mind, just comment @sonatype-lift unignore
.
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 script is only for illustration -- when there's an official AWS verification functionality in AWS Rust API, it can potentially be used instead)
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.
maybe we can translate the python script to rust, so that we can check directly after the keypair generated instead of running the script manually. can create a new issue.
yeah, at least basic processing should be possible with https://crates.io/crates/aws-nitro-enclaves-cose + https://github.com/aws/aws-nitro-enclaves-nsm-api/blob/main/nsm-io/src/lib.rs#L298 -- I can open an issue for it |
Solution: - extended response for keygen in the helper + extra comments/small refactor - nitro enclave returns an attestation doc for the generated pubkey + used AWS KMS key id - added a small Python verification script to illustrate how the attestation doc payload can be processed
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.
LGTM
Solution: