-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add digest and MAC KMIP operations #370
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
Conversation
06fcfc8
to
485e2cf
Compare
55fcf18
to
e1005f7
Compare
ebd2279
to
d71edaa
Compare
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.
Looks good to me, some minor comments only.
crate/cli/src/actions/mac.rs
Outdated
SHA512_224, | ||
SHA512_256, |
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 don't understand what those are. If these are truncations of a hash, I would let this to the user: if you want a short mac, compute a secure one, an truncate it to the desired length (at your own risks).
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.
if I understand correctly:
- SHA512_* belongs to SHA2 family (with truncation)
- SHA3_belongs to SHA3 family without truncation but extensibility.
Then I will let:
pub enum CHashingAlgorithm {
SHA256,
SHA384,
SHA512,
SHA3_224,
SHA3_256,
SHA3_384,
SHA3_512,
}
let unique_identifier = UniqueIdentifier::TextString(unique_identifier.to_owned()); | ||
|
||
let hmac = if let Some(correlation_value) = request.correlation_value { | ||
compute_hmac(&correlation_value, data, algorithm)? |
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.
What is a correlation value ?
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.
From KMIP: correlation_value: Specifies the existing stream or by-parts cryptographic operation (as returned from a previous call to this operation).
b097920
to
94fe713
Compare
No description provided.