mirror of
https://github.com/logos-storage/lioness_blockcipher.git
synced 2026-05-19 03:00:07 +00:00
adjust tests primitives and update README.md
This commit is contained in:
parent
36b1269475
commit
bd60133585
12
README.md
12
README.md
@ -34,9 +34,9 @@ Use a 32-byte master key and encrypt or decrypt a block in place:
|
|||||||
use rand_core::{OsRng, RngCore};
|
use rand_core::{OsRng, RngCore};
|
||||||
use lioness_blockcipher::prelude::*;
|
use lioness_blockcipher::prelude::*;
|
||||||
type TestLioness = Lioness::<
|
type TestLioness = Lioness::<
|
||||||
ChaCha20StreamCipher,
|
Aes128CtrStreamCipher,
|
||||||
KeyedBlake2b,
|
Sha256PrependKey,
|
||||||
TurboShake128Kdf
|
DomSepSha256Kdf,
|
||||||
>;
|
>;
|
||||||
|
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
@ -69,7 +69,5 @@ Some notes:
|
|||||||
### TODO
|
### TODO
|
||||||
- [x] Add more tests, examples, and benchmarks ...
|
- [x] Add more tests, examples, and benchmarks ...
|
||||||
- [x] Make it generic for any compatible cipher, keyed_hash, and KDF.
|
- [x] Make it generic for any compatible cipher, keyed_hash, and KDF.
|
||||||
- [ ] Compare with existing implementation + maybe with Haskel when available.
|
- [x] Compare with existing Haskel implementation.
|
||||||
- [x] Add function which prepend the plaintext with k-zeros and checks authenticity after decryption.
|
- [x] Add authenticated encryption and decryption which prepend the plaintext with k-zeros and checks authenticity after decryption.
|
||||||
- [ ] impl enc and dec to the API to work beside encrypt_in_place and decrypt_in_place.
|
|
||||||
- ...
|
|
||||||
|
|||||||
@ -3,13 +3,13 @@ mod tests {
|
|||||||
use rand_core::{OsRng, RngCore};
|
use rand_core::{OsRng, RngCore};
|
||||||
use lioness_blockcipher::cipher::Aes128CtrStreamCipher;
|
use lioness_blockcipher::cipher::Aes128CtrStreamCipher;
|
||||||
use lioness_blockcipher::kdf::DomSepSha256Kdf;
|
use lioness_blockcipher::kdf::DomSepSha256Kdf;
|
||||||
use lioness_blockcipher::keyed_hash::HmacSha256KeyedHash;
|
use lioness_blockcipher::keyed_hash::Sha256PrependKey;
|
||||||
use lioness_blockcipher::prelude::*;
|
use lioness_blockcipher::prelude::*;
|
||||||
type TestLioness = Lioness::<
|
type TestLioness = Lioness::<
|
||||||
Aes128CtrStreamCipher,
|
Aes128CtrStreamCipher,
|
||||||
HmacSha256KeyedHash,
|
Sha256PrependKey,
|
||||||
DomSepSha256Kdf
|
DomSepSha256Kdf,
|
||||||
>;
|
>;
|
||||||
fn get_test_key() -> Key256 {
|
fn get_test_key() -> Key256 {
|
||||||
let mut key: Key256 = Default::default();
|
let mut key: Key256 = Default::default();
|
||||||
OsRng.fill_bytes(&mut key);
|
OsRng.fill_bytes(&mut key);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user