Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Naive hashing of data for various applications (key derivation, signature challenges, hmacs, group generators, etc.) can have subtle security implications if not done carefully. The hashing API strives to adopt the implicit use of best practices for these applications using an API that is: * super ergonomic and stays largely out of the way. * leverages the Rust type system to achieve zero-cost abstractions and guarantees that best practices are being followed. * Performing these best practices in tari-crypto, and letting clients focus on their applications. The API makes heavy use of traits (incl marker traits) and generics to keep the API as flexible and broadly applicable as possible. - Add a set of unit tests covering the hashing API - Add a domain generation use case to the Ristretto module * fix: remove unstable feature * prepend dst key length For additional collision restance, we now prepend the domain tag length to the digest ahead of supplying the tag itself. Without this, there is still a very small chance that a collision could be constructed. A new test is provided that illustrates the exact process. * fix: review comments
- Loading branch information