generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Description
Security issue notifications
If you discover a potential security issue in AWS-LC for Rust we ask that you notify AWS Security via our
vulnerability reporting page. Please do not create a
public github issue, if in doubt contact AWS security first.
Problem:
digest::Algorithm definitions are static instead of const in aws-lc-rs/src/digest/sha/*.
That makes them:
- The
digest::Algorithmdefinitions are not consistent with other algorithm definitions, like definitions foraead::Algorithmwhich useconstcorrectly instead ofstatic. - Impractical to use.
They are not directly&'staticreferencable- Cannot be used to create const combinational definitiones
(for example the following use case, this would result to better memory locality when using&'staticreferences for algorithm bundles)
/// **See**: [RFC 8446 - B.4. Cipher Suites](https://www.rfc-editor.org/rfc/rfc8446#appendix-B.4)
pub struct Tls13CipherSuite {
pub aead: aead::Algorithm,
pub hash: digest::Algorithm,
}
impl Tls13CipherSuite {
///**See**: [RFC 5116 - 5.1. AEAD_AES_128_GCM](https://www.rfc-editor.org/rfc/rfc5116#section-5.1)
pub const AES_128_GCM_SHA256: Self = Self {
aead: aead::AES_128_GCM,
hash: digest::SHA256 // <-- not possible now
};
///**See**: [RFC 5116 - 5.2. AEAD_AES_256_GCM](https://www.rfc-editor.org/rfc/rfc5116#section-5.2)
pub const AES_256_GCM_SHA384: Self = Self {
aead: aead::AES_256_GCM,
hash: digest::SHA3_384 // <-- not possible now
};
///**See**: [RFC 8439 - ChaCha20 and Poly1305 for IETF Protocols](https://www.rfc-editor.org/rfc/rfc8439)
pub const CHACHA20_POLY1305_SHA256: Self = Self {
aead: aead::CHACHA20_POLY1305,
hash: digest::SHA256 // <-- not possible now
};
}staticinstead ofconstwill also result in less optimal machine code since complier inlining is not possible for the underlying algorithm parameters.
Solution:
A description of the possible solution in terms of AWS-LC for Rust architecture. Highlight and explain any potentially
controversial design decisions taken.
- Does this change any public APIs?
No.
- Which algorithm(s) will this impact?
digest::Algorithm definitions in aws-lc-rs/src/digest/sha/*.
Requirements / Acceptance Criteria:
What must a solution address in order to solve the problem? How do we know the solution is complete?
- RFC links: Links to relevant RFC(s)
None.
- Related Issues: Link any relevant issues
None.
- Will the Usage Guide or other documentation need to be updated?
None needed.
- Testing: How will this change be tested? Call out new integration tests, functional tests, or particularly
interesting/important unit tests.
None needed.
Out of scope:
Is there anything the solution will intentionally NOT address?
No.
Metadata
Metadata
Assignees
Labels
No labels