feat: Move prftree into ciphers crate

- Use a new nomenclature for these functions based on the idea of a hash
  domain (as in domain separation); this makes much more sence
- Remove the ciphers::hash export; we did not even export a hash
  function in the purest sence of the word. This gets us around the
  difficulty of figuring out what we should call the underlying
  primitive
This commit is contained in:
Karolin Varner
2023-11-30 17:52:41 +01:00
committed by Karolin Varner
parent 0f89ab7976
commit 77cd8a9fd1
8 changed files with 111 additions and 116 deletions

View File

@@ -5,7 +5,7 @@ pub mod subtle;
pub const KEY_LEN: usize = 32;
const_assert!(KEY_LEN == aead::KEY_LEN);
const_assert!(KEY_LEN == xaead::KEY_LEN);
const_assert!(KEY_LEN == hash::KEY_LEN);
const_assert!(KEY_LEN == hash_domain::KEY_LEN);
/// Authenticated encryption with associated data
pub mod aead {
@@ -21,8 +21,4 @@ pub mod xaead {
};
}
pub mod hash {
pub use crate::subtle::incorrect_hmac_blake2b::{
hash, KEY_LEN, KEY_MAX, KEY_MIN, OUT_MAX, OUT_MIN,
};
}
pub mod hash_domain;