You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kmac/README.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
A rust implementation of [KMAC](https://en.wikipedia.org/wiki/SHA-3#Additional_instances), following the [NIST SP 800-185](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf) specification.
4
4
5
-
This crate provides KMAC implementations for KMAC128, KMAC256, KMACXOF128, and KMACXOF256.
5
+
This crate provides implementations for KMAC128, KMAC256, KMACXOF128, and KMACXOF256. KMAC is a PRF and keyed hash function based on the Keccak (SHA-3) sponge construction, designed for message authentication (MAC) and key derivation (KDF).
6
6
7
7
## Examples
8
8
@@ -14,46 +14,46 @@ use kmac::{Kmac128, Mac, KeyInit};
// `verify_slice` will return `Ok(())` if code is correct, `Err(MacError)` otherwise
49
-
mac.verify_slice(&mac_code).unwrap();
49
+
kmac.verify_slice(&mac_bytes).unwrap();
50
50
```
51
51
52
52
### Producing a fixed-length output
53
53
54
-
KMAC can also be used to produce an output of any length, and can be particularly useful as a [key-stretching function](https://en.wikipedia.org/wiki/Key_stretching).
54
+
KMAC can also be used to produce an output of any length, which is particularly useful when KMAC is being used as a [key-derivation function (KDF)](https://en.wikipedia.org/wiki/Key_derivation_function).
55
55
56
-
This method finalizes the KMAC and mixes the requested output length into the KMAC domain separation. That means the resulting bytes are dependent on the exact length of `out`. Use this when the output length is part of the MAC/derivation semantics (for example when the length itself must influence the MAC result).
56
+
This method finalizes the KMAC and mixes the requested output length into the KMAC domain separation. The resulting bytes are dependent on the exact length of `out`. Use this when the output length is part of the MAC/derivation semantics (for example when the length itself must influence the MAC result).
57
57
58
58
A customisation string can also be provided to further domain-separate different uses of KMAC with the same key when initialising the KMAC instance with `new_customization`.
59
59
@@ -83,9 +83,9 @@ The XOF variant finalizes the sponge state without binding the requested output
0 commit comments