1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! # Scintia-96
//!
//! A lightweight, keyed 96-bit permutation based on the Speck cipher.
//!
//! Scintia-96 is designed for use cases where you need a one-to-one mapping of a 96-bit input
//! (such as a hardware unique ID) to a 96-bit output (such as a USB serial number),
//! ensuring that uniqueness is preserved without collisions.
//!
//!
//! ## Features
//!
//! - **`cipher`** (optional): Enables the `BlockCipher` implementation for server environments.
//! This includes the `Scintia96Cipher` struct which precomputes the key schedule for efficiency
//! and enables **reversing (decrypting)** the permutation.
//!
//! ## Example
//!
//! ```rust
//! use scintia_96::Scintia96;
//!
//! // 128-bit key (4 x u32)
//! const KEY: [u32; 4] = [0x01020304, 0x05060708, 0x090a0b0c, 0x0d0e0f10];
//! const PERMUTATION: Scintia96 = Scintia96::new(KEY);
//!
//! fn main() {
//! // 96-bit block (3 x u32)
//! let block = [0xdeadbeef, 0xcafebabe, 0xfacefeed];
//! let permuted = PERMUTATION.permute(block);
//! }
//! ```
pub use Scintia96;
pub use Scintia96Cipher;
pub const ROUNDS: u32 = 32;