-
Notifications
You must be signed in to change notification settings - Fork 24
SPDM Design updates #171
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
base: main
Are you sure you want to change the base?
SPDM Design updates #171
Conversation
… into pbhogaraju/spdm-cert-store-design
Co-authored-by: Parvathi Bhogaraju <[email protected]>
… into pbhogaraju/spdm-cert-store-design
…m/chipsalliance/caliptra-mcu-sw into pbhogaraju/spdm-cert-store-design
vsonims
left a comment
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 great!
… into pbhogaraju/spdm-cert-store-design
|
|
||
| ## Transcript Manager | ||
| The Transcript Manager is for managing the transcript and the transcript hash. The transcript is a sequential concatenation of prescribed full messages or message fields. The transcript hash is the cryptographic hash of this transcript, computed using the negotiated hash algorithm. This component ensures the integrity and authenticity of SPDM communications by managing these essential elements. | ||
| The Transcript Manager is responsible for handling the transcript and its associated hash. The transcript represents a sequential concatenation of specific full SPDM messages or message fields, while the transcript hash is a cryptographic hash of this transcript. The transcript hash is computed using the negotiated hash algorithm (SHA384). |
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.
Is specifying SHA384 necessary?
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.
Caliptra only supports SHA384. I just added it here for the information. I could rephrase it to indicate that the SHA384 hash is calculated.
docs/src/spdm.md
Outdated
| /// - `hash`: Buffer to copy the hash to. | ||
| /// # Arguments | ||
| /// * `slot_id` - The slot ID of the certificate chain. | ||
| /// * `asym_algo` - The asymmetric algorithm to indicate the type of Certificate chain. |
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.
NIT: 'certificate chain'
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.
corrected
| hash: &mut [u8] | ||
| ) -> Result<(), SpdmError>; | ||
| /// * `usize` - The length of the certificate chain in bytes or error. | ||
| async fn cert_chain_len(&mut self, asym_algo: AsymAlgo, slot_id: u8) -> CertStoreResult<usize>; |
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.
Why is algo needed here? Slot Id should be enough to get to the cert chain, correct?
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.
Depending on the negotiated asymmetric algorithm (ECC or MLDSA), we need the certificate store to provide the certificate chain. For now, I have only defined ECC384.
| /// * `usize` - The number of bytes read or error. | ||
| /// If the cert portion size is smaller than the buffer size, the remaining bytes in the buffer will be filled with 0, | ||
| /// indicating the end of the cert chain. | ||
| async fn get_cert_chain<'a>( |
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.
Same comment here on the algo paramter.
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.
Refer to my comment above.
docs/src/spdm.md
Outdated
| /// * u8 - The KeyPairID associated with the certificate chain or None if not supported or not found. | ||
| fn key_pair_id(&mut self, slot_id: u8) -> Option<u8>; | ||
|
|
||
| /// Get CertificateInfo associated with the certificate chain if SPDM responder supports |
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.
Suggest explaining what this 'CertificateInfo' is.
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.
Done.
docs/src/spdm.md
Outdated
| fn cert_info(&mut self, slot_id: u8) -> Option<CertificateInfo>; | ||
|
|
||
| /// Get the KeyUsageMask associated with the certificate chain if SPDM responder supports | ||
| /// multiple assymmetric keys in connection. |
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.
'asymmetric'
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.
corrected
mhatrevi
left a comment
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.
Please see the feedback.
… into pbhogaraju/spdm-cert-store-design
… into pbhogaraju/spdm-cert-store-design
… into pbhogaraju/spdm-cert-store-design
… into pbhogaraju/spdm-cert-store-design
No description provided.