https://github.com/kizzycode/crypto_api_blake2
Implements Blake2b for `crypto_api`
https://github.com/kizzycode/crypto_api_blake2
Last synced: 9 months ago
JSON representation
Implements Blake2b for `crypto_api`
- Host: GitHub
- URL: https://github.com/kizzycode/crypto_api_blake2
- Owner: KizzyCode
- Created: 2019-03-14T14:36:45.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-15T00:41:37.000Z (about 4 years ago)
- Last Synced: 2025-03-06T12:53:00.178Z (10 months ago)
- Language: Rust
- Size: 51.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE BSD 2-CLAUSE.md
Awesome Lists containing this project
README
[](https://docs.rs/crypto_api_blake2)
[](https://opensource.org/licenses/BSD-2-Clause)
[](https://opensource.org/licenses/MIT)
[](https://crates.io/crates/crypto_api_blake2)
[](https://crates.io/crates/crypto_api_blake2)
[](https://ci.appveyor.com/project/KizzyCode/crypto-api-blake2)
[](https://deps.rs/crate/crypto_api_blake2/0.2.0)
# crypto_api_blake2
Welcome to `crypto_api_blake2` 🎉
## About
This crate implements [Blake2b](https://blake2.net/blake2.pdf) with APIs for various use-cases:
- Streaming and oneshot variable length hash algorithm (obviously)
- Streaming and oneshot message authentication code (= keyed hash with secure finalization to
prevent [length extension attacks](https://en.wikipedia.org/wiki/Length_extension_attack))
- Salt- and info-based KDF
## Security
⚠️ Some words of warning ahead: This library is beta and has not been audited yet – use at your
own risk! ⚠️
However we try to do things right from the start – this library is
[KISS](https://en.wikipedia.org/wiki/KISS_principle) and tested against various test vectors.
### Test Vectors
All implementations pass all reference test vectors and are assumed to produce correct results even
in corner cases – we also use API test vectors to test our input validation.
### Memory Hygiene
`crypto_api_blake2` does not perform any attempts to erase sensitive contents from memory. However,
all sensitive contents are stored in heap-allocated memory, so if you're using an erasing
memory-allocator like [MAProper](https://crates.io/crates/ma_proper) they will be erased nontheless.
Using an erasing memory allocator is a good idea anyway, because Rust makes it pretty hard to keep
track on how the memory is managed under the hood – the memory allocator on the other hand sees
everything that happens on the heap and can take care of it accordingly.
## Dependencies
Because this code implements the [`crypto_api`](https://github.com/KizzyCode/crypto_api), it depends
on the `crypto_api`-crate. Otherwise, it's dependency less.