refactor
This commit is contained in:
parent
436fd22a51
commit
31ab4d65d1
1 changed files with 2 additions and 4 deletions
|
|
@ -1,6 +1,4 @@
|
||||||
use std::os::unix::raw::mode_t;
|
use crypto_bigint::{Encoding, NonZero, Uint, U192};
|
||||||
use crypto_bigint::{BitOps, ConstZero, Encoding, Integer, Limb, MulMod, NonZero, Pow, Uint, U192};
|
|
||||||
use crypto_bigint::subtle::ConstantTimeEq;
|
|
||||||
|
|
||||||
pub fn oneoff_authenticate(message: &[u8], key: &[u8; 32]) -> [u8; 16] {
|
pub fn oneoff_authenticate(message: &[u8], key: &[u8; 32]) -> [u8; 16] {
|
||||||
let r = u128::from_le_bytes(key[0..16].try_into().unwrap());
|
let r = u128::from_le_bytes(key[0..16].try_into().unwrap());
|
||||||
|
|
@ -55,8 +53,8 @@ fn block_to_coefficient(block: &[u8]) -> U192 {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crypto_bigint::U256;
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use crypto_bigint::U256;
|
||||||
|
|
||||||
|
|
||||||
const MESSAGE: &[u8] = b"Cryptographic Forum Research Group";
|
const MESSAGE: &[u8] = b"Cryptographic Forum Research Group";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue