RustCrypto: BelT Key Wrap Algorithm
Pure Rust implementation of the belt-kwp key wrapping algorithm defined in STB 4.101.31-2020.
Examples
use hex;
use KeyInit;
let x: = hex!;
let i: = hex!;
let k: = hex!;
let y: = hex!;
let mut buf = ;
let kw = new;
let wrapped_key = kw.wrap_key.unwrap;
assert_eq!;
let unwrapped_key = kw.unwrap_key.unwrap;
assert_eq!;
// If key size is known at compile time, you can use the fixed methods:
use U32;
let wrapped_key = kw.;
assert_eq!;
let unwrapped_key = kw..unwrap;
assert_eq!;
License
Licensed under either of:
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.