Expand description
§ternary-lattice
Ternary lattice operations for lightweight cryptography. Vector add, matrix multiply over Z₃. Post-quantum friendly.
Functions§
- hamming_
weight - Norm: count of non-zero entries (Hamming weight).
- inner_
product - Ternary inner product (Z₃).
- lwe_
sample - Ternary LWE-style sample: (a, b = a·s + e) where s is secret, e is error.
- mat_mul
- Ternary matrix multiply.
- mat_
vec_ mul - Ternary matrix-vector multiply.
- random_
vec - Generate a random ternary vector.
- vec_add
- Ternary vector addition (Z₃).