binius_field/arch/portable/
packed_aes_16.rs1use super::{
4 packed::{impl_broadcast, PackedPrimitiveType},
5 packed_arithmetic::impl_tower_constants,
6};
7use crate::{
8 arch::{PackedStrategy, PairwiseRecursiveStrategy, PairwiseStrategy, PairwiseTableStrategy},
9 arithmetic_traits::{
10 impl_invert_with, impl_mul_alpha_with, impl_mul_with, impl_square_with,
11 impl_transformation_with_strategy,
12 },
13 AESTowerField16b, AESTowerField8b,
14};
15
16pub type PackedAESBinaryField2x8b = PackedPrimitiveType<u16, AESTowerField8b>;
18pub type PackedAESBinaryField1x16b = PackedPrimitiveType<u16, AESTowerField16b>;
19
20impl_broadcast!(u16, AESTowerField8b);
22impl_broadcast!(u16, AESTowerField16b);
23
24impl_tower_constants!(AESTowerField8b, u16, 0x00d3);
26
27impl_mul_with!(PackedAESBinaryField2x8b @ PairwiseTableStrategy);
29impl_mul_with!(PackedAESBinaryField1x16b @ PairwiseRecursiveStrategy);
30
31impl_square_with!(PackedAESBinaryField2x8b @ PairwiseTableStrategy);
33impl_square_with!(PackedAESBinaryField1x16b @ PairwiseRecursiveStrategy);
34
35impl_invert_with!(PackedAESBinaryField2x8b @ PairwiseTableStrategy);
37impl_invert_with!(PackedAESBinaryField1x16b @ PairwiseRecursiveStrategy);
38
39impl_mul_alpha_with!(PackedAESBinaryField2x8b @ PairwiseTableStrategy);
41impl_mul_alpha_with!(PackedAESBinaryField1x16b @ PackedStrategy);
42
43impl_transformation_with_strategy!(PackedAESBinaryField2x8b, PackedStrategy);
45impl_transformation_with_strategy!(PackedAESBinaryField1x16b, PairwiseStrategy);