-
Notifications
You must be signed in to change notification settings - Fork 3
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
Remove RSA and use P256 everywhere #154
Conversation
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
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.
Not a fan or all these unwraps and expects. In general, its good practice to return Result or Option in the lower levels and only unwrap or panic at the app level.
src/qos_attest/Cargo.toml
Outdated
openssl = "0.10.40" |
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.
Not seeing this used anywhere. Are you sure is still 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.
Ya, its used for x509 cert stuff in the attestation module. Working on ripping it out right now in another branch
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.
fwiw openssl will be completely removed once this PR & #156 are merged
src/qos_p256/src/lib.rs
Outdated
const P256_ENCRYPT_DERIVE_PATH: &[u8] = b"qos_p256_encrypt"; | ||
const P256_SIGN_DERIVE_PATH: &[u8] = b"qos_p256_sign"; | ||
|
||
/// Length of the master seed. | ||
pub const MASTER_SEED_LEN: usize = 64; |
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.
Do you really need 64 bytes? Seems overkill and adds nothing in terms of security. 32 bytes its more than enough.
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.
64 is a bit arbitrary, but was thinking it could give us more flexibility in the future? Tbh though that was just a guess so I am fine with switching to 32
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.
Agree with @mikelodder7. Security limit is already 128b because of the use of p256. Recommend 128b = 32B here.
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.
Ok, this is now switched to 32.
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.
Left an optional comment. Otherwise, lgtm.
Co-authored-by: Michael Lodder <[email protected]>
Co-authored-by: Michael Lodder <[email protected]>
Follow ups: