Module base
Source Available on crate feature crypto only.
Expand description
自研密码原语实现:SBox 表、雪崩混合函数、轻量流式哈希与 mse/imse 加解密。
需要启用 "crypto" 特性。
- LightHasher
- SBOX_BASE
- derive
- gen_p
- gen_s
- imse
- imse_no_ps
- imse_no_s
- inv_mul8
- inv_p
- inv_s
- ir8
- mix64
- 带 SBox 头尾扰动和前馈的不可逆 64 位雪崩混合函数。
- mix64_next
- 步进一次并混合,
mix64(x + GOLDEN) 的便捷封装。 - mse
- mse_no_ps
- mse_no_s
- p8
- r8
- x: 明文字节
l: 上一字节对应的密文
i: 当前字节的序号/轮数
k: 密钥
p: 当前轮使用的 8 元素比特置换表
s: 当前轮使用的 256 元素字节替换表
- s8
- shuffle_with