Expand description
gf256 is a module for field elements over the field GF(2**8) with irreducible polynomial x^8+x^4+x^3+x+1
WARNING this library was not audited by an expert in this area and does not guarantee constant-time cryptographic implmentation
But, This module uses the Rust crate subtle to move towards this goal and one day hopes to acheive these guarantees
§Examples
All elements are their own additive inverse GF256::zero() is the additive identity
use libss::gf256::GF256;
use libss::Field;
let x = GF256(80);
let x_plus_x = x + x;
assert_eq!(x_plus_x, GF256::zero());All elements except zero have inverses
use libss::gf256::GF256;
use libss::Field;
let x = GF256(80);
let x_mul_x = x.inverse().unwrap() * x;
assert_eq!(x_mul_x, GF256::one());Structs§
- GF256
- Represents an element in the field GF(2**8) without the use of lookup tables. This module uses subtle to hopefully achieve constant time guarantees, however this code has not been audited and should not be used in production.