binius_field/arch/portable/
packed_aes_8.rs

1// Copyright 2024-2025 Irreducible Inc.
2
3use super::packed::{impl_broadcast, PackedPrimitiveType};
4use crate::{
5	arch::{PairwiseStrategy, PairwiseTableStrategy},
6	arithmetic_traits::{
7		impl_invert_with, impl_mul_alpha_with, impl_mul_with, impl_square_with,
8		impl_transformation_with_strategy,
9	},
10	AESTowerField8b,
11};
12
13// Define 16 bit packed field types
14pub type PackedAESBinaryField1x8b = PackedPrimitiveType<u8, AESTowerField8b>;
15
16// Define broadcast
17impl_broadcast!(u8, AESTowerField8b);
18
19// Define multiplication
20impl_mul_with!(PackedAESBinaryField1x8b @ PairwiseTableStrategy);
21
22// Define square
23impl_square_with!(PackedAESBinaryField1x8b @ PairwiseTableStrategy);
24
25// Define invert
26impl_invert_with!(PackedAESBinaryField1x8b @ PairwiseTableStrategy);
27
28// Define multiply by alpha
29impl_mul_alpha_with!(PackedAESBinaryField1x8b @ PairwiseTableStrategy);
30
31// Define linear transformations
32impl_transformation_with_strategy!(PackedAESBinaryField1x8b, PairwiseStrategy);