From 6d58de25004c6762e33434a46b76d8e0a0cb1743 Mon Sep 17 00:00:00 2001 From: Matej Penciak Date: Wed, 5 Jun 2024 18:28:37 -0400 Subject: [PATCH] review comments --- scripts/poseidon2_rust_params.sage | 15 +- src/poseidon/config.rs | 11 +- src/poseidon/constants.rs | 4739 ++++++++++++++-------------- src/poseidon/util.rs | 2 +- 4 files changed, 2416 insertions(+), 2351 deletions(-) diff --git a/scripts/poseidon2_rust_params.sage b/scripts/poseidon2_rust_params.sage index e071b710..a2bf7243 100644 --- a/scripts/poseidon2_rust_params.sage +++ b/scripts/poseidon2_rust_params.sage @@ -603,7 +603,7 @@ def to_field(value, p): value = hex(int(value))[2:] value = "0x" + value.zfill(l - 2) # print("from_hex(\"{}\"),".format(value)) - print(f"f({value}),") + print(f"BabyBear::from_canonical_u32({value}),") def generate_constants_file(): @@ -615,15 +615,10 @@ def generate_constants_file(): """) print() print("use lazy_static::*;") + print("use hybrid_array::{Array, typenum::*};") print("use p3_baby_bear::BabyBear;") print("use p3_field::AbstractField;") print() - print(""" -fn f(u: u32) -> BabyBear { - BabyBear::from_canonical_u32(u) -} - """ - ) for t in range(4, 44, 4): p = 2013265921 # BabyBear n = len(p.bits()) @@ -653,10 +648,10 @@ fn f(u: u32) -> BabyBear { MATRIX_PARTIAL_DIAGONAL_M_1 = [matrix_partial_m_1(MATRIX_PARTIAL, NUM_CELLS, F)[i,i] for i in range(0, NUM_CELLS)] # Efficient partial matrix (diagonal - 1) - print("pub static ref MATRIX_DIAG_{}_BABYBEAR: [BabyBear; {}]= [".format(t, t)) + print("pub static ref MATRIX_DIAG_{}_BABYBEAR: Array = Array::clone_from_slice([".format(t, t)) for val in MATRIX_PARTIAL_DIAGONAL_M_1: - to_field(val, p) - print("];") + to_field(val - 1, p) + print("].as_ref());") print() diff --git a/src/poseidon/config.rs b/src/poseidon/config.rs index 13b89142..8903f0ca 100644 --- a/src/poseidon/config.rs +++ b/src/poseidon/config.rs @@ -5,7 +5,8 @@ use std::slice; use hybrid_array::{typenum::*, Array, ArraySize}; use p3_baby_bear::BabyBear; -use p3_field::{AbstractField, Field}; +use p3_field::Field; +use p3_poseidon2::matmul_internal; use p3_poseidon2::{DiffusionPermutation, Poseidon2, Poseidon2ExternalMatrixGeneral}; use p3_symmetric::Permutation; @@ -51,8 +52,9 @@ macro_rules! impl_poseidon_config { const R_F: usize = $r_f; type R = $r_t; + #[inline] fn matrix_diag() -> &'static Array { - Array::from_slice(&*$diag) + $diag.as_ref() } fn round_constants_iter() -> impl IntoIterator { @@ -67,10 +69,7 @@ macro_rules! impl_poseidon_config { impl Permutation<[$field; $width]> for InternalDiffusion { fn permute_mut(&self, input: &mut [$field; $width]) { - let sum: $field = input.iter().copied().sum(); - for i in 0..$width { - input[i] = sum + ($diag[i] + $field::neg_one()) * input[i]; - } + matmul_internal(input, *$diag.as_ref()); } } diff --git a/src/poseidon/constants.rs b/src/poseidon/constants.rs index 3d1271ea..926ba379 100644 --- a/src/poseidon/constants.rs +++ b/src/poseidon/constants.rs @@ -3,2428 +3,2499 @@ //! modified version of the script found at //! https://github.com/HorizenLabs/poseidon2/blob/main/poseidon2_rust_params.sage +use hybrid_array::{typenum::*, Array}; use lazy_static::*; use p3_baby_bear::BabyBear; use p3_field::AbstractField; -fn f(u: u32) -> BabyBear { - BabyBear::from_canonical_u32(u) -} - -// +++ t = 4 R_F = 8, R_P = 21 +++ +// +++ t = 4, R_F = 8, R_P = 21 +++ lazy_static! { - pub static ref MATRIX_DIAG_4_BABYBEAR: [BabyBear; 4] = - [f(0x35bf6f47), f(0x6982669f), f(0x41f852b2), f(0x375cdab8),]; + pub static ref MATRIX_DIAG_4_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x35bf6f46), + BabyBear::from_canonical_u32(0x6982669e), + BabyBear::from_canonical_u32(0x41f852b1), + BabyBear::from_canonical_u32(0x375cdab7), + ] + .as_ref() + ); pub static ref FULL_RC_4_8: [[BabyBear; 4]; 8] = [ - [f(0x1b149b6a), f(0x550ada3b), f(0x22880f72), f(0x162976de),], - [f(0x1459035b), f(0x5b23b851), f(0x0ecb6c50), f(0x5e25906e),], - [f(0x2e627964), f(0x13edaf43), f(0x0f39a91a), f(0x4d1036b2),], - [f(0x07151a71), f(0x0688d32c), f(0x640c2308), f(0x4a823ac0),], - [f(0x36415973), f(0x1f6c2a2b), f(0x0fc447c9), f(0x0e06ec31),], - [f(0x759e0d3b), f(0x53928b9d), f(0x1f031a41), f(0x084357dc),], - [f(0x18a44a08), f(0x4e979922), f(0x591b777e), f(0x1698aa28),], - [f(0x6c89ede2), f(0x49941eeb), f(0x23d71466), f(0x4ca1ef20),], + [ + BabyBear::from_canonical_u32(0x1b149b6a), + BabyBear::from_canonical_u32(0x550ada3b), + BabyBear::from_canonical_u32(0x22880f72), + BabyBear::from_canonical_u32(0x162976de), + ], + [ + BabyBear::from_canonical_u32(0x1459035b), + BabyBear::from_canonical_u32(0x5b23b851), + BabyBear::from_canonical_u32(0x0ecb6c50), + BabyBear::from_canonical_u32(0x5e25906e), + ], + [ + BabyBear::from_canonical_u32(0x2e627964), + BabyBear::from_canonical_u32(0x13edaf43), + BabyBear::from_canonical_u32(0x0f39a91a), + BabyBear::from_canonical_u32(0x4d1036b2), + ], + [ + BabyBear::from_canonical_u32(0x07151a71), + BabyBear::from_canonical_u32(0x0688d32c), + BabyBear::from_canonical_u32(0x640c2308), + BabyBear::from_canonical_u32(0x4a823ac0), + ], + [ + BabyBear::from_canonical_u32(0x36415973), + BabyBear::from_canonical_u32(0x1f6c2a2b), + BabyBear::from_canonical_u32(0x0fc447c9), + BabyBear::from_canonical_u32(0x0e06ec31), + ], + [ + BabyBear::from_canonical_u32(0x759e0d3b), + BabyBear::from_canonical_u32(0x53928b9d), + BabyBear::from_canonical_u32(0x1f031a41), + BabyBear::from_canonical_u32(0x084357dc), + ], + [ + BabyBear::from_canonical_u32(0x18a44a08), + BabyBear::from_canonical_u32(0x4e979922), + BabyBear::from_canonical_u32(0x591b777e), + BabyBear::from_canonical_u32(0x1698aa28), + ], + [ + BabyBear::from_canonical_u32(0x6c89ede2), + BabyBear::from_canonical_u32(0x49941eeb), + BabyBear::from_canonical_u32(0x23d71466), + BabyBear::from_canonical_u32(0x4ca1ef20), + ], ]; pub static ref PART_RC_4_21: [BabyBear; 21] = [ - f(0x664a061a), - f(0x735f9276), - f(0x1d33aa59), - f(0x444266ad), - f(0x65a98dc1), - f(0x210f7e1c), - f(0x05c429eb), - f(0x12c9f1d5), - f(0x56e16908), - f(0x2cc4000f), - f(0x4cc1175d), - f(0x4696830c), - f(0x7276ab5e), - f(0x0429e580), - f(0x1eaddf35), - f(0x3d04814b), - f(0x0ce9d10c), - f(0x0c1bd2b2), - f(0x5c0afe62), - f(0x41d3d05c), - f(0x4ea8fba8), + BabyBear::from_canonical_u32(0x664a061a), + BabyBear::from_canonical_u32(0x735f9276), + BabyBear::from_canonical_u32(0x1d33aa59), + BabyBear::from_canonical_u32(0x444266ad), + BabyBear::from_canonical_u32(0x65a98dc1), + BabyBear::from_canonical_u32(0x210f7e1c), + BabyBear::from_canonical_u32(0x05c429eb), + BabyBear::from_canonical_u32(0x12c9f1d5), + BabyBear::from_canonical_u32(0x56e16908), + BabyBear::from_canonical_u32(0x2cc4000f), + BabyBear::from_canonical_u32(0x4cc1175d), + BabyBear::from_canonical_u32(0x4696830c), + BabyBear::from_canonical_u32(0x7276ab5e), + BabyBear::from_canonical_u32(0x0429e580), + BabyBear::from_canonical_u32(0x1eaddf35), + BabyBear::from_canonical_u32(0x3d04814b), + BabyBear::from_canonical_u32(0x0ce9d10c), + BabyBear::from_canonical_u32(0x0c1bd2b2), + BabyBear::from_canonical_u32(0x5c0afe62), + BabyBear::from_canonical_u32(0x41d3d05c), + BabyBear::from_canonical_u32(0x4ea8fba8), ]; } -// +++ t = 8 R_F = 8, R_P = 12 +++ +// +++ t = 8, R_F = 8, R_P = 12 +++ lazy_static! { - pub static ref MATRIX_DIAG_8_BABYBEAR: [BabyBear; 8] = [ - f(0x17a3691b), - f(0x00849879), - f(0x1f7b62e3), - f(0x05967b10), - f(0x427c865a), - f(0x3f3341ae), - f(0x52490f5b), - f(0x468846c5), - ]; + pub static ref MATRIX_DIAG_8_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x17a3691a), + BabyBear::from_canonical_u32(0x00849878), + BabyBear::from_canonical_u32(0x1f7b62e2), + BabyBear::from_canonical_u32(0x05967b0f), + BabyBear::from_canonical_u32(0x427c8659), + BabyBear::from_canonical_u32(0x3f3341ad), + BabyBear::from_canonical_u32(0x52490f5a), + BabyBear::from_canonical_u32(0x468846c4), + ] + .as_ref() + ); pub static ref FULL_RC_8_8: [[BabyBear; 8]; 8] = [ [ - f(0x11978cde), - f(0x531baacd), - f(0x62fc3e61), - f(0x6c5443d7), - f(0x213f7bea), - f(0x441daf50), - f(0x5b73b0ca), - f(0x37ac458a), - ], - [ - f(0x578d452a), - f(0x1105d869), - f(0x5f972521), - f(0x638ac688), - f(0x22bb206c), - f(0x3d2bb74b), - f(0x08b3659e), - f(0x5c994035), - ], - [ - f(0x0bf823b5), - f(0x0f126f71), - f(0x4b3f0e22), - f(0x3274c979), - f(0x2a7e2fde), - f(0x4c5efc43), - f(0x51c10a78), - f(0x1b63549b), - ], - [ - f(0x3f6b4823), - f(0x4e3d9da4), - f(0x669fe91c), - f(0x51f27231), - f(0x47eb6c6c), - f(0x2cbe68db), - f(0x3a09b20d), - f(0x19cd3c02), - ], - [ - f(0x0794f50d), - f(0x074d2212), - f(0x1a6c8f20), - f(0x1babe8f5), - f(0x16d15c2e), - f(0x49fbb5fc), - f(0x1ecdf383), - f(0x063dc7bc), - ], - [ - f(0x545d4a85), - f(0x6a49504c), - f(0x3843670c), - f(0x586e0569), - f(0x2aa801dd), - f(0x38b4af42), - f(0x5937ccae), - f(0x2d7d72a6), - ], - [ - f(0x511a5bd1), - f(0x0dc9f554), - f(0x2c3e286e), - f(0x302b45be), - f(0x6ee05fcc), - f(0x27638646), - f(0x2b6fc4a2), - f(0x4c10b913), - ], - [ - f(0x420471d2), - f(0x29b908d2), - f(0x33f97fd5), - f(0x06834fc5), - f(0x70bee4ed), - f(0x4fe57541), - f(0x620e9e99), - f(0x6355ade6), + BabyBear::from_canonical_u32(0x11978cde), + BabyBear::from_canonical_u32(0x531baacd), + BabyBear::from_canonical_u32(0x62fc3e61), + BabyBear::from_canonical_u32(0x6c5443d7), + BabyBear::from_canonical_u32(0x213f7bea), + BabyBear::from_canonical_u32(0x441daf50), + BabyBear::from_canonical_u32(0x5b73b0ca), + BabyBear::from_canonical_u32(0x37ac458a), + ], + [ + BabyBear::from_canonical_u32(0x578d452a), + BabyBear::from_canonical_u32(0x1105d869), + BabyBear::from_canonical_u32(0x5f972521), + BabyBear::from_canonical_u32(0x638ac688), + BabyBear::from_canonical_u32(0x22bb206c), + BabyBear::from_canonical_u32(0x3d2bb74b), + BabyBear::from_canonical_u32(0x08b3659e), + BabyBear::from_canonical_u32(0x5c994035), + ], + [ + BabyBear::from_canonical_u32(0x0bf823b5), + BabyBear::from_canonical_u32(0x0f126f71), + BabyBear::from_canonical_u32(0x4b3f0e22), + BabyBear::from_canonical_u32(0x3274c979), + BabyBear::from_canonical_u32(0x2a7e2fde), + BabyBear::from_canonical_u32(0x4c5efc43), + BabyBear::from_canonical_u32(0x51c10a78), + BabyBear::from_canonical_u32(0x1b63549b), + ], + [ + BabyBear::from_canonical_u32(0x3f6b4823), + BabyBear::from_canonical_u32(0x4e3d9da4), + BabyBear::from_canonical_u32(0x669fe91c), + BabyBear::from_canonical_u32(0x51f27231), + BabyBear::from_canonical_u32(0x47eb6c6c), + BabyBear::from_canonical_u32(0x2cbe68db), + BabyBear::from_canonical_u32(0x3a09b20d), + BabyBear::from_canonical_u32(0x19cd3c02), + ], + [ + BabyBear::from_canonical_u32(0x0794f50d), + BabyBear::from_canonical_u32(0x074d2212), + BabyBear::from_canonical_u32(0x1a6c8f20), + BabyBear::from_canonical_u32(0x1babe8f5), + BabyBear::from_canonical_u32(0x16d15c2e), + BabyBear::from_canonical_u32(0x49fbb5fc), + BabyBear::from_canonical_u32(0x1ecdf383), + BabyBear::from_canonical_u32(0x063dc7bc), + ], + [ + BabyBear::from_canonical_u32(0x545d4a85), + BabyBear::from_canonical_u32(0x6a49504c), + BabyBear::from_canonical_u32(0x3843670c), + BabyBear::from_canonical_u32(0x586e0569), + BabyBear::from_canonical_u32(0x2aa801dd), + BabyBear::from_canonical_u32(0x38b4af42), + BabyBear::from_canonical_u32(0x5937ccae), + BabyBear::from_canonical_u32(0x2d7d72a6), + ], + [ + BabyBear::from_canonical_u32(0x511a5bd1), + BabyBear::from_canonical_u32(0x0dc9f554), + BabyBear::from_canonical_u32(0x2c3e286e), + BabyBear::from_canonical_u32(0x302b45be), + BabyBear::from_canonical_u32(0x6ee05fcc), + BabyBear::from_canonical_u32(0x27638646), + BabyBear::from_canonical_u32(0x2b6fc4a2), + BabyBear::from_canonical_u32(0x4c10b913), + ], + [ + BabyBear::from_canonical_u32(0x420471d2), + BabyBear::from_canonical_u32(0x29b908d2), + BabyBear::from_canonical_u32(0x33f97fd5), + BabyBear::from_canonical_u32(0x06834fc5), + BabyBear::from_canonical_u32(0x70bee4ed), + BabyBear::from_canonical_u32(0x4fe57541), + BabyBear::from_canonical_u32(0x620e9e99), + BabyBear::from_canonical_u32(0x6355ade6), ], ]; pub static ref PART_RC_8_12: [BabyBear; 12] = [ - f(0x3d69b95e), - f(0x47e08f02), - f(0x73d51f24), - f(0x18689a99), - f(0x2d7d8b9d), - f(0x2a19c971), - f(0x0afebd15), - f(0x69b8a7ff), - f(0x1bb20d3b), - f(0x24fa2759), - f(0x7334f71d), - f(0x09e230b1), + BabyBear::from_canonical_u32(0x3d69b95e), + BabyBear::from_canonical_u32(0x47e08f02), + BabyBear::from_canonical_u32(0x73d51f24), + BabyBear::from_canonical_u32(0x18689a99), + BabyBear::from_canonical_u32(0x2d7d8b9d), + BabyBear::from_canonical_u32(0x2a19c971), + BabyBear::from_canonical_u32(0x0afebd15), + BabyBear::from_canonical_u32(0x69b8a7ff), + BabyBear::from_canonical_u32(0x1bb20d3b), + BabyBear::from_canonical_u32(0x24fa2759), + BabyBear::from_canonical_u32(0x7334f71d), + BabyBear::from_canonical_u32(0x09e230b1), ]; } -// +++ t = 12 R_F = 8, R_P = 10 +++ +// +++ t = 12, R_F = 8, R_P = 10 +++ lazy_static! { - pub static ref MATRIX_DIAG_12_BABYBEAR: [BabyBear; 12] = [ - f(0x5ce6d17f), - f(0x392b0107), - f(0x0cbd124c), - f(0x06f099b6), - f(0x6cb3ebb4), - f(0x363069b1), - f(0x4de47c37), - f(0x06af5a0b), - f(0x52a0045e), - f(0x3e9f380d), - f(0x0df8c11e), - f(0x63a32985), - ]; + pub static ref MATRIX_DIAG_12_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x5ce6d17e), + BabyBear::from_canonical_u32(0x392b0106), + BabyBear::from_canonical_u32(0x0cbd124b), + BabyBear::from_canonical_u32(0x06f099b5), + BabyBear::from_canonical_u32(0x6cb3ebb3), + BabyBear::from_canonical_u32(0x363069b0), + BabyBear::from_canonical_u32(0x4de47c36), + BabyBear::from_canonical_u32(0x06af5a0a), + BabyBear::from_canonical_u32(0x52a0045d), + BabyBear::from_canonical_u32(0x3e9f380c), + BabyBear::from_canonical_u32(0x0df8c11d), + BabyBear::from_canonical_u32(0x63a32984), + ] + .as_ref() + ); pub static ref FULL_RC_12_8: [[BabyBear; 12]; 8] = [ [ - f(0x44d3bb88), - f(0x774148c9), - f(0x1562425e), - f(0x5070628b), - f(0x68799490), - f(0x046f432e), - f(0x0f2e4358), - f(0x53c99049), - f(0x751c6051), - f(0x5b9ebc5a), - f(0x058893f0), - f(0x0dd5dd7d), - ], - [ - f(0x4c2b4eac), - f(0x5a528be0), - f(0x675fbcc3), - f(0x740c9d60), - f(0x4bc6dec2), - f(0x23c5a8e4), - f(0x3189bd8c), - f(0x11ce185c), - f(0x68b9bb90), - f(0x670e9d8f), - f(0x703eadbc), - f(0x7102faf0), - ], - [ - f(0x576838aa), - f(0x1b6c76c6), - f(0x51f500b4), - f(0x15d639b6), - f(0x5c0245c9), - f(0x6f8df3bb), - f(0x4d0cc32b), - f(0x47b3c08b), - f(0x19292b3c), - f(0x096230be), - f(0x173c9b43), - f(0x253558fa), - ], - [ - f(0x72787bae), - f(0x47ca9db3), - f(0x44234b4b), - f(0x4f47de93), - f(0x7309f557), - f(0x0e7113f8), - f(0x5ccfa802), - f(0x45f84e30), - f(0x518a065f), - f(0x2f6df559), - f(0x69815d68), - f(0x273fe8a1), - ], - [ - f(0x2bceacc0), - f(0x32a22f3b), - f(0x6e4b4664), - f(0x45d5907c), - f(0x2aa63f10), - f(0x48edb36d), - f(0x4ce8a0f9), - f(0x190673fe), - f(0x74878323), - f(0x0c953e5b), - f(0x6c251bb8), - f(0x6a1b0031), - ], - [ - f(0x66c83144), - f(0x29e57c9a), - f(0x70c4d4bc), - f(0x4aef5f94), - f(0x358a7014), - f(0x078d8eae), - f(0x416be810), - f(0x77dacb86), - f(0x36958cc3), - f(0x3d125dbd), - f(0x6ce43bf2), - f(0x16e0b7e0), - ], - [ - f(0x50de3232), - f(0x3466fea8), - f(0x1dabba6d), - f(0x5cefe2b6), - f(0x0fcb3de4), - f(0x16d0a86a), - f(0x2bb9da47), - f(0x1aab3a29), - f(0x2e0ada0b), - f(0x3c3ee3b6), - f(0x3a678be3), - f(0x19fee590), - ], - [ - f(0x0084ff04), - f(0x35ae6b25), - f(0x761eaf7d), - f(0x0ed3fca7), - f(0x156b59c4), - f(0x55e273f5), - f(0x2f1907f5), - f(0x3430dd1d), - f(0x101600c6), - f(0x66b38947), - f(0x212250e0), - f(0x62befa2c), + BabyBear::from_canonical_u32(0x44d3bb88), + BabyBear::from_canonical_u32(0x774148c9), + BabyBear::from_canonical_u32(0x1562425e), + BabyBear::from_canonical_u32(0x5070628b), + BabyBear::from_canonical_u32(0x68799490), + BabyBear::from_canonical_u32(0x046f432e), + BabyBear::from_canonical_u32(0x0f2e4358), + BabyBear::from_canonical_u32(0x53c99049), + BabyBear::from_canonical_u32(0x751c6051), + BabyBear::from_canonical_u32(0x5b9ebc5a), + BabyBear::from_canonical_u32(0x058893f0), + BabyBear::from_canonical_u32(0x0dd5dd7d), + ], + [ + BabyBear::from_canonical_u32(0x4c2b4eac), + BabyBear::from_canonical_u32(0x5a528be0), + BabyBear::from_canonical_u32(0x675fbcc3), + BabyBear::from_canonical_u32(0x740c9d60), + BabyBear::from_canonical_u32(0x4bc6dec2), + BabyBear::from_canonical_u32(0x23c5a8e4), + BabyBear::from_canonical_u32(0x3189bd8c), + BabyBear::from_canonical_u32(0x11ce185c), + BabyBear::from_canonical_u32(0x68b9bb90), + BabyBear::from_canonical_u32(0x670e9d8f), + BabyBear::from_canonical_u32(0x703eadbc), + BabyBear::from_canonical_u32(0x7102faf0), + ], + [ + BabyBear::from_canonical_u32(0x576838aa), + BabyBear::from_canonical_u32(0x1b6c76c6), + BabyBear::from_canonical_u32(0x51f500b4), + BabyBear::from_canonical_u32(0x15d639b6), + BabyBear::from_canonical_u32(0x5c0245c9), + BabyBear::from_canonical_u32(0x6f8df3bb), + BabyBear::from_canonical_u32(0x4d0cc32b), + BabyBear::from_canonical_u32(0x47b3c08b), + BabyBear::from_canonical_u32(0x19292b3c), + BabyBear::from_canonical_u32(0x096230be), + BabyBear::from_canonical_u32(0x173c9b43), + BabyBear::from_canonical_u32(0x253558fa), + ], + [ + BabyBear::from_canonical_u32(0x72787bae), + BabyBear::from_canonical_u32(0x47ca9db3), + BabyBear::from_canonical_u32(0x44234b4b), + BabyBear::from_canonical_u32(0x4f47de93), + BabyBear::from_canonical_u32(0x7309f557), + BabyBear::from_canonical_u32(0x0e7113f8), + BabyBear::from_canonical_u32(0x5ccfa802), + BabyBear::from_canonical_u32(0x45f84e30), + BabyBear::from_canonical_u32(0x518a065f), + BabyBear::from_canonical_u32(0x2f6df559), + BabyBear::from_canonical_u32(0x69815d68), + BabyBear::from_canonical_u32(0x273fe8a1), + ], + [ + BabyBear::from_canonical_u32(0x2bceacc0), + BabyBear::from_canonical_u32(0x32a22f3b), + BabyBear::from_canonical_u32(0x6e4b4664), + BabyBear::from_canonical_u32(0x45d5907c), + BabyBear::from_canonical_u32(0x2aa63f10), + BabyBear::from_canonical_u32(0x48edb36d), + BabyBear::from_canonical_u32(0x4ce8a0f9), + BabyBear::from_canonical_u32(0x190673fe), + BabyBear::from_canonical_u32(0x74878323), + BabyBear::from_canonical_u32(0x0c953e5b), + BabyBear::from_canonical_u32(0x6c251bb8), + BabyBear::from_canonical_u32(0x6a1b0031), + ], + [ + BabyBear::from_canonical_u32(0x66c83144), + BabyBear::from_canonical_u32(0x29e57c9a), + BabyBear::from_canonical_u32(0x70c4d4bc), + BabyBear::from_canonical_u32(0x4aef5f94), + BabyBear::from_canonical_u32(0x358a7014), + BabyBear::from_canonical_u32(0x078d8eae), + BabyBear::from_canonical_u32(0x416be810), + BabyBear::from_canonical_u32(0x77dacb86), + BabyBear::from_canonical_u32(0x36958cc3), + BabyBear::from_canonical_u32(0x3d125dbd), + BabyBear::from_canonical_u32(0x6ce43bf2), + BabyBear::from_canonical_u32(0x16e0b7e0), + ], + [ + BabyBear::from_canonical_u32(0x50de3232), + BabyBear::from_canonical_u32(0x3466fea8), + BabyBear::from_canonical_u32(0x1dabba6d), + BabyBear::from_canonical_u32(0x5cefe2b6), + BabyBear::from_canonical_u32(0x0fcb3de4), + BabyBear::from_canonical_u32(0x16d0a86a), + BabyBear::from_canonical_u32(0x2bb9da47), + BabyBear::from_canonical_u32(0x1aab3a29), + BabyBear::from_canonical_u32(0x2e0ada0b), + BabyBear::from_canonical_u32(0x3c3ee3b6), + BabyBear::from_canonical_u32(0x3a678be3), + BabyBear::from_canonical_u32(0x19fee590), + ], + [ + BabyBear::from_canonical_u32(0x0084ff04), + BabyBear::from_canonical_u32(0x35ae6b25), + BabyBear::from_canonical_u32(0x761eaf7d), + BabyBear::from_canonical_u32(0x0ed3fca7), + BabyBear::from_canonical_u32(0x156b59c4), + BabyBear::from_canonical_u32(0x55e273f5), + BabyBear::from_canonical_u32(0x2f1907f5), + BabyBear::from_canonical_u32(0x3430dd1d), + BabyBear::from_canonical_u32(0x101600c6), + BabyBear::from_canonical_u32(0x66b38947), + BabyBear::from_canonical_u32(0x212250e0), + BabyBear::from_canonical_u32(0x62befa2c), ], ]; pub static ref PART_RC_12_10: [BabyBear; 10] = [ - f(0x43317763), - f(0x74e4c89e), - f(0x42162b7e), - f(0x2ea3f9a5), - f(0x2bb30c04), - f(0x24744474), - f(0x69e8a40b), - f(0x50951c70), - f(0x47ff91bf), - f(0x5d7f98c6), + BabyBear::from_canonical_u32(0x43317763), + BabyBear::from_canonical_u32(0x74e4c89e), + BabyBear::from_canonical_u32(0x42162b7e), + BabyBear::from_canonical_u32(0x2ea3f9a5), + BabyBear::from_canonical_u32(0x2bb30c04), + BabyBear::from_canonical_u32(0x24744474), + BabyBear::from_canonical_u32(0x69e8a40b), + BabyBear::from_canonical_u32(0x50951c70), + BabyBear::from_canonical_u32(0x47ff91bf), + BabyBear::from_canonical_u32(0x5d7f98c6), ]; } -// +++ t = 16 R_F = 8, R_P = 13 +++ +// +++ t = 16, R_F = 8, R_P = 13 +++ lazy_static! { - pub static ref MATRIX_DIAG_16_BABYBEAR: [BabyBear; 16] = [ - f(0x0a632d94), - f(0x6db657b7), - f(0x56fbdc9e), - f(0x052b3d8a), - f(0x33745201), - f(0x5c03108c), - f(0x0beba37b), - f(0x258c2e8b), - f(0x12029f39), - f(0x694909ce), - f(0x6d231724), - f(0x21c3b222), - f(0x3c0904a5), - f(0x01d6acda), - f(0x27705c83), - f(0x5231c802), - ]; + pub static ref MATRIX_DIAG_16_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x0a632d93), + BabyBear::from_canonical_u32(0x6db657b6), + BabyBear::from_canonical_u32(0x56fbdc9d), + BabyBear::from_canonical_u32(0x052b3d89), + BabyBear::from_canonical_u32(0x33745200), + BabyBear::from_canonical_u32(0x5c03108b), + BabyBear::from_canonical_u32(0x0beba37a), + BabyBear::from_canonical_u32(0x258c2e8a), + BabyBear::from_canonical_u32(0x12029f38), + BabyBear::from_canonical_u32(0x694909cd), + BabyBear::from_canonical_u32(0x6d231723), + BabyBear::from_canonical_u32(0x21c3b221), + BabyBear::from_canonical_u32(0x3c0904a4), + BabyBear::from_canonical_u32(0x01d6acd9), + BabyBear::from_canonical_u32(0x27705c82), + BabyBear::from_canonical_u32(0x5231c801), + ] + .as_ref() + ); pub static ref FULL_RC_16_8: [[BabyBear; 16]; 8] = [ [ - f(0x69cbb6af), - f(0x46ad93f9), - f(0x60a00f4e), - f(0x6b1297cd), - f(0x23189afe), - f(0x732e7bef), - f(0x72c246de), - f(0x2c941900), - f(0x0557eede), - f(0x1580496f), - f(0x3a3ea77b), - f(0x54f3f271), - f(0x0f49b029), - f(0x47872fe1), - f(0x221e2e36), - f(0x1ab7202e), - ], - [ - f(0x487779a6), - f(0x3851c9d8), - f(0x38dc17c0), - f(0x209f8849), - f(0x268dcee8), - f(0x350c48da), - f(0x5b9ad32e), - f(0x0523272b), - f(0x3f89055b), - f(0x01e894b2), - f(0x13ddedde), - f(0x1b2ef334), - f(0x7507d8b4), - f(0x6ceeb94e), - f(0x52eb6ba2), - f(0x50642905), - ], - [ - f(0x05453f3f), - f(0x06349efc), - f(0x6922787c), - f(0x04bfff9c), - f(0x768c714a), - f(0x3e9ff21a), - f(0x15737c9c), - f(0x2229c807), - f(0x0d47f88c), - f(0x097e0ecc), - f(0x27eadba0), - f(0x2d7d29e4), - f(0x3502aaa0), - f(0x0f475fd7), - f(0x29fbda49), - f(0x018afffd), - ], - [ - f(0x0315b618), - f(0x6d4497d1), - f(0x1b171d9e), - f(0x52861abd), - f(0x2e5d0501), - f(0x3ec8646c), - f(0x6e5f250a), - f(0x148ae8e6), - f(0x17f5fa4a), - f(0x3e66d284), - f(0x0051aa3b), - f(0x483f7913), - f(0x2cfe5f15), - f(0x023427ca), - f(0x2cc78315), - f(0x1e36ea47), - ], - [ - f(0x7290a80d), - f(0x6f7e5329), - f(0x598ec8a8), - f(0x76a859a0), - f(0x6559e868), - f(0x657b83af), - f(0x13271d3f), - f(0x1f876063), - f(0x0aeeae37), - f(0x706e9ca6), - f(0x46400cee), - f(0x72a05c26), - f(0x2c589c9e), - f(0x20bd37a7), - f(0x6a2d3d10), - f(0x20523767), - ], - [ - f(0x5b8fe9c4), - f(0x2aa501d6), - f(0x1e01ac3e), - f(0x1448bc54), - f(0x5ce5ad1c), - f(0x4918a14d), - f(0x2c46a83f), - f(0x4fcf6876), - f(0x61d8d5c8), - f(0x6ddf4ff9), - f(0x11fda4d3), - f(0x02933a8f), - f(0x170eaf81), - f(0x5a9c314f), - f(0x49a12590), - f(0x35ec52a1), - ], - [ - f(0x58eb1611), - f(0x5e481e65), - f(0x367125c9), - f(0x0eba33ba), - f(0x1fc28ded), - f(0x066399ad), - f(0x0cbec0ea), - f(0x75fd1af0), - f(0x50f5bf4e), - f(0x643d5f41), - f(0x6f4fe718), - f(0x5b3cbbde), - f(0x1e3afb3e), - f(0x296fb027), - f(0x45e1547b), - f(0x4a8db2ab), - ], - [ - f(0x59986d19), - f(0x30bcdfa3), - f(0x1db63932), - f(0x1d7c2824), - f(0x53b33681), - f(0x0673b747), - f(0x038a98a3), - f(0x2c5bce60), - f(0x351979cd), - f(0x5008fb73), - f(0x547bca78), - f(0x711af481), - f(0x3f93bf64), - f(0x644d987b), - f(0x3c8bcd87), - f(0x608758b8), + BabyBear::from_canonical_u32(0x69cbb6af), + BabyBear::from_canonical_u32(0x46ad93f9), + BabyBear::from_canonical_u32(0x60a00f4e), + BabyBear::from_canonical_u32(0x6b1297cd), + BabyBear::from_canonical_u32(0x23189afe), + BabyBear::from_canonical_u32(0x732e7bef), + BabyBear::from_canonical_u32(0x72c246de), + BabyBear::from_canonical_u32(0x2c941900), + BabyBear::from_canonical_u32(0x0557eede), + BabyBear::from_canonical_u32(0x1580496f), + BabyBear::from_canonical_u32(0x3a3ea77b), + BabyBear::from_canonical_u32(0x54f3f271), + BabyBear::from_canonical_u32(0x0f49b029), + BabyBear::from_canonical_u32(0x47872fe1), + BabyBear::from_canonical_u32(0x221e2e36), + BabyBear::from_canonical_u32(0x1ab7202e), + ], + [ + BabyBear::from_canonical_u32(0x487779a6), + BabyBear::from_canonical_u32(0x3851c9d8), + BabyBear::from_canonical_u32(0x38dc17c0), + BabyBear::from_canonical_u32(0x209f8849), + BabyBear::from_canonical_u32(0x268dcee8), + BabyBear::from_canonical_u32(0x350c48da), + BabyBear::from_canonical_u32(0x5b9ad32e), + BabyBear::from_canonical_u32(0x0523272b), + BabyBear::from_canonical_u32(0x3f89055b), + BabyBear::from_canonical_u32(0x01e894b2), + BabyBear::from_canonical_u32(0x13ddedde), + BabyBear::from_canonical_u32(0x1b2ef334), + BabyBear::from_canonical_u32(0x7507d8b4), + BabyBear::from_canonical_u32(0x6ceeb94e), + BabyBear::from_canonical_u32(0x52eb6ba2), + BabyBear::from_canonical_u32(0x50642905), + ], + [ + BabyBear::from_canonical_u32(0x05453f3f), + BabyBear::from_canonical_u32(0x06349efc), + BabyBear::from_canonical_u32(0x6922787c), + BabyBear::from_canonical_u32(0x04bfff9c), + BabyBear::from_canonical_u32(0x768c714a), + BabyBear::from_canonical_u32(0x3e9ff21a), + BabyBear::from_canonical_u32(0x15737c9c), + BabyBear::from_canonical_u32(0x2229c807), + BabyBear::from_canonical_u32(0x0d47f88c), + BabyBear::from_canonical_u32(0x097e0ecc), + BabyBear::from_canonical_u32(0x27eadba0), + BabyBear::from_canonical_u32(0x2d7d29e4), + BabyBear::from_canonical_u32(0x3502aaa0), + BabyBear::from_canonical_u32(0x0f475fd7), + BabyBear::from_canonical_u32(0x29fbda49), + BabyBear::from_canonical_u32(0x018afffd), + ], + [ + BabyBear::from_canonical_u32(0x0315b618), + BabyBear::from_canonical_u32(0x6d4497d1), + BabyBear::from_canonical_u32(0x1b171d9e), + BabyBear::from_canonical_u32(0x52861abd), + BabyBear::from_canonical_u32(0x2e5d0501), + BabyBear::from_canonical_u32(0x3ec8646c), + BabyBear::from_canonical_u32(0x6e5f250a), + BabyBear::from_canonical_u32(0x148ae8e6), + BabyBear::from_canonical_u32(0x17f5fa4a), + BabyBear::from_canonical_u32(0x3e66d284), + BabyBear::from_canonical_u32(0x0051aa3b), + BabyBear::from_canonical_u32(0x483f7913), + BabyBear::from_canonical_u32(0x2cfe5f15), + BabyBear::from_canonical_u32(0x023427ca), + BabyBear::from_canonical_u32(0x2cc78315), + BabyBear::from_canonical_u32(0x1e36ea47), + ], + [ + BabyBear::from_canonical_u32(0x7290a80d), + BabyBear::from_canonical_u32(0x6f7e5329), + BabyBear::from_canonical_u32(0x598ec8a8), + BabyBear::from_canonical_u32(0x76a859a0), + BabyBear::from_canonical_u32(0x6559e868), + BabyBear::from_canonical_u32(0x657b83af), + BabyBear::from_canonical_u32(0x13271d3f), + BabyBear::from_canonical_u32(0x1f876063), + BabyBear::from_canonical_u32(0x0aeeae37), + BabyBear::from_canonical_u32(0x706e9ca6), + BabyBear::from_canonical_u32(0x46400cee), + BabyBear::from_canonical_u32(0x72a05c26), + BabyBear::from_canonical_u32(0x2c589c9e), + BabyBear::from_canonical_u32(0x20bd37a7), + BabyBear::from_canonical_u32(0x6a2d3d10), + BabyBear::from_canonical_u32(0x20523767), + ], + [ + BabyBear::from_canonical_u32(0x5b8fe9c4), + BabyBear::from_canonical_u32(0x2aa501d6), + BabyBear::from_canonical_u32(0x1e01ac3e), + BabyBear::from_canonical_u32(0x1448bc54), + BabyBear::from_canonical_u32(0x5ce5ad1c), + BabyBear::from_canonical_u32(0x4918a14d), + BabyBear::from_canonical_u32(0x2c46a83f), + BabyBear::from_canonical_u32(0x4fcf6876), + BabyBear::from_canonical_u32(0x61d8d5c8), + BabyBear::from_canonical_u32(0x6ddf4ff9), + BabyBear::from_canonical_u32(0x11fda4d3), + BabyBear::from_canonical_u32(0x02933a8f), + BabyBear::from_canonical_u32(0x170eaf81), + BabyBear::from_canonical_u32(0x5a9c314f), + BabyBear::from_canonical_u32(0x49a12590), + BabyBear::from_canonical_u32(0x35ec52a1), + ], + [ + BabyBear::from_canonical_u32(0x58eb1611), + BabyBear::from_canonical_u32(0x5e481e65), + BabyBear::from_canonical_u32(0x367125c9), + BabyBear::from_canonical_u32(0x0eba33ba), + BabyBear::from_canonical_u32(0x1fc28ded), + BabyBear::from_canonical_u32(0x066399ad), + BabyBear::from_canonical_u32(0x0cbec0ea), + BabyBear::from_canonical_u32(0x75fd1af0), + BabyBear::from_canonical_u32(0x50f5bf4e), + BabyBear::from_canonical_u32(0x643d5f41), + BabyBear::from_canonical_u32(0x6f4fe718), + BabyBear::from_canonical_u32(0x5b3cbbde), + BabyBear::from_canonical_u32(0x1e3afb3e), + BabyBear::from_canonical_u32(0x296fb027), + BabyBear::from_canonical_u32(0x45e1547b), + BabyBear::from_canonical_u32(0x4a8db2ab), + ], + [ + BabyBear::from_canonical_u32(0x59986d19), + BabyBear::from_canonical_u32(0x30bcdfa3), + BabyBear::from_canonical_u32(0x1db63932), + BabyBear::from_canonical_u32(0x1d7c2824), + BabyBear::from_canonical_u32(0x53b33681), + BabyBear::from_canonical_u32(0x0673b747), + BabyBear::from_canonical_u32(0x038a98a3), + BabyBear::from_canonical_u32(0x2c5bce60), + BabyBear::from_canonical_u32(0x351979cd), + BabyBear::from_canonical_u32(0x5008fb73), + BabyBear::from_canonical_u32(0x547bca78), + BabyBear::from_canonical_u32(0x711af481), + BabyBear::from_canonical_u32(0x3f93bf64), + BabyBear::from_canonical_u32(0x644d987b), + BabyBear::from_canonical_u32(0x3c8bcd87), + BabyBear::from_canonical_u32(0x608758b8), ], ]; pub static ref PART_RC_16_13: [BabyBear; 13] = [ - f(0x5a8053c0), - f(0x693be639), - f(0x3858867d), - f(0x19334f6b), - f(0x128f0fd8), - f(0x4e2b1ccb), - f(0x61210ce0), - f(0x3c318939), - f(0x0b5b2f22), - f(0x2edb11d5), - f(0x213effdf), - f(0x0cac4606), - f(0x241af16d), + BabyBear::from_canonical_u32(0x5a8053c0), + BabyBear::from_canonical_u32(0x693be639), + BabyBear::from_canonical_u32(0x3858867d), + BabyBear::from_canonical_u32(0x19334f6b), + BabyBear::from_canonical_u32(0x128f0fd8), + BabyBear::from_canonical_u32(0x4e2b1ccb), + BabyBear::from_canonical_u32(0x61210ce0), + BabyBear::from_canonical_u32(0x3c318939), + BabyBear::from_canonical_u32(0x0b5b2f22), + BabyBear::from_canonical_u32(0x2edb11d5), + BabyBear::from_canonical_u32(0x213effdf), + BabyBear::from_canonical_u32(0x0cac4606), + BabyBear::from_canonical_u32(0x241af16d), ]; } -// +++ t = 20 R_F = 8, R_P = 18 +++ +// +++ t = 20, R_F = 8, R_P = 18 +++ lazy_static! { - pub static ref MATRIX_DIAG_20_BABYBEAR: [BabyBear; 20] = [ - f(0x60531da3), - f(0x332932db), - f(0x61f05e57), - f(0x614050f8), - f(0x4323c6dd), - f(0x10b33547), - f(0x5e5ce1d8), - f(0x19a24085), - f(0x3c697e93), - f(0x365de6b9), - f(0x71f95068), - f(0x350c9228), - f(0x3883d125), - f(0x51502e2e), - f(0x1a4a8174), - f(0x01e081b2), - f(0x54c1086a), - f(0x1253bc2a), - f(0x50599b34), - f(0x025b97c3), - ]; + pub static ref MATRIX_DIAG_20_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x60531da2), + BabyBear::from_canonical_u32(0x332932da), + BabyBear::from_canonical_u32(0x61f05e56), + BabyBear::from_canonical_u32(0x614050f7), + BabyBear::from_canonical_u32(0x4323c6dc), + BabyBear::from_canonical_u32(0x10b33546), + BabyBear::from_canonical_u32(0x5e5ce1d7), + BabyBear::from_canonical_u32(0x19a24084), + BabyBear::from_canonical_u32(0x3c697e92), + BabyBear::from_canonical_u32(0x365de6b8), + BabyBear::from_canonical_u32(0x71f95067), + BabyBear::from_canonical_u32(0x350c9227), + BabyBear::from_canonical_u32(0x3883d124), + BabyBear::from_canonical_u32(0x51502e2d), + BabyBear::from_canonical_u32(0x1a4a8173), + BabyBear::from_canonical_u32(0x01e081b1), + BabyBear::from_canonical_u32(0x54c10869), + BabyBear::from_canonical_u32(0x1253bc29), + BabyBear::from_canonical_u32(0x50599b33), + BabyBear::from_canonical_u32(0x025b97c2), + ] + .as_ref() + ); pub static ref FULL_RC_20_8: [[BabyBear; 20]; 8] = [ [ - f(0x30cd4497), - f(0x67cf7d92), - f(0x113ca786), - f(0x28f511f7), - f(0x4c850311), - f(0x3dc07be8), - f(0x0c8214b9), - f(0x18090d97), - f(0x684f35fb), - f(0x11eeba68), - f(0x567d0ca7), - f(0x6d3fbebc), - f(0x47028460), - f(0x09a8d433), - f(0x46bc5d5c), - f(0x110805b2), - f(0x50dddc82), - f(0x001ee4fa), - f(0x55ed4719), - f(0x4708bdce), - ], - [ - f(0x1a530b2b), - f(0x6d372400), - f(0x32101d42), - f(0x02b0d7d0), - f(0x3064f512), - f(0x670f3c64), - f(0x35735e31), - f(0x5a2b6144), - f(0x210d6ba6), - f(0x1274e66a), - f(0x212e3e09), - f(0x57e62ff0), - f(0x6b631874), - f(0x6b577a1b), - f(0x0d17fdaa), - f(0x24ebe81b), - f(0x34f6c9fe), - f(0x591d5a55), - f(0x5f45a942), - f(0x5e454f3f), - ], - [ - f(0x23b75633), - f(0x55076170), - f(0x3caa9482), - f(0x6a2cbf00), - f(0x7224801b), - f(0x74bb2d64), - f(0x2e6d0990), - f(0x23eab921), - f(0x663603a8), - f(0x03e8e97f), - f(0x04db5d3d), - f(0x64c1e827), - f(0x37c478fe), - f(0x35efc805), - f(0x555aaef9), - f(0x6563ad0c), - f(0x14c9aeac), - f(0x16d6e172), - f(0x424fcbe9), - f(0x30380855), - ], - [ - f(0x74d4e5bf), - f(0x1275ba83), - f(0x56f32a2d), - f(0x3cf97f89), - f(0x440c5711), - f(0x48687e8a), - f(0x496600f8), - f(0x0b0e429f), - f(0x154b1e26), - f(0x379bb8ce), - f(0x277683e5), - f(0x4403e094), - f(0x12033240), - f(0x3bd006d7), - f(0x4ee6ee1b), - f(0x62c6764c), - f(0x7230552f), - f(0x4f341de7), - f(0x3c8f8c49), - f(0x6fc6bee2), - ], - [ - f(0x27ef98aa), - f(0x043e120b), - f(0x647d5ccd), - f(0x455c81b2), - f(0x6ac27d3f), - f(0x279f6126), - f(0x76a15758), - f(0x58c1b0a6), - f(0x4af83901), - f(0x45641d4f), - f(0x1dfe8c33), - f(0x03720c88), - f(0x3482d40d), - f(0x770d8960), - f(0x6108b730), - f(0x063fc084), - f(0x096e2a34), - f(0x130514a0), - f(0x42bc3eff), - f(0x43775848), - ], - [ - f(0x702960e4), - f(0x6cf19c79), - f(0x4c3030dd), - f(0x6dd27932), - f(0x64350de9), - f(0x480e8311), - f(0x6a22632c), - f(0x2814bcf6), - f(0x117197e3), - f(0x4844d419), - f(0x76e181a6), - f(0x6155d7b4), - f(0x42dbed26), - f(0x62e9c27b), - f(0x105b4f11), - f(0x51d45858), - f(0x33fa0298), - f(0x26a08228), - f(0x5f14581f), - f(0x3bd89737), - ], - [ - f(0x2325968f), - f(0x418512ba), - f(0x2f47442f), - f(0x0e680af5), - f(0x0c424cba), - f(0x6d3885ae), - f(0x0a9c8cbe), - f(0x2485f2a9), - f(0x1f99357f), - f(0x0f58d531), - f(0x32d6f6b1), - f(0x2c26876d), - f(0x2de3d38e), - f(0x5a7b6cc9), - f(0x1caec7f0), - f(0x4aa1f575), - f(0x77af0ccd), - f(0x19d3be5c), - f(0x0aa619d8), - f(0x04cfea78), - ], - [ - f(0x0db3ab76), - f(0x2ddffaa3), - f(0x52246767), - f(0x50d7f018), - f(0x318ceb9f), - f(0x2e69a506), - f(0x4bd9d1fa), - f(0x2a0b579a), - f(0x561238c2), - f(0x2877bb9a), - f(0x06ed2c79), - f(0x229998ba), - f(0x737f0185), - f(0x609aad31), - f(0x2cee3551), - f(0x4434bd17), - f(0x1da8546f), - f(0x3532fbe6), - f(0x2637b96d), - f(0x02b04084), + BabyBear::from_canonical_u32(0x30cd4497), + BabyBear::from_canonical_u32(0x67cf7d92), + BabyBear::from_canonical_u32(0x113ca786), + BabyBear::from_canonical_u32(0x28f511f7), + BabyBear::from_canonical_u32(0x4c850311), + BabyBear::from_canonical_u32(0x3dc07be8), + BabyBear::from_canonical_u32(0x0c8214b9), + BabyBear::from_canonical_u32(0x18090d97), + BabyBear::from_canonical_u32(0x684f35fb), + BabyBear::from_canonical_u32(0x11eeba68), + BabyBear::from_canonical_u32(0x567d0ca7), + BabyBear::from_canonical_u32(0x6d3fbebc), + BabyBear::from_canonical_u32(0x47028460), + BabyBear::from_canonical_u32(0x09a8d433), + BabyBear::from_canonical_u32(0x46bc5d5c), + BabyBear::from_canonical_u32(0x110805b2), + BabyBear::from_canonical_u32(0x50dddc82), + BabyBear::from_canonical_u32(0x001ee4fa), + BabyBear::from_canonical_u32(0x55ed4719), + BabyBear::from_canonical_u32(0x4708bdce), + ], + [ + BabyBear::from_canonical_u32(0x1a530b2b), + BabyBear::from_canonical_u32(0x6d372400), + BabyBear::from_canonical_u32(0x32101d42), + BabyBear::from_canonical_u32(0x02b0d7d0), + BabyBear::from_canonical_u32(0x3064f512), + BabyBear::from_canonical_u32(0x670f3c64), + BabyBear::from_canonical_u32(0x35735e31), + BabyBear::from_canonical_u32(0x5a2b6144), + BabyBear::from_canonical_u32(0x210d6ba6), + BabyBear::from_canonical_u32(0x1274e66a), + BabyBear::from_canonical_u32(0x212e3e09), + BabyBear::from_canonical_u32(0x57e62ff0), + BabyBear::from_canonical_u32(0x6b631874), + BabyBear::from_canonical_u32(0x6b577a1b), + BabyBear::from_canonical_u32(0x0d17fdaa), + BabyBear::from_canonical_u32(0x24ebe81b), + BabyBear::from_canonical_u32(0x34f6c9fe), + BabyBear::from_canonical_u32(0x591d5a55), + BabyBear::from_canonical_u32(0x5f45a942), + BabyBear::from_canonical_u32(0x5e454f3f), + ], + [ + BabyBear::from_canonical_u32(0x23b75633), + BabyBear::from_canonical_u32(0x55076170), + BabyBear::from_canonical_u32(0x3caa9482), + BabyBear::from_canonical_u32(0x6a2cbf00), + BabyBear::from_canonical_u32(0x7224801b), + BabyBear::from_canonical_u32(0x74bb2d64), + BabyBear::from_canonical_u32(0x2e6d0990), + BabyBear::from_canonical_u32(0x23eab921), + BabyBear::from_canonical_u32(0x663603a8), + BabyBear::from_canonical_u32(0x03e8e97f), + BabyBear::from_canonical_u32(0x04db5d3d), + BabyBear::from_canonical_u32(0x64c1e827), + BabyBear::from_canonical_u32(0x37c478fe), + BabyBear::from_canonical_u32(0x35efc805), + BabyBear::from_canonical_u32(0x555aaef9), + BabyBear::from_canonical_u32(0x6563ad0c), + BabyBear::from_canonical_u32(0x14c9aeac), + BabyBear::from_canonical_u32(0x16d6e172), + BabyBear::from_canonical_u32(0x424fcbe9), + BabyBear::from_canonical_u32(0x30380855), + ], + [ + BabyBear::from_canonical_u32(0x74d4e5bf), + BabyBear::from_canonical_u32(0x1275ba83), + BabyBear::from_canonical_u32(0x56f32a2d), + BabyBear::from_canonical_u32(0x3cf97f89), + BabyBear::from_canonical_u32(0x440c5711), + BabyBear::from_canonical_u32(0x48687e8a), + BabyBear::from_canonical_u32(0x496600f8), + BabyBear::from_canonical_u32(0x0b0e429f), + BabyBear::from_canonical_u32(0x154b1e26), + BabyBear::from_canonical_u32(0x379bb8ce), + BabyBear::from_canonical_u32(0x277683e5), + BabyBear::from_canonical_u32(0x4403e094), + BabyBear::from_canonical_u32(0x12033240), + BabyBear::from_canonical_u32(0x3bd006d7), + BabyBear::from_canonical_u32(0x4ee6ee1b), + BabyBear::from_canonical_u32(0x62c6764c), + BabyBear::from_canonical_u32(0x7230552f), + BabyBear::from_canonical_u32(0x4f341de7), + BabyBear::from_canonical_u32(0x3c8f8c49), + BabyBear::from_canonical_u32(0x6fc6bee2), + ], + [ + BabyBear::from_canonical_u32(0x27ef98aa), + BabyBear::from_canonical_u32(0x043e120b), + BabyBear::from_canonical_u32(0x647d5ccd), + BabyBear::from_canonical_u32(0x455c81b2), + BabyBear::from_canonical_u32(0x6ac27d3f), + BabyBear::from_canonical_u32(0x279f6126), + BabyBear::from_canonical_u32(0x76a15758), + BabyBear::from_canonical_u32(0x58c1b0a6), + BabyBear::from_canonical_u32(0x4af83901), + BabyBear::from_canonical_u32(0x45641d4f), + BabyBear::from_canonical_u32(0x1dfe8c33), + BabyBear::from_canonical_u32(0x03720c88), + BabyBear::from_canonical_u32(0x3482d40d), + BabyBear::from_canonical_u32(0x770d8960), + BabyBear::from_canonical_u32(0x6108b730), + BabyBear::from_canonical_u32(0x063fc084), + BabyBear::from_canonical_u32(0x096e2a34), + BabyBear::from_canonical_u32(0x130514a0), + BabyBear::from_canonical_u32(0x42bc3eff), + BabyBear::from_canonical_u32(0x43775848), + ], + [ + BabyBear::from_canonical_u32(0x702960e4), + BabyBear::from_canonical_u32(0x6cf19c79), + BabyBear::from_canonical_u32(0x4c3030dd), + BabyBear::from_canonical_u32(0x6dd27932), + BabyBear::from_canonical_u32(0x64350de9), + BabyBear::from_canonical_u32(0x480e8311), + BabyBear::from_canonical_u32(0x6a22632c), + BabyBear::from_canonical_u32(0x2814bcf6), + BabyBear::from_canonical_u32(0x117197e3), + BabyBear::from_canonical_u32(0x4844d419), + BabyBear::from_canonical_u32(0x76e181a6), + BabyBear::from_canonical_u32(0x6155d7b4), + BabyBear::from_canonical_u32(0x42dbed26), + BabyBear::from_canonical_u32(0x62e9c27b), + BabyBear::from_canonical_u32(0x105b4f11), + BabyBear::from_canonical_u32(0x51d45858), + BabyBear::from_canonical_u32(0x33fa0298), + BabyBear::from_canonical_u32(0x26a08228), + BabyBear::from_canonical_u32(0x5f14581f), + BabyBear::from_canonical_u32(0x3bd89737), + ], + [ + BabyBear::from_canonical_u32(0x2325968f), + BabyBear::from_canonical_u32(0x418512ba), + BabyBear::from_canonical_u32(0x2f47442f), + BabyBear::from_canonical_u32(0x0e680af5), + BabyBear::from_canonical_u32(0x0c424cba), + BabyBear::from_canonical_u32(0x6d3885ae), + BabyBear::from_canonical_u32(0x0a9c8cbe), + BabyBear::from_canonical_u32(0x2485f2a9), + BabyBear::from_canonical_u32(0x1f99357f), + BabyBear::from_canonical_u32(0x0f58d531), + BabyBear::from_canonical_u32(0x32d6f6b1), + BabyBear::from_canonical_u32(0x2c26876d), + BabyBear::from_canonical_u32(0x2de3d38e), + BabyBear::from_canonical_u32(0x5a7b6cc9), + BabyBear::from_canonical_u32(0x1caec7f0), + BabyBear::from_canonical_u32(0x4aa1f575), + BabyBear::from_canonical_u32(0x77af0ccd), + BabyBear::from_canonical_u32(0x19d3be5c), + BabyBear::from_canonical_u32(0x0aa619d8), + BabyBear::from_canonical_u32(0x04cfea78), + ], + [ + BabyBear::from_canonical_u32(0x0db3ab76), + BabyBear::from_canonical_u32(0x2ddffaa3), + BabyBear::from_canonical_u32(0x52246767), + BabyBear::from_canonical_u32(0x50d7f018), + BabyBear::from_canonical_u32(0x318ceb9f), + BabyBear::from_canonical_u32(0x2e69a506), + BabyBear::from_canonical_u32(0x4bd9d1fa), + BabyBear::from_canonical_u32(0x2a0b579a), + BabyBear::from_canonical_u32(0x561238c2), + BabyBear::from_canonical_u32(0x2877bb9a), + BabyBear::from_canonical_u32(0x06ed2c79), + BabyBear::from_canonical_u32(0x229998ba), + BabyBear::from_canonical_u32(0x737f0185), + BabyBear::from_canonical_u32(0x609aad31), + BabyBear::from_canonical_u32(0x2cee3551), + BabyBear::from_canonical_u32(0x4434bd17), + BabyBear::from_canonical_u32(0x1da8546f), + BabyBear::from_canonical_u32(0x3532fbe6), + BabyBear::from_canonical_u32(0x2637b96d), + BabyBear::from_canonical_u32(0x02b04084), ], ]; pub static ref PART_RC_20_18: [BabyBear; 18] = [ - f(0x0a3ef74d), - f(0x23710107), - f(0x24650c82), - f(0x12baebd4), - f(0x46c2f3ce), - f(0x57816fd9), - f(0x443fe51c), - f(0x2a7805ab), - f(0x3f508ef1), - f(0x150b836c), - f(0x1c014ffa), - f(0x1c0786be), - f(0x10645190), - f(0x607b9c0a), - f(0x48961505), - f(0x6f20b7bb), - f(0x5b5aea23), - f(0x1fe5355c), + BabyBear::from_canonical_u32(0x0a3ef74d), + BabyBear::from_canonical_u32(0x23710107), + BabyBear::from_canonical_u32(0x24650c82), + BabyBear::from_canonical_u32(0x12baebd4), + BabyBear::from_canonical_u32(0x46c2f3ce), + BabyBear::from_canonical_u32(0x57816fd9), + BabyBear::from_canonical_u32(0x443fe51c), + BabyBear::from_canonical_u32(0x2a7805ab), + BabyBear::from_canonical_u32(0x3f508ef1), + BabyBear::from_canonical_u32(0x150b836c), + BabyBear::from_canonical_u32(0x1c014ffa), + BabyBear::from_canonical_u32(0x1c0786be), + BabyBear::from_canonical_u32(0x10645190), + BabyBear::from_canonical_u32(0x607b9c0a), + BabyBear::from_canonical_u32(0x48961505), + BabyBear::from_canonical_u32(0x6f20b7bb), + BabyBear::from_canonical_u32(0x5b5aea23), + BabyBear::from_canonical_u32(0x1fe5355c), ]; } -// +++ t = 24 R_F = 8, R_P = 21 +++ +// +++ t = 24, R_F = 8, R_P = 21 +++ lazy_static! { - pub static ref MATRIX_DIAG_24_BABYBEAR: [BabyBear; 24] = [ - f(0x409133f0), - f(0x1667a8a1), - f(0x06a6c7b6), - f(0x6f53160e), - f(0x273b11d1), - f(0x03176c5d), - f(0x72f9bbf9), - f(0x73ceba91), - f(0x5cdef81d), - f(0x01393285), - f(0x46daee06), - f(0x065d7ba6), - f(0x52d72d6f), - f(0x05dd05e0), - f(0x3bab4b63), - f(0x6ada3842), - f(0x2fc5fbec), - f(0x770d61b0), - f(0x5715aae9), - f(0x03ef0e90), - f(0x75b6c770), - f(0x242adf5f), - f(0x00d0ca4c), - f(0x36c0e388), - ]; + pub static ref MATRIX_DIAG_24_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x409133ef), + BabyBear::from_canonical_u32(0x1667a8a0), + BabyBear::from_canonical_u32(0x06a6c7b5), + BabyBear::from_canonical_u32(0x6f53160d), + BabyBear::from_canonical_u32(0x273b11d0), + BabyBear::from_canonical_u32(0x03176c5c), + BabyBear::from_canonical_u32(0x72f9bbf8), + BabyBear::from_canonical_u32(0x73ceba90), + BabyBear::from_canonical_u32(0x5cdef81c), + BabyBear::from_canonical_u32(0x01393284), + BabyBear::from_canonical_u32(0x46daee05), + BabyBear::from_canonical_u32(0x065d7ba5), + BabyBear::from_canonical_u32(0x52d72d6e), + BabyBear::from_canonical_u32(0x05dd05df), + BabyBear::from_canonical_u32(0x3bab4b62), + BabyBear::from_canonical_u32(0x6ada3841), + BabyBear::from_canonical_u32(0x2fc5fbeb), + BabyBear::from_canonical_u32(0x770d61af), + BabyBear::from_canonical_u32(0x5715aae8), + BabyBear::from_canonical_u32(0x03ef0e8f), + BabyBear::from_canonical_u32(0x75b6c76f), + BabyBear::from_canonical_u32(0x242adf5e), + BabyBear::from_canonical_u32(0x00d0ca4b), + BabyBear::from_canonical_u32(0x36c0e387), + ] + .as_ref() + ); pub static ref FULL_RC_24_8: [[BabyBear; 24]; 8] = [ [ - f(0x0fa20c37), - f(0x0795bb97), - f(0x12c60b9c), - f(0x0eabd88e), - f(0x096485ca), - f(0x07093527), - f(0x1b1d4e50), - f(0x30a01ace), - f(0x3bd86f5a), - f(0x69af7c28), - f(0x3f94775f), - f(0x731560e8), - f(0x465a0ecd), - f(0x574ef807), - f(0x62fd4870), - f(0x52ccfe44), - f(0x14772b14), - f(0x4dedf371), - f(0x260acd7c), - f(0x1f51dc58), - f(0x75125532), - f(0x686a4d7b), - f(0x54bac179), - f(0x31947706), - ], - [ - f(0x29799d3b), - f(0x6e01ae90), - f(0x203a7a64), - f(0x4f7e25be), - f(0x72503f77), - f(0x45bd3b69), - f(0x769bd6b4), - f(0x5a867f08), - f(0x4fdba082), - f(0x251c4318), - f(0x28f06201), - f(0x6788c43a), - f(0x4c6d6a99), - f(0x357784a8), - f(0x2abaf051), - f(0x770f7de6), - f(0x1794b784), - f(0x4796c57a), - f(0x724b7a10), - f(0x449989a7), - f(0x64935cf1), - f(0x59e14aac), - f(0x0e620bb8), - f(0x3af5a33b), - ], - [ - f(0x4465cc0e), - f(0x019df68f), - f(0x4af8d068), - f(0x08784f82), - f(0x0cefdeae), - f(0x6337a467), - f(0x32fa7a16), - f(0x486f62d6), - f(0x386a7480), - f(0x20f17c4a), - f(0x54e50da8), - f(0x2012cf03), - f(0x5fe52950), - f(0x09afb6cd), - f(0x2523044e), - f(0x5c54d0ef), - f(0x71c01f3c), - f(0x60b2c4fb), - f(0x4050b379), - f(0x5e6a70a5), - f(0x418543f5), - f(0x71debe56), - f(0x1aad2994), - f(0x3368a483), - ], - [ - f(0x07a86f3a), - f(0x5ea43ff1), - f(0x2443780e), - f(0x4ce444f7), - f(0x146f9882), - f(0x3132b089), - f(0x197ea856), - f(0x667030c3), - f(0x2317d5dc), - f(0x0c2c48a7), - f(0x56b2df66), - f(0x67bd81e9), - f(0x4fcdfb19), - f(0x4baaef32), - f(0x0328d30a), - f(0x6235760d), - f(0x12432912), - f(0x0a49e258), - f(0x030e1b70), - f(0x48caeb03), - f(0x49e4d9e9), - f(0x1051b5c6), - f(0x6a36dbbe), - f(0x4cff27a5), - ], - [ - f(0x032959ad), - f(0x2b18af6a), - f(0x55d3dc8c), - f(0x43bd26c8), - f(0x0c41595f), - f(0x7048d2e2), - f(0x00db8983), - f(0x2af563d7), - f(0x6e84758f), - f(0x611d64e1), - f(0x1f9977e2), - f(0x64163a0a), - f(0x5c5fc27b), - f(0x02e22561), - f(0x3a2d75db), - f(0x1ba7b71a), - f(0x34343f64), - f(0x7406b35d), - f(0x19df8299), - f(0x6ff4480a), - f(0x514a81c8), - f(0x57ab52ce), - f(0x6ad69f52), - f(0x3e0c0e0d), - ], - [ - f(0x48126114), - f(0x2a9d62cc), - f(0x17441f23), - f(0x485762bb), - f(0x2f218674), - f(0x06fdc64a), - f(0x0861b7f2), - f(0x3b36eee6), - f(0x70a11040), - f(0x04b31737), - f(0x3722a872), - f(0x2a351c63), - f(0x623560dc), - f(0x62584ab2), - f(0x382c7c04), - f(0x3bf9edc7), - f(0x0e38fe51), - f(0x376f3b10), - f(0x5381e178), - f(0x3afc61c7), - f(0x5c1bcb4d), - f(0x6643ce1f), - f(0x2d0af1c1), - f(0x08f583cc), - ], - [ - f(0x5d6ff60f), - f(0x6324c1e5), - f(0x74412fb7), - f(0x70c0192e), - f(0x0b72f141), - f(0x4067a111), - f(0x57388c4f), - f(0x351009ec), - f(0x0974c159), - f(0x539a58b3), - f(0x038c0cff), - f(0x476c0392), - f(0x3f7bc15f), - f(0x4491dd2c), - f(0x4d1fef55), - f(0x04936ae3), - f(0x58214dd4), - f(0x683c6aad), - f(0x1b42f16b), - f(0x6dc79135), - f(0x2d4e71ec), - f(0x3e2946ea), - f(0x59dce8db), - f(0x6cee892a), - ], - [ - f(0x47f07350), - f(0x7106ce93), - f(0x3bd4a7a9), - f(0x2bfe636a), - f(0x430011e9), - f(0x001cd66a), - f(0x307faf5b), - f(0x0d9ef3fe), - f(0x6d40043a), - f(0x2e8f470c), - f(0x1b6865e8), - f(0x0c0e6c01), - f(0x4d41981f), - f(0x423b9d3d), - f(0x410408cc), - f(0x263f0884), - f(0x5311bbd0), - f(0x4dae58d8), - f(0x30401cea), - f(0x09afa575), - f(0x4b3d5b42), - f(0x63ac0b37), - f(0x5fe5bb14), - f(0x5244e9d4), + BabyBear::from_canonical_u32(0x0fa20c37), + BabyBear::from_canonical_u32(0x0795bb97), + BabyBear::from_canonical_u32(0x12c60b9c), + BabyBear::from_canonical_u32(0x0eabd88e), + BabyBear::from_canonical_u32(0x096485ca), + BabyBear::from_canonical_u32(0x07093527), + BabyBear::from_canonical_u32(0x1b1d4e50), + BabyBear::from_canonical_u32(0x30a01ace), + BabyBear::from_canonical_u32(0x3bd86f5a), + BabyBear::from_canonical_u32(0x69af7c28), + BabyBear::from_canonical_u32(0x3f94775f), + BabyBear::from_canonical_u32(0x731560e8), + BabyBear::from_canonical_u32(0x465a0ecd), + BabyBear::from_canonical_u32(0x574ef807), + BabyBear::from_canonical_u32(0x62fd4870), + BabyBear::from_canonical_u32(0x52ccfe44), + BabyBear::from_canonical_u32(0x14772b14), + BabyBear::from_canonical_u32(0x4dedf371), + BabyBear::from_canonical_u32(0x260acd7c), + BabyBear::from_canonical_u32(0x1f51dc58), + BabyBear::from_canonical_u32(0x75125532), + BabyBear::from_canonical_u32(0x686a4d7b), + BabyBear::from_canonical_u32(0x54bac179), + BabyBear::from_canonical_u32(0x31947706), + ], + [ + BabyBear::from_canonical_u32(0x29799d3b), + BabyBear::from_canonical_u32(0x6e01ae90), + BabyBear::from_canonical_u32(0x203a7a64), + BabyBear::from_canonical_u32(0x4f7e25be), + BabyBear::from_canonical_u32(0x72503f77), + BabyBear::from_canonical_u32(0x45bd3b69), + BabyBear::from_canonical_u32(0x769bd6b4), + BabyBear::from_canonical_u32(0x5a867f08), + BabyBear::from_canonical_u32(0x4fdba082), + BabyBear::from_canonical_u32(0x251c4318), + BabyBear::from_canonical_u32(0x28f06201), + BabyBear::from_canonical_u32(0x6788c43a), + BabyBear::from_canonical_u32(0x4c6d6a99), + BabyBear::from_canonical_u32(0x357784a8), + BabyBear::from_canonical_u32(0x2abaf051), + BabyBear::from_canonical_u32(0x770f7de6), + BabyBear::from_canonical_u32(0x1794b784), + BabyBear::from_canonical_u32(0x4796c57a), + BabyBear::from_canonical_u32(0x724b7a10), + BabyBear::from_canonical_u32(0x449989a7), + BabyBear::from_canonical_u32(0x64935cf1), + BabyBear::from_canonical_u32(0x59e14aac), + BabyBear::from_canonical_u32(0x0e620bb8), + BabyBear::from_canonical_u32(0x3af5a33b), + ], + [ + BabyBear::from_canonical_u32(0x4465cc0e), + BabyBear::from_canonical_u32(0x019df68f), + BabyBear::from_canonical_u32(0x4af8d068), + BabyBear::from_canonical_u32(0x08784f82), + BabyBear::from_canonical_u32(0x0cefdeae), + BabyBear::from_canonical_u32(0x6337a467), + BabyBear::from_canonical_u32(0x32fa7a16), + BabyBear::from_canonical_u32(0x486f62d6), + BabyBear::from_canonical_u32(0x386a7480), + BabyBear::from_canonical_u32(0x20f17c4a), + BabyBear::from_canonical_u32(0x54e50da8), + BabyBear::from_canonical_u32(0x2012cf03), + BabyBear::from_canonical_u32(0x5fe52950), + BabyBear::from_canonical_u32(0x09afb6cd), + BabyBear::from_canonical_u32(0x2523044e), + BabyBear::from_canonical_u32(0x5c54d0ef), + BabyBear::from_canonical_u32(0x71c01f3c), + BabyBear::from_canonical_u32(0x60b2c4fb), + BabyBear::from_canonical_u32(0x4050b379), + BabyBear::from_canonical_u32(0x5e6a70a5), + BabyBear::from_canonical_u32(0x418543f5), + BabyBear::from_canonical_u32(0x71debe56), + BabyBear::from_canonical_u32(0x1aad2994), + BabyBear::from_canonical_u32(0x3368a483), + ], + [ + BabyBear::from_canonical_u32(0x07a86f3a), + BabyBear::from_canonical_u32(0x5ea43ff1), + BabyBear::from_canonical_u32(0x2443780e), + BabyBear::from_canonical_u32(0x4ce444f7), + BabyBear::from_canonical_u32(0x146f9882), + BabyBear::from_canonical_u32(0x3132b089), + BabyBear::from_canonical_u32(0x197ea856), + BabyBear::from_canonical_u32(0x667030c3), + BabyBear::from_canonical_u32(0x2317d5dc), + BabyBear::from_canonical_u32(0x0c2c48a7), + BabyBear::from_canonical_u32(0x56b2df66), + BabyBear::from_canonical_u32(0x67bd81e9), + BabyBear::from_canonical_u32(0x4fcdfb19), + BabyBear::from_canonical_u32(0x4baaef32), + BabyBear::from_canonical_u32(0x0328d30a), + BabyBear::from_canonical_u32(0x6235760d), + BabyBear::from_canonical_u32(0x12432912), + BabyBear::from_canonical_u32(0x0a49e258), + BabyBear::from_canonical_u32(0x030e1b70), + BabyBear::from_canonical_u32(0x48caeb03), + BabyBear::from_canonical_u32(0x49e4d9e9), + BabyBear::from_canonical_u32(0x1051b5c6), + BabyBear::from_canonical_u32(0x6a36dbbe), + BabyBear::from_canonical_u32(0x4cff27a5), + ], + [ + BabyBear::from_canonical_u32(0x032959ad), + BabyBear::from_canonical_u32(0x2b18af6a), + BabyBear::from_canonical_u32(0x55d3dc8c), + BabyBear::from_canonical_u32(0x43bd26c8), + BabyBear::from_canonical_u32(0x0c41595f), + BabyBear::from_canonical_u32(0x7048d2e2), + BabyBear::from_canonical_u32(0x00db8983), + BabyBear::from_canonical_u32(0x2af563d7), + BabyBear::from_canonical_u32(0x6e84758f), + BabyBear::from_canonical_u32(0x611d64e1), + BabyBear::from_canonical_u32(0x1f9977e2), + BabyBear::from_canonical_u32(0x64163a0a), + BabyBear::from_canonical_u32(0x5c5fc27b), + BabyBear::from_canonical_u32(0x02e22561), + BabyBear::from_canonical_u32(0x3a2d75db), + BabyBear::from_canonical_u32(0x1ba7b71a), + BabyBear::from_canonical_u32(0x34343f64), + BabyBear::from_canonical_u32(0x7406b35d), + BabyBear::from_canonical_u32(0x19df8299), + BabyBear::from_canonical_u32(0x6ff4480a), + BabyBear::from_canonical_u32(0x514a81c8), + BabyBear::from_canonical_u32(0x57ab52ce), + BabyBear::from_canonical_u32(0x6ad69f52), + BabyBear::from_canonical_u32(0x3e0c0e0d), + ], + [ + BabyBear::from_canonical_u32(0x48126114), + BabyBear::from_canonical_u32(0x2a9d62cc), + BabyBear::from_canonical_u32(0x17441f23), + BabyBear::from_canonical_u32(0x485762bb), + BabyBear::from_canonical_u32(0x2f218674), + BabyBear::from_canonical_u32(0x06fdc64a), + BabyBear::from_canonical_u32(0x0861b7f2), + BabyBear::from_canonical_u32(0x3b36eee6), + BabyBear::from_canonical_u32(0x70a11040), + BabyBear::from_canonical_u32(0x04b31737), + BabyBear::from_canonical_u32(0x3722a872), + BabyBear::from_canonical_u32(0x2a351c63), + BabyBear::from_canonical_u32(0x623560dc), + BabyBear::from_canonical_u32(0x62584ab2), + BabyBear::from_canonical_u32(0x382c7c04), + BabyBear::from_canonical_u32(0x3bf9edc7), + BabyBear::from_canonical_u32(0x0e38fe51), + BabyBear::from_canonical_u32(0x376f3b10), + BabyBear::from_canonical_u32(0x5381e178), + BabyBear::from_canonical_u32(0x3afc61c7), + BabyBear::from_canonical_u32(0x5c1bcb4d), + BabyBear::from_canonical_u32(0x6643ce1f), + BabyBear::from_canonical_u32(0x2d0af1c1), + BabyBear::from_canonical_u32(0x08f583cc), + ], + [ + BabyBear::from_canonical_u32(0x5d6ff60f), + BabyBear::from_canonical_u32(0x6324c1e5), + BabyBear::from_canonical_u32(0x74412fb7), + BabyBear::from_canonical_u32(0x70c0192e), + BabyBear::from_canonical_u32(0x0b72f141), + BabyBear::from_canonical_u32(0x4067a111), + BabyBear::from_canonical_u32(0x57388c4f), + BabyBear::from_canonical_u32(0x351009ec), + BabyBear::from_canonical_u32(0x0974c159), + BabyBear::from_canonical_u32(0x539a58b3), + BabyBear::from_canonical_u32(0x038c0cff), + BabyBear::from_canonical_u32(0x476c0392), + BabyBear::from_canonical_u32(0x3f7bc15f), + BabyBear::from_canonical_u32(0x4491dd2c), + BabyBear::from_canonical_u32(0x4d1fef55), + BabyBear::from_canonical_u32(0x04936ae3), + BabyBear::from_canonical_u32(0x58214dd4), + BabyBear::from_canonical_u32(0x683c6aad), + BabyBear::from_canonical_u32(0x1b42f16b), + BabyBear::from_canonical_u32(0x6dc79135), + BabyBear::from_canonical_u32(0x2d4e71ec), + BabyBear::from_canonical_u32(0x3e2946ea), + BabyBear::from_canonical_u32(0x59dce8db), + BabyBear::from_canonical_u32(0x6cee892a), + ], + [ + BabyBear::from_canonical_u32(0x47f07350), + BabyBear::from_canonical_u32(0x7106ce93), + BabyBear::from_canonical_u32(0x3bd4a7a9), + BabyBear::from_canonical_u32(0x2bfe636a), + BabyBear::from_canonical_u32(0x430011e9), + BabyBear::from_canonical_u32(0x001cd66a), + BabyBear::from_canonical_u32(0x307faf5b), + BabyBear::from_canonical_u32(0x0d9ef3fe), + BabyBear::from_canonical_u32(0x6d40043a), + BabyBear::from_canonical_u32(0x2e8f470c), + BabyBear::from_canonical_u32(0x1b6865e8), + BabyBear::from_canonical_u32(0x0c0e6c01), + BabyBear::from_canonical_u32(0x4d41981f), + BabyBear::from_canonical_u32(0x423b9d3d), + BabyBear::from_canonical_u32(0x410408cc), + BabyBear::from_canonical_u32(0x263f0884), + BabyBear::from_canonical_u32(0x5311bbd0), + BabyBear::from_canonical_u32(0x4dae58d8), + BabyBear::from_canonical_u32(0x30401cea), + BabyBear::from_canonical_u32(0x09afa575), + BabyBear::from_canonical_u32(0x4b3d5b42), + BabyBear::from_canonical_u32(0x63ac0b37), + BabyBear::from_canonical_u32(0x5fe5bb14), + BabyBear::from_canonical_u32(0x5244e9d4), ], ]; pub static ref PART_RC_24_21: [BabyBear; 21] = [ - f(0x1da78ec2), - f(0x730b0924), - f(0x3eb56cf3), - f(0x5bd93073), - f(0x37204c97), - f(0x51642d89), - f(0x66e943e8), - f(0x1a3e72de), - f(0x70beb1e9), - f(0x30ff3b3f), - f(0x4240d1c4), - f(0x12647b8d), - f(0x65d86965), - f(0x49ef4d7c), - f(0x47785697), - f(0x46b3969f), - f(0x5c7b7a0e), - f(0x7078fc60), - f(0x4f22d482), - f(0x482a9aee), - f(0x6beb839d), + BabyBear::from_canonical_u32(0x1da78ec2), + BabyBear::from_canonical_u32(0x730b0924), + BabyBear::from_canonical_u32(0x3eb56cf3), + BabyBear::from_canonical_u32(0x5bd93073), + BabyBear::from_canonical_u32(0x37204c97), + BabyBear::from_canonical_u32(0x51642d89), + BabyBear::from_canonical_u32(0x66e943e8), + BabyBear::from_canonical_u32(0x1a3e72de), + BabyBear::from_canonical_u32(0x70beb1e9), + BabyBear::from_canonical_u32(0x30ff3b3f), + BabyBear::from_canonical_u32(0x4240d1c4), + BabyBear::from_canonical_u32(0x12647b8d), + BabyBear::from_canonical_u32(0x65d86965), + BabyBear::from_canonical_u32(0x49ef4d7c), + BabyBear::from_canonical_u32(0x47785697), + BabyBear::from_canonical_u32(0x46b3969f), + BabyBear::from_canonical_u32(0x5c7b7a0e), + BabyBear::from_canonical_u32(0x7078fc60), + BabyBear::from_canonical_u32(0x4f22d482), + BabyBear::from_canonical_u32(0x482a9aee), + BabyBear::from_canonical_u32(0x6beb839d), ]; } -// +++ t = 28 R_F = 8, R_P = 25 +++ +// +++ t = 28, R_F = 8, R_P = 25 +++ lazy_static! { - pub static ref MATRIX_DIAG_28_BABYBEAR: [BabyBear; 28] = [ - f(0x283b2717), - f(0x2c6fc85b), - f(0x025908bc), - f(0x67b2d7a7), - f(0x4e8b4f2b), - f(0x08300ccb), - f(0x2125f9d4), - f(0x498385d5), - f(0x138ec8ec), - f(0x2d31b7fd), - f(0x2eb4d121), - f(0x3213ae76), - f(0x6ec11dea), - f(0x2638059a), - f(0x4606b73e), - f(0x0703e2c8), - f(0x201416e1), - f(0x00226399), - f(0x062e93ea), - f(0x73d7ff9b), - f(0x404b55a9), - f(0x49cfa106), - f(0x4df1c572), - f(0x131cd3af), - f(0x33b6cff4), - f(0x38b2ecea), - f(0x14a8ad15), - f(0x29cd05ba), - ]; + pub static ref MATRIX_DIAG_28_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x283b2716), + BabyBear::from_canonical_u32(0x2c6fc85a), + BabyBear::from_canonical_u32(0x025908bb), + BabyBear::from_canonical_u32(0x67b2d7a6), + BabyBear::from_canonical_u32(0x4e8b4f2a), + BabyBear::from_canonical_u32(0x08300cca), + BabyBear::from_canonical_u32(0x2125f9d3), + BabyBear::from_canonical_u32(0x498385d4), + BabyBear::from_canonical_u32(0x138ec8eb), + BabyBear::from_canonical_u32(0x2d31b7fc), + BabyBear::from_canonical_u32(0x2eb4d120), + BabyBear::from_canonical_u32(0x3213ae75), + BabyBear::from_canonical_u32(0x6ec11de9), + BabyBear::from_canonical_u32(0x26380599), + BabyBear::from_canonical_u32(0x4606b73d), + BabyBear::from_canonical_u32(0x0703e2c7), + BabyBear::from_canonical_u32(0x201416e0), + BabyBear::from_canonical_u32(0x00226398), + BabyBear::from_canonical_u32(0x062e93e9), + BabyBear::from_canonical_u32(0x73d7ff9a), + BabyBear::from_canonical_u32(0x404b55a8), + BabyBear::from_canonical_u32(0x49cfa105), + BabyBear::from_canonical_u32(0x4df1c571), + BabyBear::from_canonical_u32(0x131cd3ae), + BabyBear::from_canonical_u32(0x33b6cff3), + BabyBear::from_canonical_u32(0x38b2ece9), + BabyBear::from_canonical_u32(0x14a8ad14), + BabyBear::from_canonical_u32(0x29cd05b9), + ] + .as_ref() + ); pub static ref FULL_RC_28_8: [[BabyBear; 28]; 8] = [ [ - f(0x1a4948c3), - f(0x2fc480fa), - f(0x2b671b5e), - f(0x1c8ca1f5), - f(0x609402a8), - f(0x3e704c8a), - f(0x77562af9), - f(0x497ccbfc), - f(0x2615b08c), - f(0x32b5c932), - f(0x1bb11567), - f(0x7492e9c9), - f(0x74907092), - f(0x6e6e1044), - f(0x2fd2e88f), - f(0x003e825d), - f(0x683b9e0e), - f(0x0144d7a9), - f(0x4ab37e9d), - f(0x12eade06), - f(0x18eefe2b), - f(0x47585d10), - f(0x1729f136), - f(0x60669226), - f(0x6dccf598), - f(0x5c263129), - f(0x3245fa34), - f(0x42d9caf9), - ], - [ - f(0x2ab31e11), - f(0x1beac067), - f(0x5c8cb871), - f(0x4d56d9bd), - f(0x3b83d472), - f(0x49add70a), - f(0x5d123ed3), - f(0x70a08408), - f(0x350a2a8d), - f(0x595ad1d4), - f(0x31e81ad1), - f(0x3d164565), - f(0x137ae86c), - f(0x44a23865), - f(0x1a4a5bad), - f(0x1bf1a0da), - f(0x2f92407b), - f(0x766753c3), - f(0x65a35a1f), - f(0x1d0e901b), - f(0x1af74597), - f(0x3d75a055), - f(0x3e90b02e), - f(0x3ca9824a), - f(0x4a520b3f), - f(0x60dfe638), - f(0x428bf37d), - f(0x3c8baace), - ], - [ - f(0x5d6d8540), - f(0x60609102), - f(0x497b97c3), - f(0x44d5472c), - f(0x1accfd9e), - f(0x3c9edd0b), - f(0x697ad42f), - f(0x25c38518), - f(0x0cc8492c), - f(0x14445d09), - f(0x4658bcd2), - f(0x51eef272), - f(0x529bd649), - f(0x1ac29907), - f(0x3227d497), - f(0x7647895d), - f(0x3142346b), - f(0x72dae738), - f(0x7560aa14), - f(0x36d01718), - f(0x4e85bb8a), - f(0x4468a324), - f(0x3308d84c), - f(0x110aa61e), - f(0x2f7f5cf7), - f(0x39423c98), - f(0x4b5d88dd), - f(0x72163014), - ], - [ - f(0x3ead019d), - f(0x04cfa74d), - f(0x015e70d3), - f(0x0a59ce09), - f(0x411a3c5d), - f(0x0f527fab), - f(0x0bcc3511), - f(0x2465a157), - f(0x6e4987aa), - f(0x4f93e11a), - f(0x20f57a45), - f(0x027b998c), - f(0x5f5ffb39), - f(0x0f78a6c9), - f(0x33b34c74), - f(0x16fe88ab), - f(0x6cf2dfb2), - f(0x3351e75a), - f(0x0d5dcbe7), - f(0x67c66ce1), - f(0x0c4494c5), - f(0x4458aad0), - f(0x2f831bfd), - f(0x5ec07fc3), - f(0x5fc677ad), - f(0x4ea5ee13), - f(0x13790c48), - f(0x3b9dfec2), - ], - [ - f(0x70be2dbf), - f(0x382306ee), - f(0x5b5c49f3), - f(0x6ff0b733), - f(0x18e86791), - f(0x30e1ec81), - f(0x0fe10e13), - f(0x3a111527), - f(0x15c0934e), - f(0x0cf107a7), - f(0x69b22916), - f(0x043bdb65), - f(0x44edc13c), - f(0x168bdc86), - f(0x517dfe29), - f(0x65b52719), - f(0x2d71881a), - f(0x68984de3), - f(0x6a839e43), - f(0x611ba320), - f(0x4c047bf8), - f(0x72e350b8), - f(0x2248c526), - f(0x2c27d3e3), - f(0x69fd48ad), - f(0x685d7b5f), - f(0x08692259), - f(0x5e6832d6), - ], - [ - f(0x709eaa74), - f(0x5aaf7717), - f(0x535d09e3), - f(0x34a5cde4), - f(0x2c68344d), - f(0x4d5be926), - f(0x491e10e8), - f(0x7387b09c), - f(0x468e8ac8), - f(0x5489f2cb), - f(0x6360b9c1), - f(0x32dd1c7c), - f(0x2f35debb), - f(0x148493f9), - f(0x6e666bf4), - f(0x564a395a), - f(0x0690149e), - f(0x501107f7), - f(0x676445a5), - f(0x6c7a5dee), - f(0x101eab5a), - f(0x7552acfa), - f(0x2584e9d0), - f(0x295d012f), - f(0x20c1160a), - f(0x25458f82), - f(0x473fc0dd), - f(0x47cff543), - ], - [ - f(0x3a40806f), - f(0x778580ea), - f(0x14259e23), - f(0x25a81bbd), - f(0x42106bb9), - f(0x5732e3a7), - f(0x62ce4078), - f(0x546d6761), - f(0x1c9de938), - f(0x315506cc), - f(0x3089a4a3), - f(0x51c67f25), - f(0x7497d571), - f(0x3e800932), - f(0x1bdc15b2), - f(0x3c28ce53), - f(0x4935ba1a), - f(0x6282ee19), - f(0x417ba2a6), - f(0x1be79e34), - f(0x4a9d0955), - f(0x3827b18c), - f(0x7745b964), - f(0x5a83edaf), - f(0x2bc4745d), - f(0x0e3ce800), - f(0x1d786c29), - f(0x349a0de9), - ], - [ - f(0x390b1d15), - f(0x19df53b3), - f(0x67939002), - f(0x58343136), - f(0x5e1a5175), - f(0x411c9ac5), - f(0x1a7d295d), - f(0x32295806), - f(0x5194f116), - f(0x6e35bacc), - f(0x3d15524f), - f(0x36f1a9d6), - f(0x4a5bc457), - f(0x33e352e3), - f(0x61f8c931), - f(0x395cc042), - f(0x4e0528e0), - f(0x4a7821f5), - f(0x02bb0007), - f(0x045a1f44), - f(0x338d1c13), - f(0x6c48e101), - f(0x37216fdf), - f(0x1f7cb623), - f(0x21255da5), - f(0x00d5c34f), - f(0x73caeb28), - f(0x01155649), + BabyBear::from_canonical_u32(0x1a4948c3), + BabyBear::from_canonical_u32(0x2fc480fa), + BabyBear::from_canonical_u32(0x2b671b5e), + BabyBear::from_canonical_u32(0x1c8ca1f5), + BabyBear::from_canonical_u32(0x609402a8), + BabyBear::from_canonical_u32(0x3e704c8a), + BabyBear::from_canonical_u32(0x77562af9), + BabyBear::from_canonical_u32(0x497ccbfc), + BabyBear::from_canonical_u32(0x2615b08c), + BabyBear::from_canonical_u32(0x32b5c932), + BabyBear::from_canonical_u32(0x1bb11567), + BabyBear::from_canonical_u32(0x7492e9c9), + BabyBear::from_canonical_u32(0x74907092), + BabyBear::from_canonical_u32(0x6e6e1044), + BabyBear::from_canonical_u32(0x2fd2e88f), + BabyBear::from_canonical_u32(0x003e825d), + BabyBear::from_canonical_u32(0x683b9e0e), + BabyBear::from_canonical_u32(0x0144d7a9), + BabyBear::from_canonical_u32(0x4ab37e9d), + BabyBear::from_canonical_u32(0x12eade06), + BabyBear::from_canonical_u32(0x18eefe2b), + BabyBear::from_canonical_u32(0x47585d10), + BabyBear::from_canonical_u32(0x1729f136), + BabyBear::from_canonical_u32(0x60669226), + BabyBear::from_canonical_u32(0x6dccf598), + BabyBear::from_canonical_u32(0x5c263129), + BabyBear::from_canonical_u32(0x3245fa34), + BabyBear::from_canonical_u32(0x42d9caf9), + ], + [ + BabyBear::from_canonical_u32(0x2ab31e11), + BabyBear::from_canonical_u32(0x1beac067), + BabyBear::from_canonical_u32(0x5c8cb871), + BabyBear::from_canonical_u32(0x4d56d9bd), + BabyBear::from_canonical_u32(0x3b83d472), + BabyBear::from_canonical_u32(0x49add70a), + BabyBear::from_canonical_u32(0x5d123ed3), + BabyBear::from_canonical_u32(0x70a08408), + BabyBear::from_canonical_u32(0x350a2a8d), + BabyBear::from_canonical_u32(0x595ad1d4), + BabyBear::from_canonical_u32(0x31e81ad1), + BabyBear::from_canonical_u32(0x3d164565), + BabyBear::from_canonical_u32(0x137ae86c), + BabyBear::from_canonical_u32(0x44a23865), + BabyBear::from_canonical_u32(0x1a4a5bad), + BabyBear::from_canonical_u32(0x1bf1a0da), + BabyBear::from_canonical_u32(0x2f92407b), + BabyBear::from_canonical_u32(0x766753c3), + BabyBear::from_canonical_u32(0x65a35a1f), + BabyBear::from_canonical_u32(0x1d0e901b), + BabyBear::from_canonical_u32(0x1af74597), + BabyBear::from_canonical_u32(0x3d75a055), + BabyBear::from_canonical_u32(0x3e90b02e), + BabyBear::from_canonical_u32(0x3ca9824a), + BabyBear::from_canonical_u32(0x4a520b3f), + BabyBear::from_canonical_u32(0x60dfe638), + BabyBear::from_canonical_u32(0x428bf37d), + BabyBear::from_canonical_u32(0x3c8baace), + ], + [ + BabyBear::from_canonical_u32(0x5d6d8540), + BabyBear::from_canonical_u32(0x60609102), + BabyBear::from_canonical_u32(0x497b97c3), + BabyBear::from_canonical_u32(0x44d5472c), + BabyBear::from_canonical_u32(0x1accfd9e), + BabyBear::from_canonical_u32(0x3c9edd0b), + BabyBear::from_canonical_u32(0x697ad42f), + BabyBear::from_canonical_u32(0x25c38518), + BabyBear::from_canonical_u32(0x0cc8492c), + BabyBear::from_canonical_u32(0x14445d09), + BabyBear::from_canonical_u32(0x4658bcd2), + BabyBear::from_canonical_u32(0x51eef272), + BabyBear::from_canonical_u32(0x529bd649), + BabyBear::from_canonical_u32(0x1ac29907), + BabyBear::from_canonical_u32(0x3227d497), + BabyBear::from_canonical_u32(0x7647895d), + BabyBear::from_canonical_u32(0x3142346b), + BabyBear::from_canonical_u32(0x72dae738), + BabyBear::from_canonical_u32(0x7560aa14), + BabyBear::from_canonical_u32(0x36d01718), + BabyBear::from_canonical_u32(0x4e85bb8a), + BabyBear::from_canonical_u32(0x4468a324), + BabyBear::from_canonical_u32(0x3308d84c), + BabyBear::from_canonical_u32(0x110aa61e), + BabyBear::from_canonical_u32(0x2f7f5cf7), + BabyBear::from_canonical_u32(0x39423c98), + BabyBear::from_canonical_u32(0x4b5d88dd), + BabyBear::from_canonical_u32(0x72163014), + ], + [ + BabyBear::from_canonical_u32(0x3ead019d), + BabyBear::from_canonical_u32(0x04cfa74d), + BabyBear::from_canonical_u32(0x015e70d3), + BabyBear::from_canonical_u32(0x0a59ce09), + BabyBear::from_canonical_u32(0x411a3c5d), + BabyBear::from_canonical_u32(0x0f527fab), + BabyBear::from_canonical_u32(0x0bcc3511), + BabyBear::from_canonical_u32(0x2465a157), + BabyBear::from_canonical_u32(0x6e4987aa), + BabyBear::from_canonical_u32(0x4f93e11a), + BabyBear::from_canonical_u32(0x20f57a45), + BabyBear::from_canonical_u32(0x027b998c), + BabyBear::from_canonical_u32(0x5f5ffb39), + BabyBear::from_canonical_u32(0x0f78a6c9), + BabyBear::from_canonical_u32(0x33b34c74), + BabyBear::from_canonical_u32(0x16fe88ab), + BabyBear::from_canonical_u32(0x6cf2dfb2), + BabyBear::from_canonical_u32(0x3351e75a), + BabyBear::from_canonical_u32(0x0d5dcbe7), + BabyBear::from_canonical_u32(0x67c66ce1), + BabyBear::from_canonical_u32(0x0c4494c5), + BabyBear::from_canonical_u32(0x4458aad0), + BabyBear::from_canonical_u32(0x2f831bfd), + BabyBear::from_canonical_u32(0x5ec07fc3), + BabyBear::from_canonical_u32(0x5fc677ad), + BabyBear::from_canonical_u32(0x4ea5ee13), + BabyBear::from_canonical_u32(0x13790c48), + BabyBear::from_canonical_u32(0x3b9dfec2), + ], + [ + BabyBear::from_canonical_u32(0x70be2dbf), + BabyBear::from_canonical_u32(0x382306ee), + BabyBear::from_canonical_u32(0x5b5c49f3), + BabyBear::from_canonical_u32(0x6ff0b733), + BabyBear::from_canonical_u32(0x18e86791), + BabyBear::from_canonical_u32(0x30e1ec81), + BabyBear::from_canonical_u32(0x0fe10e13), + BabyBear::from_canonical_u32(0x3a111527), + BabyBear::from_canonical_u32(0x15c0934e), + BabyBear::from_canonical_u32(0x0cf107a7), + BabyBear::from_canonical_u32(0x69b22916), + BabyBear::from_canonical_u32(0x043bdb65), + BabyBear::from_canonical_u32(0x44edc13c), + BabyBear::from_canonical_u32(0x168bdc86), + BabyBear::from_canonical_u32(0x517dfe29), + BabyBear::from_canonical_u32(0x65b52719), + BabyBear::from_canonical_u32(0x2d71881a), + BabyBear::from_canonical_u32(0x68984de3), + BabyBear::from_canonical_u32(0x6a839e43), + BabyBear::from_canonical_u32(0x611ba320), + BabyBear::from_canonical_u32(0x4c047bf8), + BabyBear::from_canonical_u32(0x72e350b8), + BabyBear::from_canonical_u32(0x2248c526), + BabyBear::from_canonical_u32(0x2c27d3e3), + BabyBear::from_canonical_u32(0x69fd48ad), + BabyBear::from_canonical_u32(0x685d7b5f), + BabyBear::from_canonical_u32(0x08692259), + BabyBear::from_canonical_u32(0x5e6832d6), + ], + [ + BabyBear::from_canonical_u32(0x709eaa74), + BabyBear::from_canonical_u32(0x5aaf7717), + BabyBear::from_canonical_u32(0x535d09e3), + BabyBear::from_canonical_u32(0x34a5cde4), + BabyBear::from_canonical_u32(0x2c68344d), + BabyBear::from_canonical_u32(0x4d5be926), + BabyBear::from_canonical_u32(0x491e10e8), + BabyBear::from_canonical_u32(0x7387b09c), + BabyBear::from_canonical_u32(0x468e8ac8), + BabyBear::from_canonical_u32(0x5489f2cb), + BabyBear::from_canonical_u32(0x6360b9c1), + BabyBear::from_canonical_u32(0x32dd1c7c), + BabyBear::from_canonical_u32(0x2f35debb), + BabyBear::from_canonical_u32(0x148493f9), + BabyBear::from_canonical_u32(0x6e666bf4), + BabyBear::from_canonical_u32(0x564a395a), + BabyBear::from_canonical_u32(0x0690149e), + BabyBear::from_canonical_u32(0x501107f7), + BabyBear::from_canonical_u32(0x676445a5), + BabyBear::from_canonical_u32(0x6c7a5dee), + BabyBear::from_canonical_u32(0x101eab5a), + BabyBear::from_canonical_u32(0x7552acfa), + BabyBear::from_canonical_u32(0x2584e9d0), + BabyBear::from_canonical_u32(0x295d012f), + BabyBear::from_canonical_u32(0x20c1160a), + BabyBear::from_canonical_u32(0x25458f82), + BabyBear::from_canonical_u32(0x473fc0dd), + BabyBear::from_canonical_u32(0x47cff543), + ], + [ + BabyBear::from_canonical_u32(0x3a40806f), + BabyBear::from_canonical_u32(0x778580ea), + BabyBear::from_canonical_u32(0x14259e23), + BabyBear::from_canonical_u32(0x25a81bbd), + BabyBear::from_canonical_u32(0x42106bb9), + BabyBear::from_canonical_u32(0x5732e3a7), + BabyBear::from_canonical_u32(0x62ce4078), + BabyBear::from_canonical_u32(0x546d6761), + BabyBear::from_canonical_u32(0x1c9de938), + BabyBear::from_canonical_u32(0x315506cc), + BabyBear::from_canonical_u32(0x3089a4a3), + BabyBear::from_canonical_u32(0x51c67f25), + BabyBear::from_canonical_u32(0x7497d571), + BabyBear::from_canonical_u32(0x3e800932), + BabyBear::from_canonical_u32(0x1bdc15b2), + BabyBear::from_canonical_u32(0x3c28ce53), + BabyBear::from_canonical_u32(0x4935ba1a), + BabyBear::from_canonical_u32(0x6282ee19), + BabyBear::from_canonical_u32(0x417ba2a6), + BabyBear::from_canonical_u32(0x1be79e34), + BabyBear::from_canonical_u32(0x4a9d0955), + BabyBear::from_canonical_u32(0x3827b18c), + BabyBear::from_canonical_u32(0x7745b964), + BabyBear::from_canonical_u32(0x5a83edaf), + BabyBear::from_canonical_u32(0x2bc4745d), + BabyBear::from_canonical_u32(0x0e3ce800), + BabyBear::from_canonical_u32(0x1d786c29), + BabyBear::from_canonical_u32(0x349a0de9), + ], + [ + BabyBear::from_canonical_u32(0x390b1d15), + BabyBear::from_canonical_u32(0x19df53b3), + BabyBear::from_canonical_u32(0x67939002), + BabyBear::from_canonical_u32(0x58343136), + BabyBear::from_canonical_u32(0x5e1a5175), + BabyBear::from_canonical_u32(0x411c9ac5), + BabyBear::from_canonical_u32(0x1a7d295d), + BabyBear::from_canonical_u32(0x32295806), + BabyBear::from_canonical_u32(0x5194f116), + BabyBear::from_canonical_u32(0x6e35bacc), + BabyBear::from_canonical_u32(0x3d15524f), + BabyBear::from_canonical_u32(0x36f1a9d6), + BabyBear::from_canonical_u32(0x4a5bc457), + BabyBear::from_canonical_u32(0x33e352e3), + BabyBear::from_canonical_u32(0x61f8c931), + BabyBear::from_canonical_u32(0x395cc042), + BabyBear::from_canonical_u32(0x4e0528e0), + BabyBear::from_canonical_u32(0x4a7821f5), + BabyBear::from_canonical_u32(0x02bb0007), + BabyBear::from_canonical_u32(0x045a1f44), + BabyBear::from_canonical_u32(0x338d1c13), + BabyBear::from_canonical_u32(0x6c48e101), + BabyBear::from_canonical_u32(0x37216fdf), + BabyBear::from_canonical_u32(0x1f7cb623), + BabyBear::from_canonical_u32(0x21255da5), + BabyBear::from_canonical_u32(0x00d5c34f), + BabyBear::from_canonical_u32(0x73caeb28), + BabyBear::from_canonical_u32(0x01155649), ], ]; pub static ref PART_RC_28_25: [BabyBear; 25] = [ - f(0x4516acdc), - f(0x174e022f), - f(0x2c1bd5c0), - f(0x6df7f0fe), - f(0x1b593157), - f(0x0ebe3f2e), - f(0x70cedf5e), - f(0x2c114df9), - f(0x5a1f8d15), - f(0x25cce178), - f(0x4c334278), - f(0x72a73814), - f(0x05988f99), - f(0x6efca99e), - f(0x31b73d81), - f(0x2b1554ca), - f(0x60702370), - f(0x4b52f955), - f(0x74c5dcb3), - f(0x66ce951f), - f(0x0db280f1), - f(0x316dc591), - f(0x6c27c4b7), - f(0x1a9d2108), - f(0x331e4e4f), + BabyBear::from_canonical_u32(0x4516acdc), + BabyBear::from_canonical_u32(0x174e022f), + BabyBear::from_canonical_u32(0x2c1bd5c0), + BabyBear::from_canonical_u32(0x6df7f0fe), + BabyBear::from_canonical_u32(0x1b593157), + BabyBear::from_canonical_u32(0x0ebe3f2e), + BabyBear::from_canonical_u32(0x70cedf5e), + BabyBear::from_canonical_u32(0x2c114df9), + BabyBear::from_canonical_u32(0x5a1f8d15), + BabyBear::from_canonical_u32(0x25cce178), + BabyBear::from_canonical_u32(0x4c334278), + BabyBear::from_canonical_u32(0x72a73814), + BabyBear::from_canonical_u32(0x05988f99), + BabyBear::from_canonical_u32(0x6efca99e), + BabyBear::from_canonical_u32(0x31b73d81), + BabyBear::from_canonical_u32(0x2b1554ca), + BabyBear::from_canonical_u32(0x60702370), + BabyBear::from_canonical_u32(0x4b52f955), + BabyBear::from_canonical_u32(0x74c5dcb3), + BabyBear::from_canonical_u32(0x66ce951f), + BabyBear::from_canonical_u32(0x0db280f1), + BabyBear::from_canonical_u32(0x316dc591), + BabyBear::from_canonical_u32(0x6c27c4b7), + BabyBear::from_canonical_u32(0x1a9d2108), + BabyBear::from_canonical_u32(0x331e4e4f), ]; } -// +++ t = 32 R_F = 8, R_P = 30 +++ +// +++ t = 32, R_F = 8, R_P = 30 +++ lazy_static! { - pub static ref MATRIX_DIAG_32_BABYBEAR: [BabyBear; 32] = [ - f(0x08529ddb), - f(0x082b3a32), - f(0x30e3bf37), - f(0x64013854), - f(0x1c9f136a), - f(0x02eb2be7), - f(0x2fe5a853), - f(0x1e9eadce), - f(0x19459c0e), - f(0x24f2724d), - f(0x63a84df2), - f(0x02a44c1f), - f(0x18e1fcd0), - f(0x3599bc44), - f(0x76f799b9), - f(0x229dd5f6), - f(0x58050cfc), - f(0x6b1f557f), - f(0x5b66fbb0), - f(0x3c017aa9), - f(0x412a1760), - f(0x305f00d6), - f(0x01d8afce), - f(0x07a6e83e), - f(0x2ffd14a5), - f(0x0a25ed65), - f(0x5d39e006), - f(0x5ed5ce5f), - f(0x453da73a), - f(0x5c6a17f1), - f(0x390ef2ad), - f(0x524b3357), - ]; + pub static ref MATRIX_DIAG_32_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x08529dda), + BabyBear::from_canonical_u32(0x082b3a31), + BabyBear::from_canonical_u32(0x30e3bf36), + BabyBear::from_canonical_u32(0x64013853), + BabyBear::from_canonical_u32(0x1c9f1369), + BabyBear::from_canonical_u32(0x02eb2be6), + BabyBear::from_canonical_u32(0x2fe5a852), + BabyBear::from_canonical_u32(0x1e9eadcd), + BabyBear::from_canonical_u32(0x19459c0d), + BabyBear::from_canonical_u32(0x24f2724c), + BabyBear::from_canonical_u32(0x63a84df1), + BabyBear::from_canonical_u32(0x02a44c1e), + BabyBear::from_canonical_u32(0x18e1fccf), + BabyBear::from_canonical_u32(0x3599bc43), + BabyBear::from_canonical_u32(0x76f799b8), + BabyBear::from_canonical_u32(0x229dd5f5), + BabyBear::from_canonical_u32(0x58050cfb), + BabyBear::from_canonical_u32(0x6b1f557e), + BabyBear::from_canonical_u32(0x5b66fbaf), + BabyBear::from_canonical_u32(0x3c017aa8), + BabyBear::from_canonical_u32(0x412a175f), + BabyBear::from_canonical_u32(0x305f00d5), + BabyBear::from_canonical_u32(0x01d8afcd), + BabyBear::from_canonical_u32(0x07a6e83d), + BabyBear::from_canonical_u32(0x2ffd14a4), + BabyBear::from_canonical_u32(0x0a25ed64), + BabyBear::from_canonical_u32(0x5d39e005), + BabyBear::from_canonical_u32(0x5ed5ce5e), + BabyBear::from_canonical_u32(0x453da739), + BabyBear::from_canonical_u32(0x5c6a17f0), + BabyBear::from_canonical_u32(0x390ef2ac), + BabyBear::from_canonical_u32(0x524b3356), + ] + .as_ref() + ); pub static ref FULL_RC_32_8: [[BabyBear; 32]; 8] = [ [ - f(0x6710e381), - f(0x01ab3dad), - f(0x49bdc51f), - f(0x41c98c65), - f(0x23885d8a), - f(0x24ea7d7c), - f(0x6b65fc6d), - f(0x6106615a), - f(0x084957f3), - f(0x157c3634), - f(0x4dada10f), - f(0x6cdfa46d), - f(0x1bf208be), - f(0x5bd22fac), - f(0x4c8bcbdf), - f(0x27f79490), - f(0x70495412), - f(0x2a41844e), - f(0x51bb69f1), - f(0x3215dc21), - f(0x67114819), - f(0x27aa6a09), - f(0x5f4d3cad), - f(0x5fd6c724), - f(0x1b4c108d), - f(0x5799d04d), - f(0x568c212f), - f(0x680821db), - f(0x62073729), - f(0x229ee780), - f(0x3b4f94c3), - f(0x17a3ac54), - ], - [ - f(0x6c388279), - f(0x4876fe55), - f(0x3170f20a), - f(0x33703e4e), - f(0x03980ab1), - f(0x012fb0fa), - f(0x145ee8db), - f(0x49815b30), - f(0x46ad879c), - f(0x52bc503d), - f(0x586530d7), - f(0x5c36f9e5), - f(0x028e6503), - f(0x08310368), - f(0x75546646), - f(0x732516f1), - f(0x33483e5a), - f(0x04a0842c), - f(0x1a3135d9), - f(0x537b2eb1), - f(0x5baf4f77), - f(0x4b78cd6d), - f(0x5aed2c4a), - f(0x66c893e1), - f(0x3c5493a6), - f(0x46c62bfc), - f(0x564e591a), - f(0x52ded7a7), - f(0x00d1032d), - f(0x2b30d801), - f(0x101dabf7), - f(0x2efb21cd), - ], - [ - f(0x4a361c39), - f(0x49eff572), - f(0x2e13caf4), - f(0x016e6799), - f(0x1b5cdb44), - f(0x17ca2dc6), - f(0x0e500ee0), - f(0x0141ca9b), - f(0x279b2376), - f(0x6647c40b), - f(0x0dcaee3c), - f(0x16e7fcf9), - f(0x59e6d65c), - f(0x1eb730c9), - f(0x28607848), - f(0x45727f9c), - f(0x4e543ffb), - f(0x03ee2550), - f(0x010cd54b), - f(0x02dc4b76), - f(0x2b3a9a3c), - f(0x2eabb2d9), - f(0x06928553), - f(0x2d23b3f5), - f(0x6da322b1), - f(0x1527ec07), - f(0x0e450b7a), - f(0x53961612), - f(0x20f16b10), - f(0x16f00c60), - f(0x4c39d50f), - f(0x41d59d76), - ], - [ - f(0x5253f822), - f(0x3b53d381), - f(0x1b7f470a), - f(0x5e3d895c), - f(0x52658125), - f(0x012190d3), - f(0x65563b80), - f(0x1d0faa47), - f(0x3575b3c9), - f(0x4c0d9d20), - f(0x18cff09f), - f(0x64a7da5c), - f(0x2f140b25), - f(0x139f9e31), - f(0x66e36bd5), - f(0x6442c811), - f(0x58879bce), - f(0x5fcc87c6), - f(0x6807ae0c), - f(0x4111c657), - f(0x633c8929), - f(0x74962971), - f(0x3fc18eb8), - f(0x456cf288), - f(0x31f6c8d2), - f(0x6c3a31a8), - f(0x6d82df50), - f(0x3d432793), - f(0x4195a297), - f(0x6bce9b95), - f(0x3c822af0), - f(0x7629e5b3), - ], - [ - f(0x77cc4657), - f(0x39005c27), - f(0x48cd8089), - f(0x267cfcbb), - f(0x1c41ca85), - f(0x41b3943f), - f(0x20e7727a), - f(0x64ad78f3), - f(0x13dd4413), - f(0x1042e3dc), - f(0x74adeb2c), - f(0x2dcdd3c7), - f(0x06006fbc), - f(0x35a609e9), - f(0x0daf273c), - f(0x3a4f694f), - f(0x59fd101d), - f(0x27d2112b), - f(0x1937b69f), - f(0x2e8880bc), - f(0x40c12429), - f(0x067965a6), - f(0x6ea1b36d), - f(0x6e01476e), - f(0x29cd718a), - f(0x5406c693), - f(0x51de2e9a), - f(0x6ddc388a), - f(0x53763473), - f(0x17a25cbf), - f(0x1f2982cd), - f(0x19ca5afd), - ], - [ - f(0x2d703c93), - f(0x0c2840e4), - f(0x2cda82cd), - f(0x5c7f51e0), - f(0x1db58806), - f(0x3cb62bd1), - f(0x2b45461b), - f(0x6204ba50), - f(0x6857f0bc), - f(0x4af2a368), - f(0x32c146f4), - f(0x1acfdd93), - f(0x2dc39570), - f(0x0dbdeb4e), - f(0x50bef84d), - f(0x6f83a22c), - f(0x434c3741), - f(0x2060e160), - f(0x68f58f0b), - f(0x2529b2bd), - f(0x112c4768), - f(0x70409ce2), - f(0x1b57460e), - f(0x21dc818c), - f(0x5f6b5330), - f(0x443f8fba), - f(0x211a90de), - f(0x591d4a30), - f(0x5b5a3e75), - f(0x635c333a), - f(0x1efd6a70), - f(0x5d35445f), - ], - [ - f(0x5637cf22), - f(0x6e9ba8b1), - f(0x10b54e2c), - f(0x04291eb8), - f(0x2d4ea543), - f(0x720a5c61), - f(0x1a5b6323), - f(0x68e176e7), - f(0x26149775), - f(0x58f30beb), - f(0x450402ab), - f(0x24928255), - f(0x32c59955), - f(0x2b5b7261), - f(0x6279779f), - f(0x599b6a8e), - f(0x70d145d3), - f(0x3786c4d1), - f(0x11363460), - f(0x22ff2181), - f(0x4d06fc50), - f(0x27a8a3df), - f(0x647df984), - f(0x3a748cc3), - f(0x4aa91ea2), - f(0x21ead2a1), - f(0x50cd5d8d), - f(0x06d6ffc6), - f(0x5bc51117), - f(0x45f848bc), - f(0x12c3d5f1), - f(0x487f9065), - ], - [ - f(0x1617243c), - f(0x5c8774e4), - f(0x76bcd3ec), - f(0x349c8a4b), - f(0x265d6a36), - f(0x39fc652e), - f(0x246831a8), - f(0x488058fc), - f(0x0a5c75d6), - f(0x760d4eed), - f(0x2d2957ad), - f(0x6188b6fe), - f(0x2084c575), - f(0x67c5ff60), - f(0x3d6d899b), - f(0x2759464a), - f(0x1e4319d2), - f(0x09fef836), - f(0x305660e4), - f(0x2437e398), - f(0x698e8bad), - f(0x51a1c08a), - f(0x6f6b42ea), - f(0x4e7a622c), - f(0x3359b875), - f(0x6fc9bf1d), - f(0x349ecd95), - f(0x402affed), - f(0x0e7d1f4a), - f(0x7568ff95), - f(0x6d26f65b), - f(0x527b8ff5), + BabyBear::from_canonical_u32(0x6710e381), + BabyBear::from_canonical_u32(0x01ab3dad), + BabyBear::from_canonical_u32(0x49bdc51f), + BabyBear::from_canonical_u32(0x41c98c65), + BabyBear::from_canonical_u32(0x23885d8a), + BabyBear::from_canonical_u32(0x24ea7d7c), + BabyBear::from_canonical_u32(0x6b65fc6d), + BabyBear::from_canonical_u32(0x6106615a), + BabyBear::from_canonical_u32(0x084957f3), + BabyBear::from_canonical_u32(0x157c3634), + BabyBear::from_canonical_u32(0x4dada10f), + BabyBear::from_canonical_u32(0x6cdfa46d), + BabyBear::from_canonical_u32(0x1bf208be), + BabyBear::from_canonical_u32(0x5bd22fac), + BabyBear::from_canonical_u32(0x4c8bcbdf), + BabyBear::from_canonical_u32(0x27f79490), + BabyBear::from_canonical_u32(0x70495412), + BabyBear::from_canonical_u32(0x2a41844e), + BabyBear::from_canonical_u32(0x51bb69f1), + BabyBear::from_canonical_u32(0x3215dc21), + BabyBear::from_canonical_u32(0x67114819), + BabyBear::from_canonical_u32(0x27aa6a09), + BabyBear::from_canonical_u32(0x5f4d3cad), + BabyBear::from_canonical_u32(0x5fd6c724), + BabyBear::from_canonical_u32(0x1b4c108d), + BabyBear::from_canonical_u32(0x5799d04d), + BabyBear::from_canonical_u32(0x568c212f), + BabyBear::from_canonical_u32(0x680821db), + BabyBear::from_canonical_u32(0x62073729), + BabyBear::from_canonical_u32(0x229ee780), + BabyBear::from_canonical_u32(0x3b4f94c3), + BabyBear::from_canonical_u32(0x17a3ac54), + ], + [ + BabyBear::from_canonical_u32(0x6c388279), + BabyBear::from_canonical_u32(0x4876fe55), + BabyBear::from_canonical_u32(0x3170f20a), + BabyBear::from_canonical_u32(0x33703e4e), + BabyBear::from_canonical_u32(0x03980ab1), + BabyBear::from_canonical_u32(0x012fb0fa), + BabyBear::from_canonical_u32(0x145ee8db), + BabyBear::from_canonical_u32(0x49815b30), + BabyBear::from_canonical_u32(0x46ad879c), + BabyBear::from_canonical_u32(0x52bc503d), + BabyBear::from_canonical_u32(0x586530d7), + BabyBear::from_canonical_u32(0x5c36f9e5), + BabyBear::from_canonical_u32(0x028e6503), + BabyBear::from_canonical_u32(0x08310368), + BabyBear::from_canonical_u32(0x75546646), + BabyBear::from_canonical_u32(0x732516f1), + BabyBear::from_canonical_u32(0x33483e5a), + BabyBear::from_canonical_u32(0x04a0842c), + BabyBear::from_canonical_u32(0x1a3135d9), + BabyBear::from_canonical_u32(0x537b2eb1), + BabyBear::from_canonical_u32(0x5baf4f77), + BabyBear::from_canonical_u32(0x4b78cd6d), + BabyBear::from_canonical_u32(0x5aed2c4a), + BabyBear::from_canonical_u32(0x66c893e1), + BabyBear::from_canonical_u32(0x3c5493a6), + BabyBear::from_canonical_u32(0x46c62bfc), + BabyBear::from_canonical_u32(0x564e591a), + BabyBear::from_canonical_u32(0x52ded7a7), + BabyBear::from_canonical_u32(0x00d1032d), + BabyBear::from_canonical_u32(0x2b30d801), + BabyBear::from_canonical_u32(0x101dabf7), + BabyBear::from_canonical_u32(0x2efb21cd), + ], + [ + BabyBear::from_canonical_u32(0x4a361c39), + BabyBear::from_canonical_u32(0x49eff572), + BabyBear::from_canonical_u32(0x2e13caf4), + BabyBear::from_canonical_u32(0x016e6799), + BabyBear::from_canonical_u32(0x1b5cdb44), + BabyBear::from_canonical_u32(0x17ca2dc6), + BabyBear::from_canonical_u32(0x0e500ee0), + BabyBear::from_canonical_u32(0x0141ca9b), + BabyBear::from_canonical_u32(0x279b2376), + BabyBear::from_canonical_u32(0x6647c40b), + BabyBear::from_canonical_u32(0x0dcaee3c), + BabyBear::from_canonical_u32(0x16e7fcf9), + BabyBear::from_canonical_u32(0x59e6d65c), + BabyBear::from_canonical_u32(0x1eb730c9), + BabyBear::from_canonical_u32(0x28607848), + BabyBear::from_canonical_u32(0x45727f9c), + BabyBear::from_canonical_u32(0x4e543ffb), + BabyBear::from_canonical_u32(0x03ee2550), + BabyBear::from_canonical_u32(0x010cd54b), + BabyBear::from_canonical_u32(0x02dc4b76), + BabyBear::from_canonical_u32(0x2b3a9a3c), + BabyBear::from_canonical_u32(0x2eabb2d9), + BabyBear::from_canonical_u32(0x06928553), + BabyBear::from_canonical_u32(0x2d23b3f5), + BabyBear::from_canonical_u32(0x6da322b1), + BabyBear::from_canonical_u32(0x1527ec07), + BabyBear::from_canonical_u32(0x0e450b7a), + BabyBear::from_canonical_u32(0x53961612), + BabyBear::from_canonical_u32(0x20f16b10), + BabyBear::from_canonical_u32(0x16f00c60), + BabyBear::from_canonical_u32(0x4c39d50f), + BabyBear::from_canonical_u32(0x41d59d76), + ], + [ + BabyBear::from_canonical_u32(0x5253f822), + BabyBear::from_canonical_u32(0x3b53d381), + BabyBear::from_canonical_u32(0x1b7f470a), + BabyBear::from_canonical_u32(0x5e3d895c), + BabyBear::from_canonical_u32(0x52658125), + BabyBear::from_canonical_u32(0x012190d3), + BabyBear::from_canonical_u32(0x65563b80), + BabyBear::from_canonical_u32(0x1d0faa47), + BabyBear::from_canonical_u32(0x3575b3c9), + BabyBear::from_canonical_u32(0x4c0d9d20), + BabyBear::from_canonical_u32(0x18cff09f), + BabyBear::from_canonical_u32(0x64a7da5c), + BabyBear::from_canonical_u32(0x2f140b25), + BabyBear::from_canonical_u32(0x139f9e31), + BabyBear::from_canonical_u32(0x66e36bd5), + BabyBear::from_canonical_u32(0x6442c811), + BabyBear::from_canonical_u32(0x58879bce), + BabyBear::from_canonical_u32(0x5fcc87c6), + BabyBear::from_canonical_u32(0x6807ae0c), + BabyBear::from_canonical_u32(0x4111c657), + BabyBear::from_canonical_u32(0x633c8929), + BabyBear::from_canonical_u32(0x74962971), + BabyBear::from_canonical_u32(0x3fc18eb8), + BabyBear::from_canonical_u32(0x456cf288), + BabyBear::from_canonical_u32(0x31f6c8d2), + BabyBear::from_canonical_u32(0x6c3a31a8), + BabyBear::from_canonical_u32(0x6d82df50), + BabyBear::from_canonical_u32(0x3d432793), + BabyBear::from_canonical_u32(0x4195a297), + BabyBear::from_canonical_u32(0x6bce9b95), + BabyBear::from_canonical_u32(0x3c822af0), + BabyBear::from_canonical_u32(0x7629e5b3), + ], + [ + BabyBear::from_canonical_u32(0x77cc4657), + BabyBear::from_canonical_u32(0x39005c27), + BabyBear::from_canonical_u32(0x48cd8089), + BabyBear::from_canonical_u32(0x267cfcbb), + BabyBear::from_canonical_u32(0x1c41ca85), + BabyBear::from_canonical_u32(0x41b3943f), + BabyBear::from_canonical_u32(0x20e7727a), + BabyBear::from_canonical_u32(0x64ad78f3), + BabyBear::from_canonical_u32(0x13dd4413), + BabyBear::from_canonical_u32(0x1042e3dc), + BabyBear::from_canonical_u32(0x74adeb2c), + BabyBear::from_canonical_u32(0x2dcdd3c7), + BabyBear::from_canonical_u32(0x06006fbc), + BabyBear::from_canonical_u32(0x35a609e9), + BabyBear::from_canonical_u32(0x0daf273c), + BabyBear::from_canonical_u32(0x3a4f694f), + BabyBear::from_canonical_u32(0x59fd101d), + BabyBear::from_canonical_u32(0x27d2112b), + BabyBear::from_canonical_u32(0x1937b69f), + BabyBear::from_canonical_u32(0x2e8880bc), + BabyBear::from_canonical_u32(0x40c12429), + BabyBear::from_canonical_u32(0x067965a6), + BabyBear::from_canonical_u32(0x6ea1b36d), + BabyBear::from_canonical_u32(0x6e01476e), + BabyBear::from_canonical_u32(0x29cd718a), + BabyBear::from_canonical_u32(0x5406c693), + BabyBear::from_canonical_u32(0x51de2e9a), + BabyBear::from_canonical_u32(0x6ddc388a), + BabyBear::from_canonical_u32(0x53763473), + BabyBear::from_canonical_u32(0x17a25cbf), + BabyBear::from_canonical_u32(0x1f2982cd), + BabyBear::from_canonical_u32(0x19ca5afd), + ], + [ + BabyBear::from_canonical_u32(0x2d703c93), + BabyBear::from_canonical_u32(0x0c2840e4), + BabyBear::from_canonical_u32(0x2cda82cd), + BabyBear::from_canonical_u32(0x5c7f51e0), + BabyBear::from_canonical_u32(0x1db58806), + BabyBear::from_canonical_u32(0x3cb62bd1), + BabyBear::from_canonical_u32(0x2b45461b), + BabyBear::from_canonical_u32(0x6204ba50), + BabyBear::from_canonical_u32(0x6857f0bc), + BabyBear::from_canonical_u32(0x4af2a368), + BabyBear::from_canonical_u32(0x32c146f4), + BabyBear::from_canonical_u32(0x1acfdd93), + BabyBear::from_canonical_u32(0x2dc39570), + BabyBear::from_canonical_u32(0x0dbdeb4e), + BabyBear::from_canonical_u32(0x50bef84d), + BabyBear::from_canonical_u32(0x6f83a22c), + BabyBear::from_canonical_u32(0x434c3741), + BabyBear::from_canonical_u32(0x2060e160), + BabyBear::from_canonical_u32(0x68f58f0b), + BabyBear::from_canonical_u32(0x2529b2bd), + BabyBear::from_canonical_u32(0x112c4768), + BabyBear::from_canonical_u32(0x70409ce2), + BabyBear::from_canonical_u32(0x1b57460e), + BabyBear::from_canonical_u32(0x21dc818c), + BabyBear::from_canonical_u32(0x5f6b5330), + BabyBear::from_canonical_u32(0x443f8fba), + BabyBear::from_canonical_u32(0x211a90de), + BabyBear::from_canonical_u32(0x591d4a30), + BabyBear::from_canonical_u32(0x5b5a3e75), + BabyBear::from_canonical_u32(0x635c333a), + BabyBear::from_canonical_u32(0x1efd6a70), + BabyBear::from_canonical_u32(0x5d35445f), + ], + [ + BabyBear::from_canonical_u32(0x5637cf22), + BabyBear::from_canonical_u32(0x6e9ba8b1), + BabyBear::from_canonical_u32(0x10b54e2c), + BabyBear::from_canonical_u32(0x04291eb8), + BabyBear::from_canonical_u32(0x2d4ea543), + BabyBear::from_canonical_u32(0x720a5c61), + BabyBear::from_canonical_u32(0x1a5b6323), + BabyBear::from_canonical_u32(0x68e176e7), + BabyBear::from_canonical_u32(0x26149775), + BabyBear::from_canonical_u32(0x58f30beb), + BabyBear::from_canonical_u32(0x450402ab), + BabyBear::from_canonical_u32(0x24928255), + BabyBear::from_canonical_u32(0x32c59955), + BabyBear::from_canonical_u32(0x2b5b7261), + BabyBear::from_canonical_u32(0x6279779f), + BabyBear::from_canonical_u32(0x599b6a8e), + BabyBear::from_canonical_u32(0x70d145d3), + BabyBear::from_canonical_u32(0x3786c4d1), + BabyBear::from_canonical_u32(0x11363460), + BabyBear::from_canonical_u32(0x22ff2181), + BabyBear::from_canonical_u32(0x4d06fc50), + BabyBear::from_canonical_u32(0x27a8a3df), + BabyBear::from_canonical_u32(0x647df984), + BabyBear::from_canonical_u32(0x3a748cc3), + BabyBear::from_canonical_u32(0x4aa91ea2), + BabyBear::from_canonical_u32(0x21ead2a1), + BabyBear::from_canonical_u32(0x50cd5d8d), + BabyBear::from_canonical_u32(0x06d6ffc6), + BabyBear::from_canonical_u32(0x5bc51117), + BabyBear::from_canonical_u32(0x45f848bc), + BabyBear::from_canonical_u32(0x12c3d5f1), + BabyBear::from_canonical_u32(0x487f9065), + ], + [ + BabyBear::from_canonical_u32(0x1617243c), + BabyBear::from_canonical_u32(0x5c8774e4), + BabyBear::from_canonical_u32(0x76bcd3ec), + BabyBear::from_canonical_u32(0x349c8a4b), + BabyBear::from_canonical_u32(0x265d6a36), + BabyBear::from_canonical_u32(0x39fc652e), + BabyBear::from_canonical_u32(0x246831a8), + BabyBear::from_canonical_u32(0x488058fc), + BabyBear::from_canonical_u32(0x0a5c75d6), + BabyBear::from_canonical_u32(0x760d4eed), + BabyBear::from_canonical_u32(0x2d2957ad), + BabyBear::from_canonical_u32(0x6188b6fe), + BabyBear::from_canonical_u32(0x2084c575), + BabyBear::from_canonical_u32(0x67c5ff60), + BabyBear::from_canonical_u32(0x3d6d899b), + BabyBear::from_canonical_u32(0x2759464a), + BabyBear::from_canonical_u32(0x1e4319d2), + BabyBear::from_canonical_u32(0x09fef836), + BabyBear::from_canonical_u32(0x305660e4), + BabyBear::from_canonical_u32(0x2437e398), + BabyBear::from_canonical_u32(0x698e8bad), + BabyBear::from_canonical_u32(0x51a1c08a), + BabyBear::from_canonical_u32(0x6f6b42ea), + BabyBear::from_canonical_u32(0x4e7a622c), + BabyBear::from_canonical_u32(0x3359b875), + BabyBear::from_canonical_u32(0x6fc9bf1d), + BabyBear::from_canonical_u32(0x349ecd95), + BabyBear::from_canonical_u32(0x402affed), + BabyBear::from_canonical_u32(0x0e7d1f4a), + BabyBear::from_canonical_u32(0x7568ff95), + BabyBear::from_canonical_u32(0x6d26f65b), + BabyBear::from_canonical_u32(0x527b8ff5), ], ]; pub static ref PART_RC_32_30: [BabyBear; 30] = [ - f(0x3dddd04e), - f(0x5a3d0558), - f(0x763e6c75), - f(0x676f1d88), - f(0x77b82255), - f(0x25df8a51), - f(0x697c3b10), - f(0x03cf6edf), - f(0x12b54f78), - f(0x6633d534), - f(0x426fbcb7), - f(0x554665dc), - f(0x5689bdb2), - f(0x12e747de), - f(0x60c28745), - f(0x11ca4ba5), - f(0x3f0f9583), - f(0x56c7d993), - f(0x20f6875f), - f(0x69e597c8), - f(0x3c911573), - f(0x29c7f702), - f(0x1a58e115), - f(0x29113198), - f(0x776b289f), - f(0x1e922ee2), - f(0x2165fbf0), - f(0x28ccaf78), - f(0x1983287d), - f(0x492b22e0), + BabyBear::from_canonical_u32(0x3dddd04e), + BabyBear::from_canonical_u32(0x5a3d0558), + BabyBear::from_canonical_u32(0x763e6c75), + BabyBear::from_canonical_u32(0x676f1d88), + BabyBear::from_canonical_u32(0x77b82255), + BabyBear::from_canonical_u32(0x25df8a51), + BabyBear::from_canonical_u32(0x697c3b10), + BabyBear::from_canonical_u32(0x03cf6edf), + BabyBear::from_canonical_u32(0x12b54f78), + BabyBear::from_canonical_u32(0x6633d534), + BabyBear::from_canonical_u32(0x426fbcb7), + BabyBear::from_canonical_u32(0x554665dc), + BabyBear::from_canonical_u32(0x5689bdb2), + BabyBear::from_canonical_u32(0x12e747de), + BabyBear::from_canonical_u32(0x60c28745), + BabyBear::from_canonical_u32(0x11ca4ba5), + BabyBear::from_canonical_u32(0x3f0f9583), + BabyBear::from_canonical_u32(0x56c7d993), + BabyBear::from_canonical_u32(0x20f6875f), + BabyBear::from_canonical_u32(0x69e597c8), + BabyBear::from_canonical_u32(0x3c911573), + BabyBear::from_canonical_u32(0x29c7f702), + BabyBear::from_canonical_u32(0x1a58e115), + BabyBear::from_canonical_u32(0x29113198), + BabyBear::from_canonical_u32(0x776b289f), + BabyBear::from_canonical_u32(0x1e922ee2), + BabyBear::from_canonical_u32(0x2165fbf0), + BabyBear::from_canonical_u32(0x28ccaf78), + BabyBear::from_canonical_u32(0x1983287d), + BabyBear::from_canonical_u32(0x492b22e0), ]; } -// +++ t = 36 R_F = 8, R_P = 34 +++ +// +++ t = 36, R_F = 8, R_P = 34 +++ lazy_static! { - pub static ref MATRIX_DIAG_36_BABYBEAR: [BabyBear; 36] = [ - f(0x14fe3781), - f(0x24a66ad5), - f(0x4ee43957), - f(0x068f9cc4), - f(0x2fb11121), - f(0x39cfb5fc), - f(0x152c1e7e), - f(0x087b32be), - f(0x06a7975e), - f(0x0f8c144e), - f(0x2794dc73), - f(0x30dd60c5), - f(0x254bd986), - f(0x26994696), - f(0x1c4f67fb), - f(0x4dea40bb), - f(0x011f3fc2), - f(0x6fa5cf5d), - f(0x4dae4e62), - f(0x5064a985), - f(0x4a8a1730), - f(0x0f468906), - f(0x1c01dfe1), - f(0x6098d591), - f(0x5651e584), - f(0x11415767), - f(0x651097f8), - f(0x0021192d), - f(0x1efa9645), - f(0x0af6fec7), - f(0x764987af), - f(0x613bcead), - f(0x475c8faa), - f(0x60397fc7), - f(0x34eb3f0f), - f(0x3835c26c), - ]; + pub static ref MATRIX_DIAG_36_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x14fe3780), + BabyBear::from_canonical_u32(0x24a66ad4), + BabyBear::from_canonical_u32(0x4ee43956), + BabyBear::from_canonical_u32(0x068f9cc3), + BabyBear::from_canonical_u32(0x2fb11120), + BabyBear::from_canonical_u32(0x39cfb5fb), + BabyBear::from_canonical_u32(0x152c1e7d), + BabyBear::from_canonical_u32(0x087b32bd), + BabyBear::from_canonical_u32(0x06a7975d), + BabyBear::from_canonical_u32(0x0f8c144d), + BabyBear::from_canonical_u32(0x2794dc72), + BabyBear::from_canonical_u32(0x30dd60c4), + BabyBear::from_canonical_u32(0x254bd985), + BabyBear::from_canonical_u32(0x26994695), + BabyBear::from_canonical_u32(0x1c4f67fa), + BabyBear::from_canonical_u32(0x4dea40ba), + BabyBear::from_canonical_u32(0x011f3fc1), + BabyBear::from_canonical_u32(0x6fa5cf5c), + BabyBear::from_canonical_u32(0x4dae4e61), + BabyBear::from_canonical_u32(0x5064a984), + BabyBear::from_canonical_u32(0x4a8a172f), + BabyBear::from_canonical_u32(0x0f468905), + BabyBear::from_canonical_u32(0x1c01dfe0), + BabyBear::from_canonical_u32(0x6098d590), + BabyBear::from_canonical_u32(0x5651e583), + BabyBear::from_canonical_u32(0x11415766), + BabyBear::from_canonical_u32(0x651097f7), + BabyBear::from_canonical_u32(0x0021192c), + BabyBear::from_canonical_u32(0x1efa9644), + BabyBear::from_canonical_u32(0x0af6fec6), + BabyBear::from_canonical_u32(0x764987ae), + BabyBear::from_canonical_u32(0x613bceac), + BabyBear::from_canonical_u32(0x475c8fa9), + BabyBear::from_canonical_u32(0x60397fc6), + BabyBear::from_canonical_u32(0x34eb3f0e), + BabyBear::from_canonical_u32(0x3835c26b), + ] + .as_ref() + ); pub static ref FULL_RC_36_8: [[BabyBear; 36]; 8] = [ [ - f(0x2944306f), - f(0x5cf99d09), - f(0x752b09f9), - f(0x6a0584ca), - f(0x074e5aed), - f(0x02b29d0f), - f(0x044ae47d), - f(0x4b240aff), - f(0x04f1ed40), - f(0x0c398692), - f(0x71ccf451), - f(0x4fcb47b9), - f(0x1c6ffe1c), - f(0x528ad693), - f(0x1f0360cb), - f(0x6cb64d80), - f(0x176d152e), - f(0x47a14f1b), - f(0x7702c2df), - f(0x57e1c2cb), - f(0x323c501f), - f(0x13129d5d), - f(0x244b56f0), - f(0x0255514d), - f(0x028c570c), - f(0x5244e11b), - f(0x69942524), - f(0x20551bb9), - f(0x13097bc1), - f(0x62f2e9c6), - f(0x601cf47b), - f(0x76f5eafe), - f(0x2f839d50), - f(0x659a25b9), - f(0x32ea8308), - f(0x147468ed), - ], - [ - f(0x1697d292), - f(0x4089f12a), - f(0x2da1179d), - f(0x61a565f5), - f(0x2585c790), - f(0x35eeec00), - f(0x29203600), - f(0x46f280b4), - f(0x0b5d2085), - f(0x4c1f8626), - f(0x2ca3eeb2), - f(0x2f1ea91b), - f(0x3392123a), - f(0x5c0dafd7), - f(0x33058e18), - f(0x37cdebfd), - f(0x5650bb4e), - f(0x53a5888d), - f(0x448b6235), - f(0x6028aff2), - f(0x63fbaa76), - f(0x716add8a), - f(0x4626d1d4), - f(0x77a2ff52), - f(0x1f442334), - f(0x07916267), - f(0x6ecb3a10), - f(0x054837e5), - f(0x2f77fc14), - f(0x55f35b87), - f(0x05bbdb83), - f(0x5dd63b2f), - f(0x0e46e1db), - f(0x28e348d4), - f(0x0b07a90f), - f(0x4d383bed), - ], - [ - f(0x0f49b5c8), - f(0x201c4435), - f(0x124a986b), - f(0x1f25e232), - f(0x5d92b523), - f(0x3a6d2257), - f(0x05586394), - f(0x4e1fc964), - f(0x755cb9c9), - f(0x65026b75), - f(0x14505e7d), - f(0x5a9b7696), - f(0x1c3c6527), - f(0x06e712c9), - f(0x3efb39d1), - f(0x3a402c41), - f(0x6bb57ef2), - f(0x4d9e7596), - f(0x33994aa6), - f(0x291b0470), - f(0x0211e9d4), - f(0x45434e48), - f(0x239d4d65), - f(0x1716b347), - f(0x738c6ed2), - f(0x06352326), - f(0x11389929), - f(0x58d75d7b), - f(0x21cfc2ba), - f(0x3866a4f5), - f(0x7646b3ab), - f(0x6d8b1226), - f(0x09fde585), - f(0x5354392c), - f(0x4450b3ca), - f(0x0467fffd), - ], - [ - f(0x5845961c), - f(0x0c1a6b58), - f(0x3ce22c45), - f(0x0ea10219), - f(0x2e8401d7), - f(0x05ddc159), - f(0x62b5cd1f), - f(0x4946a1f6), - f(0x1fd7f807), - f(0x103040b6), - f(0x47995a6a), - f(0x57969878), - f(0x25228c3a), - f(0x6bc6f9cb), - f(0x777c68c1), - f(0x16dc22df), - f(0x4c379dc0), - f(0x0b0c6d20), - f(0x4fec57b4), - f(0x54d4f68a), - f(0x1fef4bfb), - f(0x36b47524), - f(0x74a3c8e8), - f(0x3a53f768), - f(0x5d8507f0), - f(0x230eddd2), - f(0x64ab48a9), - f(0x2b692ffd), - f(0x30c5401a), - f(0x255869fc), - f(0x38c7f463), - f(0x05dbad21), - f(0x5e6f798f), - f(0x325155cd), - f(0x0ec844be), - f(0x367db6a2), - ], - [ - f(0x02db0cb8), - f(0x571a7c71), - f(0x3c7e61c1), - f(0x20bf2072), - f(0x0bee4701), - f(0x2c0d8ecb), - f(0x6a556fcd), - f(0x3fcbbf43), - f(0x02ae25cd), - f(0x0c444a9f), - f(0x0fa143ad), - f(0x4de0a2ca), - f(0x152739b2), - f(0x4a2b0522), - f(0x572ba55a), - f(0x13fdfc3a), - f(0x76d6a295), - f(0x666dfc54), - f(0x76d24ad8), - f(0x4e32ba0d), - f(0x2bbdb5e5), - f(0x2f63afb2), - f(0x18fb6122), - f(0x714d617e), - f(0x2c70dc1b), - f(0x516162c3), - f(0x4343dc1a), - f(0x450d7026), - f(0x5c17c331), - f(0x0948d185), - f(0x7454beb3), - f(0x3ea0a216), - f(0x0000c43d), - f(0x74a2b0d8), - f(0x73d69fb8), - f(0x48523a60), - ], - [ - f(0x453fc889), - f(0x2c32ea2e), - f(0x41430470), - f(0x46776e82), - f(0x627840bf), - f(0x528c047c), - f(0x5b4e1dba), - f(0x04647f76), - f(0x2f78ecd6), - f(0x4235a496), - f(0x431549be), - f(0x0b8f1722), - f(0x7516d3ca), - f(0x1ddc818f), - f(0x4a233c8e), - f(0x5c575765), - f(0x5d7b42d5), - f(0x47055688), - f(0x0a3ab806), - f(0x0bfd9059), - f(0x38ed3b1f), - f(0x4fb04531), - f(0x20fa3d28), - f(0x14df3c63), - f(0x4fb9d1a4), - f(0x0809c31d), - f(0x762dd089), - f(0x64805c83), - f(0x752e9fb7), - f(0x77c1e7e0), - f(0x3549fd80), - f(0x4fd91868), - f(0x66d64911), - f(0x1295612f), - f(0x3da4a88c), - f(0x0227e20f), - ], - [ - f(0x0bd786db), - f(0x5c188c46), - f(0x1b3fad65), - f(0x40c9cfff), - f(0x4421c1a4), - f(0x6a15e39e), - f(0x73bfa83f), - f(0x25103271), - f(0x264562fc), - f(0x0fd4085d), - f(0x14bfed86), - f(0x3c10d05d), - f(0x6e58d404), - f(0x2fb31cd5), - f(0x1cbfa110), - f(0x4e97c5db), - f(0x40f1612a), - f(0x64ebadd2), - f(0x274db263), - f(0x77342423), - f(0x177c2c21), - f(0x03455cfc), - f(0x4f72995e), - f(0x17abdaa7), - f(0x7637f196), - f(0x2c0fd07a), - f(0x7650931a), - f(0x1bced9a0), - f(0x3a910abf), - f(0x64a01437), - f(0x4c561c72), - f(0x1429fe09), - f(0x546ce43c), - f(0x72577461), - f(0x75042041), - f(0x1998d519), - ], - [ - f(0x746a2b7e), - f(0x3d715c7f), - f(0x4635245c), - f(0x4fec3106), - f(0x64deed7e), - f(0x1978253c), - f(0x25b7aaf2), - f(0x7096624c), - f(0x0735cc20), - f(0x6360ebd8), - f(0x3a1e4d6d), - f(0x721a20e2), - f(0x0255ea5b), - f(0x228c26d3), - f(0x611805bd), - f(0x720c3844), - f(0x76e38531), - f(0x5800f808), - f(0x0b90773f), - f(0x2e0045cb), - f(0x499953d9), - f(0x6d428899), - f(0x3f70e34a), - f(0x43bf11d5), - f(0x656df6fa), - f(0x70ac488a), - f(0x6954ea33), - f(0x60fa793a), - f(0x0d549cda), - f(0x3530bcd8), - f(0x0fcba3f3), - f(0x2e62a812), - f(0x3fe9c86d), - f(0x37710bbd), - f(0x55b2ca9d), - f(0x03783592), + BabyBear::from_canonical_u32(0x2944306f), + BabyBear::from_canonical_u32(0x5cf99d09), + BabyBear::from_canonical_u32(0x752b09f9), + BabyBear::from_canonical_u32(0x6a0584ca), + BabyBear::from_canonical_u32(0x074e5aed), + BabyBear::from_canonical_u32(0x02b29d0f), + BabyBear::from_canonical_u32(0x044ae47d), + BabyBear::from_canonical_u32(0x4b240aff), + BabyBear::from_canonical_u32(0x04f1ed40), + BabyBear::from_canonical_u32(0x0c398692), + BabyBear::from_canonical_u32(0x71ccf451), + BabyBear::from_canonical_u32(0x4fcb47b9), + BabyBear::from_canonical_u32(0x1c6ffe1c), + BabyBear::from_canonical_u32(0x528ad693), + BabyBear::from_canonical_u32(0x1f0360cb), + BabyBear::from_canonical_u32(0x6cb64d80), + BabyBear::from_canonical_u32(0x176d152e), + BabyBear::from_canonical_u32(0x47a14f1b), + BabyBear::from_canonical_u32(0x7702c2df), + BabyBear::from_canonical_u32(0x57e1c2cb), + BabyBear::from_canonical_u32(0x323c501f), + BabyBear::from_canonical_u32(0x13129d5d), + BabyBear::from_canonical_u32(0x244b56f0), + BabyBear::from_canonical_u32(0x0255514d), + BabyBear::from_canonical_u32(0x028c570c), + BabyBear::from_canonical_u32(0x5244e11b), + BabyBear::from_canonical_u32(0x69942524), + BabyBear::from_canonical_u32(0x20551bb9), + BabyBear::from_canonical_u32(0x13097bc1), + BabyBear::from_canonical_u32(0x62f2e9c6), + BabyBear::from_canonical_u32(0x601cf47b), + BabyBear::from_canonical_u32(0x76f5eafe), + BabyBear::from_canonical_u32(0x2f839d50), + BabyBear::from_canonical_u32(0x659a25b9), + BabyBear::from_canonical_u32(0x32ea8308), + BabyBear::from_canonical_u32(0x147468ed), + ], + [ + BabyBear::from_canonical_u32(0x1697d292), + BabyBear::from_canonical_u32(0x4089f12a), + BabyBear::from_canonical_u32(0x2da1179d), + BabyBear::from_canonical_u32(0x61a565f5), + BabyBear::from_canonical_u32(0x2585c790), + BabyBear::from_canonical_u32(0x35eeec00), + BabyBear::from_canonical_u32(0x29203600), + BabyBear::from_canonical_u32(0x46f280b4), + BabyBear::from_canonical_u32(0x0b5d2085), + BabyBear::from_canonical_u32(0x4c1f8626), + BabyBear::from_canonical_u32(0x2ca3eeb2), + BabyBear::from_canonical_u32(0x2f1ea91b), + BabyBear::from_canonical_u32(0x3392123a), + BabyBear::from_canonical_u32(0x5c0dafd7), + BabyBear::from_canonical_u32(0x33058e18), + BabyBear::from_canonical_u32(0x37cdebfd), + BabyBear::from_canonical_u32(0x5650bb4e), + BabyBear::from_canonical_u32(0x53a5888d), + BabyBear::from_canonical_u32(0x448b6235), + BabyBear::from_canonical_u32(0x6028aff2), + BabyBear::from_canonical_u32(0x63fbaa76), + BabyBear::from_canonical_u32(0x716add8a), + BabyBear::from_canonical_u32(0x4626d1d4), + BabyBear::from_canonical_u32(0x77a2ff52), + BabyBear::from_canonical_u32(0x1f442334), + BabyBear::from_canonical_u32(0x07916267), + BabyBear::from_canonical_u32(0x6ecb3a10), + BabyBear::from_canonical_u32(0x054837e5), + BabyBear::from_canonical_u32(0x2f77fc14), + BabyBear::from_canonical_u32(0x55f35b87), + BabyBear::from_canonical_u32(0x05bbdb83), + BabyBear::from_canonical_u32(0x5dd63b2f), + BabyBear::from_canonical_u32(0x0e46e1db), + BabyBear::from_canonical_u32(0x28e348d4), + BabyBear::from_canonical_u32(0x0b07a90f), + BabyBear::from_canonical_u32(0x4d383bed), + ], + [ + BabyBear::from_canonical_u32(0x0f49b5c8), + BabyBear::from_canonical_u32(0x201c4435), + BabyBear::from_canonical_u32(0x124a986b), + BabyBear::from_canonical_u32(0x1f25e232), + BabyBear::from_canonical_u32(0x5d92b523), + BabyBear::from_canonical_u32(0x3a6d2257), + BabyBear::from_canonical_u32(0x05586394), + BabyBear::from_canonical_u32(0x4e1fc964), + BabyBear::from_canonical_u32(0x755cb9c9), + BabyBear::from_canonical_u32(0x65026b75), + BabyBear::from_canonical_u32(0x14505e7d), + BabyBear::from_canonical_u32(0x5a9b7696), + BabyBear::from_canonical_u32(0x1c3c6527), + BabyBear::from_canonical_u32(0x06e712c9), + BabyBear::from_canonical_u32(0x3efb39d1), + BabyBear::from_canonical_u32(0x3a402c41), + BabyBear::from_canonical_u32(0x6bb57ef2), + BabyBear::from_canonical_u32(0x4d9e7596), + BabyBear::from_canonical_u32(0x33994aa6), + BabyBear::from_canonical_u32(0x291b0470), + BabyBear::from_canonical_u32(0x0211e9d4), + BabyBear::from_canonical_u32(0x45434e48), + BabyBear::from_canonical_u32(0x239d4d65), + BabyBear::from_canonical_u32(0x1716b347), + BabyBear::from_canonical_u32(0x738c6ed2), + BabyBear::from_canonical_u32(0x06352326), + BabyBear::from_canonical_u32(0x11389929), + BabyBear::from_canonical_u32(0x58d75d7b), + BabyBear::from_canonical_u32(0x21cfc2ba), + BabyBear::from_canonical_u32(0x3866a4f5), + BabyBear::from_canonical_u32(0x7646b3ab), + BabyBear::from_canonical_u32(0x6d8b1226), + BabyBear::from_canonical_u32(0x09fde585), + BabyBear::from_canonical_u32(0x5354392c), + BabyBear::from_canonical_u32(0x4450b3ca), + BabyBear::from_canonical_u32(0x0467fffd), + ], + [ + BabyBear::from_canonical_u32(0x5845961c), + BabyBear::from_canonical_u32(0x0c1a6b58), + BabyBear::from_canonical_u32(0x3ce22c45), + BabyBear::from_canonical_u32(0x0ea10219), + BabyBear::from_canonical_u32(0x2e8401d7), + BabyBear::from_canonical_u32(0x05ddc159), + BabyBear::from_canonical_u32(0x62b5cd1f), + BabyBear::from_canonical_u32(0x4946a1f6), + BabyBear::from_canonical_u32(0x1fd7f807), + BabyBear::from_canonical_u32(0x103040b6), + BabyBear::from_canonical_u32(0x47995a6a), + BabyBear::from_canonical_u32(0x57969878), + BabyBear::from_canonical_u32(0x25228c3a), + BabyBear::from_canonical_u32(0x6bc6f9cb), + BabyBear::from_canonical_u32(0x777c68c1), + BabyBear::from_canonical_u32(0x16dc22df), + BabyBear::from_canonical_u32(0x4c379dc0), + BabyBear::from_canonical_u32(0x0b0c6d20), + BabyBear::from_canonical_u32(0x4fec57b4), + BabyBear::from_canonical_u32(0x54d4f68a), + BabyBear::from_canonical_u32(0x1fef4bfb), + BabyBear::from_canonical_u32(0x36b47524), + BabyBear::from_canonical_u32(0x74a3c8e8), + BabyBear::from_canonical_u32(0x3a53f768), + BabyBear::from_canonical_u32(0x5d8507f0), + BabyBear::from_canonical_u32(0x230eddd2), + BabyBear::from_canonical_u32(0x64ab48a9), + BabyBear::from_canonical_u32(0x2b692ffd), + BabyBear::from_canonical_u32(0x30c5401a), + BabyBear::from_canonical_u32(0x255869fc), + BabyBear::from_canonical_u32(0x38c7f463), + BabyBear::from_canonical_u32(0x05dbad21), + BabyBear::from_canonical_u32(0x5e6f798f), + BabyBear::from_canonical_u32(0x325155cd), + BabyBear::from_canonical_u32(0x0ec844be), + BabyBear::from_canonical_u32(0x367db6a2), + ], + [ + BabyBear::from_canonical_u32(0x02db0cb8), + BabyBear::from_canonical_u32(0x571a7c71), + BabyBear::from_canonical_u32(0x3c7e61c1), + BabyBear::from_canonical_u32(0x20bf2072), + BabyBear::from_canonical_u32(0x0bee4701), + BabyBear::from_canonical_u32(0x2c0d8ecb), + BabyBear::from_canonical_u32(0x6a556fcd), + BabyBear::from_canonical_u32(0x3fcbbf43), + BabyBear::from_canonical_u32(0x02ae25cd), + BabyBear::from_canonical_u32(0x0c444a9f), + BabyBear::from_canonical_u32(0x0fa143ad), + BabyBear::from_canonical_u32(0x4de0a2ca), + BabyBear::from_canonical_u32(0x152739b2), + BabyBear::from_canonical_u32(0x4a2b0522), + BabyBear::from_canonical_u32(0x572ba55a), + BabyBear::from_canonical_u32(0x13fdfc3a), + BabyBear::from_canonical_u32(0x76d6a295), + BabyBear::from_canonical_u32(0x666dfc54), + BabyBear::from_canonical_u32(0x76d24ad8), + BabyBear::from_canonical_u32(0x4e32ba0d), + BabyBear::from_canonical_u32(0x2bbdb5e5), + BabyBear::from_canonical_u32(0x2f63afb2), + BabyBear::from_canonical_u32(0x18fb6122), + BabyBear::from_canonical_u32(0x714d617e), + BabyBear::from_canonical_u32(0x2c70dc1b), + BabyBear::from_canonical_u32(0x516162c3), + BabyBear::from_canonical_u32(0x4343dc1a), + BabyBear::from_canonical_u32(0x450d7026), + BabyBear::from_canonical_u32(0x5c17c331), + BabyBear::from_canonical_u32(0x0948d185), + BabyBear::from_canonical_u32(0x7454beb3), + BabyBear::from_canonical_u32(0x3ea0a216), + BabyBear::from_canonical_u32(0x0000c43d), + BabyBear::from_canonical_u32(0x74a2b0d8), + BabyBear::from_canonical_u32(0x73d69fb8), + BabyBear::from_canonical_u32(0x48523a60), + ], + [ + BabyBear::from_canonical_u32(0x453fc889), + BabyBear::from_canonical_u32(0x2c32ea2e), + BabyBear::from_canonical_u32(0x41430470), + BabyBear::from_canonical_u32(0x46776e82), + BabyBear::from_canonical_u32(0x627840bf), + BabyBear::from_canonical_u32(0x528c047c), + BabyBear::from_canonical_u32(0x5b4e1dba), + BabyBear::from_canonical_u32(0x04647f76), + BabyBear::from_canonical_u32(0x2f78ecd6), + BabyBear::from_canonical_u32(0x4235a496), + BabyBear::from_canonical_u32(0x431549be), + BabyBear::from_canonical_u32(0x0b8f1722), + BabyBear::from_canonical_u32(0x7516d3ca), + BabyBear::from_canonical_u32(0x1ddc818f), + BabyBear::from_canonical_u32(0x4a233c8e), + BabyBear::from_canonical_u32(0x5c575765), + BabyBear::from_canonical_u32(0x5d7b42d5), + BabyBear::from_canonical_u32(0x47055688), + BabyBear::from_canonical_u32(0x0a3ab806), + BabyBear::from_canonical_u32(0x0bfd9059), + BabyBear::from_canonical_u32(0x38ed3b1f), + BabyBear::from_canonical_u32(0x4fb04531), + BabyBear::from_canonical_u32(0x20fa3d28), + BabyBear::from_canonical_u32(0x14df3c63), + BabyBear::from_canonical_u32(0x4fb9d1a4), + BabyBear::from_canonical_u32(0x0809c31d), + BabyBear::from_canonical_u32(0x762dd089), + BabyBear::from_canonical_u32(0x64805c83), + BabyBear::from_canonical_u32(0x752e9fb7), + BabyBear::from_canonical_u32(0x77c1e7e0), + BabyBear::from_canonical_u32(0x3549fd80), + BabyBear::from_canonical_u32(0x4fd91868), + BabyBear::from_canonical_u32(0x66d64911), + BabyBear::from_canonical_u32(0x1295612f), + BabyBear::from_canonical_u32(0x3da4a88c), + BabyBear::from_canonical_u32(0x0227e20f), + ], + [ + BabyBear::from_canonical_u32(0x0bd786db), + BabyBear::from_canonical_u32(0x5c188c46), + BabyBear::from_canonical_u32(0x1b3fad65), + BabyBear::from_canonical_u32(0x40c9cfff), + BabyBear::from_canonical_u32(0x4421c1a4), + BabyBear::from_canonical_u32(0x6a15e39e), + BabyBear::from_canonical_u32(0x73bfa83f), + BabyBear::from_canonical_u32(0x25103271), + BabyBear::from_canonical_u32(0x264562fc), + BabyBear::from_canonical_u32(0x0fd4085d), + BabyBear::from_canonical_u32(0x14bfed86), + BabyBear::from_canonical_u32(0x3c10d05d), + BabyBear::from_canonical_u32(0x6e58d404), + BabyBear::from_canonical_u32(0x2fb31cd5), + BabyBear::from_canonical_u32(0x1cbfa110), + BabyBear::from_canonical_u32(0x4e97c5db), + BabyBear::from_canonical_u32(0x40f1612a), + BabyBear::from_canonical_u32(0x64ebadd2), + BabyBear::from_canonical_u32(0x274db263), + BabyBear::from_canonical_u32(0x77342423), + BabyBear::from_canonical_u32(0x177c2c21), + BabyBear::from_canonical_u32(0x03455cfc), + BabyBear::from_canonical_u32(0x4f72995e), + BabyBear::from_canonical_u32(0x17abdaa7), + BabyBear::from_canonical_u32(0x7637f196), + BabyBear::from_canonical_u32(0x2c0fd07a), + BabyBear::from_canonical_u32(0x7650931a), + BabyBear::from_canonical_u32(0x1bced9a0), + BabyBear::from_canonical_u32(0x3a910abf), + BabyBear::from_canonical_u32(0x64a01437), + BabyBear::from_canonical_u32(0x4c561c72), + BabyBear::from_canonical_u32(0x1429fe09), + BabyBear::from_canonical_u32(0x546ce43c), + BabyBear::from_canonical_u32(0x72577461), + BabyBear::from_canonical_u32(0x75042041), + BabyBear::from_canonical_u32(0x1998d519), + ], + [ + BabyBear::from_canonical_u32(0x746a2b7e), + BabyBear::from_canonical_u32(0x3d715c7f), + BabyBear::from_canonical_u32(0x4635245c), + BabyBear::from_canonical_u32(0x4fec3106), + BabyBear::from_canonical_u32(0x64deed7e), + BabyBear::from_canonical_u32(0x1978253c), + BabyBear::from_canonical_u32(0x25b7aaf2), + BabyBear::from_canonical_u32(0x7096624c), + BabyBear::from_canonical_u32(0x0735cc20), + BabyBear::from_canonical_u32(0x6360ebd8), + BabyBear::from_canonical_u32(0x3a1e4d6d), + BabyBear::from_canonical_u32(0x721a20e2), + BabyBear::from_canonical_u32(0x0255ea5b), + BabyBear::from_canonical_u32(0x228c26d3), + BabyBear::from_canonical_u32(0x611805bd), + BabyBear::from_canonical_u32(0x720c3844), + BabyBear::from_canonical_u32(0x76e38531), + BabyBear::from_canonical_u32(0x5800f808), + BabyBear::from_canonical_u32(0x0b90773f), + BabyBear::from_canonical_u32(0x2e0045cb), + BabyBear::from_canonical_u32(0x499953d9), + BabyBear::from_canonical_u32(0x6d428899), + BabyBear::from_canonical_u32(0x3f70e34a), + BabyBear::from_canonical_u32(0x43bf11d5), + BabyBear::from_canonical_u32(0x656df6fa), + BabyBear::from_canonical_u32(0x70ac488a), + BabyBear::from_canonical_u32(0x6954ea33), + BabyBear::from_canonical_u32(0x60fa793a), + BabyBear::from_canonical_u32(0x0d549cda), + BabyBear::from_canonical_u32(0x3530bcd8), + BabyBear::from_canonical_u32(0x0fcba3f3), + BabyBear::from_canonical_u32(0x2e62a812), + BabyBear::from_canonical_u32(0x3fe9c86d), + BabyBear::from_canonical_u32(0x37710bbd), + BabyBear::from_canonical_u32(0x55b2ca9d), + BabyBear::from_canonical_u32(0x03783592), ], ]; pub static ref PART_RC_36_34: [BabyBear; 34] = [ - f(0x05c9ffe7), - f(0x6e806b3f), - f(0x0472e024), - f(0x57d9cb79), - f(0x14cc884b), - f(0x6ee8845d), - f(0x061af9d7), - f(0x3ebc8492), - f(0x16ff9ca0), - f(0x14443866), - f(0x4040c0a2), - f(0x33e5984d), - f(0x239f95eb), - f(0x5d0567d0), - f(0x604157ab), - f(0x0dcf5813), - f(0x70dea89a), - f(0x52733546), - f(0x23a98814), - f(0x2b99715a), - f(0x351d8391), - f(0x4d350344), - f(0x6ed6c398), - f(0x5aa1bdbb), - f(0x16711deb), - f(0x24690f7c), - f(0x4de9605a), - f(0x403d0125), - f(0x6767a739), - f(0x5b230842), - f(0x39dca56b), - f(0x75544393), - f(0x0964c1a8), - f(0x5f8462b3), + BabyBear::from_canonical_u32(0x05c9ffe7), + BabyBear::from_canonical_u32(0x6e806b3f), + BabyBear::from_canonical_u32(0x0472e024), + BabyBear::from_canonical_u32(0x57d9cb79), + BabyBear::from_canonical_u32(0x14cc884b), + BabyBear::from_canonical_u32(0x6ee8845d), + BabyBear::from_canonical_u32(0x061af9d7), + BabyBear::from_canonical_u32(0x3ebc8492), + BabyBear::from_canonical_u32(0x16ff9ca0), + BabyBear::from_canonical_u32(0x14443866), + BabyBear::from_canonical_u32(0x4040c0a2), + BabyBear::from_canonical_u32(0x33e5984d), + BabyBear::from_canonical_u32(0x239f95eb), + BabyBear::from_canonical_u32(0x5d0567d0), + BabyBear::from_canonical_u32(0x604157ab), + BabyBear::from_canonical_u32(0x0dcf5813), + BabyBear::from_canonical_u32(0x70dea89a), + BabyBear::from_canonical_u32(0x52733546), + BabyBear::from_canonical_u32(0x23a98814), + BabyBear::from_canonical_u32(0x2b99715a), + BabyBear::from_canonical_u32(0x351d8391), + BabyBear::from_canonical_u32(0x4d350344), + BabyBear::from_canonical_u32(0x6ed6c398), + BabyBear::from_canonical_u32(0x5aa1bdbb), + BabyBear::from_canonical_u32(0x16711deb), + BabyBear::from_canonical_u32(0x24690f7c), + BabyBear::from_canonical_u32(0x4de9605a), + BabyBear::from_canonical_u32(0x403d0125), + BabyBear::from_canonical_u32(0x6767a739), + BabyBear::from_canonical_u32(0x5b230842), + BabyBear::from_canonical_u32(0x39dca56b), + BabyBear::from_canonical_u32(0x75544393), + BabyBear::from_canonical_u32(0x0964c1a8), + BabyBear::from_canonical_u32(0x5f8462b3), ]; } -// +++ t = 40 R_F = 8, R_P = 38 +++ +// +++ t = 40, R_F = 8, R_P = 38 +++ lazy_static! { - pub static ref MATRIX_DIAG_40_BABYBEAR: [BabyBear; 40] = [ - f(0x1777e9b3), - f(0x0543f0b5), - f(0x389b8f6c), - f(0x5165974e), - f(0x268bf773), - f(0x03911e91), - f(0x4b044d43), - f(0x0f521ff0), - f(0x4adc8c0a), - f(0x4b1b25f2), - f(0x63418d55), - f(0x568f6e7c), - f(0x06200af9), - f(0x28db6a1a), - f(0x62df9495), - f(0x4fb85a04), - f(0x640d7077), - f(0x02d7a4ec), - f(0x30c1a997), - f(0x03f28710), - f(0x06bf2d98), - f(0x5808f4af), - f(0x377d5fb2), - f(0x4c0e5622), - f(0x629e4242), - f(0x1bbee30d), - f(0x69dc7ec1), - f(0x52acbacc), - f(0x15f59364), - f(0x21842f31), - f(0x3a08b55b), - f(0x468ac82f), - f(0x56fe58b7), - f(0x2da33c74), - f(0x1b9cbca4), - f(0x11cc15f4), - f(0x340679cc), - f(0x365e5bec), - f(0x151f0efc), - f(0x77215248), - ]; + pub static ref MATRIX_DIAG_40_BABYBEAR: Array = Array::clone_from_slice( + [ + BabyBear::from_canonical_u32(0x1777e9b2), + BabyBear::from_canonical_u32(0x0543f0b4), + BabyBear::from_canonical_u32(0x389b8f6b), + BabyBear::from_canonical_u32(0x5165974d), + BabyBear::from_canonical_u32(0x268bf772), + BabyBear::from_canonical_u32(0x03911e90), + BabyBear::from_canonical_u32(0x4b044d42), + BabyBear::from_canonical_u32(0x0f521fef), + BabyBear::from_canonical_u32(0x4adc8c09), + BabyBear::from_canonical_u32(0x4b1b25f1), + BabyBear::from_canonical_u32(0x63418d54), + BabyBear::from_canonical_u32(0x568f6e7b), + BabyBear::from_canonical_u32(0x06200af8), + BabyBear::from_canonical_u32(0x28db6a19), + BabyBear::from_canonical_u32(0x62df9494), + BabyBear::from_canonical_u32(0x4fb85a03), + BabyBear::from_canonical_u32(0x640d7076), + BabyBear::from_canonical_u32(0x02d7a4eb), + BabyBear::from_canonical_u32(0x30c1a996), + BabyBear::from_canonical_u32(0x03f2870f), + BabyBear::from_canonical_u32(0x06bf2d97), + BabyBear::from_canonical_u32(0x5808f4ae), + BabyBear::from_canonical_u32(0x377d5fb1), + BabyBear::from_canonical_u32(0x4c0e5621), + BabyBear::from_canonical_u32(0x629e4241), + BabyBear::from_canonical_u32(0x1bbee30c), + BabyBear::from_canonical_u32(0x69dc7ec0), + BabyBear::from_canonical_u32(0x52acbacb), + BabyBear::from_canonical_u32(0x15f59363), + BabyBear::from_canonical_u32(0x21842f30), + BabyBear::from_canonical_u32(0x3a08b55a), + BabyBear::from_canonical_u32(0x468ac82e), + BabyBear::from_canonical_u32(0x56fe58b6), + BabyBear::from_canonical_u32(0x2da33c73), + BabyBear::from_canonical_u32(0x1b9cbca3), + BabyBear::from_canonical_u32(0x11cc15f3), + BabyBear::from_canonical_u32(0x340679cb), + BabyBear::from_canonical_u32(0x365e5beb), + BabyBear::from_canonical_u32(0x151f0efb), + BabyBear::from_canonical_u32(0x77215247), + ] + .as_ref() + ); pub static ref FULL_RC_40_8: [[BabyBear; 40]; 8] = [ [ - f(0x0267f8f9), - f(0x2e204ec8), - f(0x6cdf5900), - f(0x6d0dc9c8), - f(0x10e8a01f), - f(0x5c415df0), - f(0x43df3171), - f(0x07db48b4), - f(0x6f33cc71), - f(0x46382db7), - f(0x1f519135), - f(0x14973ea6), - f(0x67ee07f4), - f(0x5389b3ad), - f(0x66c66143), - f(0x566db411), - f(0x3ab9c1d6), - f(0x6e305c1c), - f(0x0ec844d4), - f(0x76250333), - f(0x15f904ff), - f(0x5b7508b0), - f(0x64ebd537), - f(0x59cf7dc6), - f(0x66d2569f), - f(0x75416036), - f(0x4c4a38c2), - f(0x5954c256), - f(0x0ed329b4), - f(0x2c28b0dd), - f(0x07246859), - f(0x39f19cd5), - f(0x1b6903e5), - f(0x6abb9429), - f(0x6a249935), - f(0x04872372), - f(0x3eeed8ea), - f(0x3ee43f85), - f(0x1078d755), - f(0x6fa852af), - ], - [ - f(0x44740cbc), - f(0x00f8081a), - f(0x01811444), - f(0x731ee59f), - f(0x4867f0ce), - f(0x0c588fd4), - f(0x585a16fc), - f(0x08719b0e), - f(0x3b07029d), - f(0x0259b02f), - f(0x5139ceb4), - f(0x5ac73677), - f(0x7685ac3b), - f(0x04c072ab), - f(0x3f849fcf), - f(0x4c6154cf), - f(0x4ab453ac), - f(0x44d5a7a3), - f(0x2effdd19), - f(0x4f374fbc), - f(0x753bd5dc), - f(0x6fdb5329), - f(0x55e1b56b), - f(0x4f49d1d6), - f(0x34181fc0), - f(0x566a107e), - f(0x4a12eb1e), - f(0x5fc4e3ce), - f(0x54371f12), - f(0x30f17e0c), - f(0x19248bac), - f(0x36f26187), - f(0x55b53ee7), - f(0x2b52f40b), - f(0x6e073e98), - f(0x60fb7805), - f(0x2cd2ce95), - f(0x3ba743e0), - f(0x3f6f9a6e), - f(0x4185ca95), - ], - [ - f(0x1786fa28), - f(0x4559df0d), - f(0x3a378fe1), - f(0x74f17873), - f(0x6c1944a9), - f(0x6d497657), - f(0x43aca442), - f(0x3d5fad48), - f(0x55d2185a), - f(0x1b449603), - f(0x4a8eb16c), - f(0x47c25f03), - f(0x6e7fb57a), - f(0x32912858), - f(0x64f3275f), - f(0x2a4a3bc2), - f(0x3f0527db), - f(0x3b326392), - f(0x071b2b1b), - f(0x10693c50), - f(0x33fb0dd0), - f(0x078f4c37), - f(0x6eedfbb2), - f(0x6821df43), - f(0x55d2c713), - f(0x5c7fe3e0), - f(0x50e832a2), - f(0x3a7631aa), - f(0x04ba0123), - f(0x2cfb5b6b), - f(0x0b9c5273), - f(0x670142d5), - f(0x0b3fb804), - f(0x0e00153c), - f(0x08b069e8), - f(0x27e235b7), - f(0x60f78fb7), - f(0x30a2dc3b), - f(0x303d0e38), - f(0x3ddf3f65), - ], - [ - f(0x0b3b8328), - f(0x21086d1c), - f(0x2f1f9de8), - f(0x3e23caf9), - f(0x11f14ba7), - f(0x09d38106), - f(0x5ec2b952), - f(0x0baec601), - f(0x11e49227), - f(0x15e2ef33), - f(0x314952f9), - f(0x24475bc3), - f(0x5038a984), - f(0x5258f8b5), - f(0x100379e6), - f(0x775b5485), - f(0x4b707a64), - f(0x04483436), - f(0x200c8ad0), - f(0x123d4eac), - f(0x4c046cbc), - f(0x73709a74), - f(0x7202ca82), - f(0x475a3238), - f(0x5db391c4), - f(0x1d1b7660), - f(0x60f72b67), - f(0x71254dab), - f(0x56968dbb), - f(0x20e0a8c3), - f(0x114e2fd1), - f(0x61df1451), - f(0x381788ba), - f(0x294050ac), - f(0x5a6fd148), - f(0x4034b9ee), - f(0x5cc417f3), - f(0x5e7095ce), - f(0x054e4a34), - f(0x0f7ba825), - ], - [ - f(0x73123b93), - f(0x048a12b8), - f(0x5056936f), - f(0x37d594d3), - f(0x52ca2586), - f(0x32493cc3), - f(0x7049fb4d), - f(0x707fa3d2), - f(0x4106b220), - f(0x3ff59341), - f(0x719a522a), - f(0x0cb25ff3), - f(0x53e971d1), - f(0x7214fee0), - f(0x56225dbb), - f(0x4d81d005), - f(0x44831a9b), - f(0x495e9666), - f(0x4c67147f), - f(0x7072557c), - f(0x334a89a9), - f(0x04baf7a4), - f(0x6f9126b3), - f(0x3084290f), - f(0x37a0384f), - f(0x0d932c18), - f(0x3dbf6b43), - f(0x22e761f3), - f(0x62ed68aa), - f(0x6626e5d8), - f(0x14a12159), - f(0x1e0f509a), - f(0x37e4adb6), - f(0x0663011d), - f(0x6f0f4803), - f(0x54fd0b9b), - f(0x03abc2db), - f(0x4838194c), - f(0x433fbe4d), - f(0x24eb8870), - ], - [ - f(0x13f7400e), - f(0x74795c2a), - f(0x4fbb9877), - f(0x41e2755c), - f(0x51363155), - f(0x67f66a57), - f(0x335a0ba7), - f(0x43c4f31d), - f(0x5efe1dde), - f(0x6c397d85), - f(0x23568de0), - f(0x495fc6df), - f(0x49e8e211), - f(0x6d4de95e), - f(0x5c808b39), - f(0x1fc94a5f), - f(0x245bc14d), - f(0x5f1ac904), - f(0x388436ca), - f(0x58e6b4e9), - f(0x04c079c7), - f(0x3735485f), - f(0x2c80244b), - f(0x0c9d8b45), - f(0x4774ba20), - f(0x713bdb3c), - f(0x6b316c15), - f(0x74ac4278), - f(0x0c12d5fb), - f(0x61001dab), - f(0x33856054), - f(0x4e1b746d), - f(0x21b51f61), - f(0x37b550a9), - f(0x39338fd9), - f(0x433a0639), - f(0x57f006b2), - f(0x272b7c47), - f(0x20f739ca), - f(0x523350db), - ], - [ - f(0x4d7a5406), - f(0x49ec80e4), - f(0x2c41d259), - f(0x265919f9), - f(0x3307e5f2), - f(0x6048fe9c), - f(0x4836baa1), - f(0x3bfe0fae), - f(0x1f5db0c6), - f(0x201ead4d), - f(0x2e317c44), - f(0x4222e148), - f(0x2a870077), - f(0x75f8076a), - f(0x5d63eb28), - f(0x5a22e558), - f(0x3e7d4b9c), - f(0x63df2690), - f(0x1669ac94), - f(0x715f6546), - f(0x5a8377b6), - f(0x0b4cac61), - f(0x57f3fa25), - f(0x120101f3), - f(0x4fe5cf2e), - f(0x3359279e), - f(0x35e2bdce), - f(0x15364956), - f(0x284650b3), - f(0x6478767b), - f(0x5f3cd9f5), - f(0x2a422821), - f(0x6c1e3000), - f(0x16387587), - f(0x5bb9f8e6), - f(0x1d51cdca), - f(0x2bcbb005), - f(0x507cdada), - f(0x1c13cd1b), - f(0x2c3e9d96), - ], - [ - f(0x10f69a5f), - f(0x65d4145e), - f(0x43a60545), - f(0x65d0b19b), - f(0x296f658f), - f(0x20bb0340), - f(0x381c8547), - f(0x24e32392), - f(0x635352ea), - f(0x2da311b2), - f(0x6391c01b), - f(0x05dfd4e5), - f(0x2116d3a6), - f(0x170532fb), - f(0x5f79effa), - f(0x0e35a671), - f(0x237cc347), - f(0x42433afa), - f(0x5fb2dab8), - f(0x6860e85c), - f(0x05558970), - f(0x3c1bc9cf), - f(0x36269175), - f(0x58553992), - f(0x0d10d603), - f(0x121317e6), - f(0x412d2b5c), - f(0x3b2a9a4d), - f(0x4709ec32), - f(0x410b23ae), - f(0x0e4da53d), - f(0x42ac4c88), - f(0x58fefacd), - f(0x44eef020), - f(0x59971e5b), - f(0x07abb7fb), - f(0x0b1dc3b9), - f(0x48f6a651), - f(0x3ca13acf), - f(0x5a3f16a1), + BabyBear::from_canonical_u32(0x0267f8f9), + BabyBear::from_canonical_u32(0x2e204ec8), + BabyBear::from_canonical_u32(0x6cdf5900), + BabyBear::from_canonical_u32(0x6d0dc9c8), + BabyBear::from_canonical_u32(0x10e8a01f), + BabyBear::from_canonical_u32(0x5c415df0), + BabyBear::from_canonical_u32(0x43df3171), + BabyBear::from_canonical_u32(0x07db48b4), + BabyBear::from_canonical_u32(0x6f33cc71), + BabyBear::from_canonical_u32(0x46382db7), + BabyBear::from_canonical_u32(0x1f519135), + BabyBear::from_canonical_u32(0x14973ea6), + BabyBear::from_canonical_u32(0x67ee07f4), + BabyBear::from_canonical_u32(0x5389b3ad), + BabyBear::from_canonical_u32(0x66c66143), + BabyBear::from_canonical_u32(0x566db411), + BabyBear::from_canonical_u32(0x3ab9c1d6), + BabyBear::from_canonical_u32(0x6e305c1c), + BabyBear::from_canonical_u32(0x0ec844d4), + BabyBear::from_canonical_u32(0x76250333), + BabyBear::from_canonical_u32(0x15f904ff), + BabyBear::from_canonical_u32(0x5b7508b0), + BabyBear::from_canonical_u32(0x64ebd537), + BabyBear::from_canonical_u32(0x59cf7dc6), + BabyBear::from_canonical_u32(0x66d2569f), + BabyBear::from_canonical_u32(0x75416036), + BabyBear::from_canonical_u32(0x4c4a38c2), + BabyBear::from_canonical_u32(0x5954c256), + BabyBear::from_canonical_u32(0x0ed329b4), + BabyBear::from_canonical_u32(0x2c28b0dd), + BabyBear::from_canonical_u32(0x07246859), + BabyBear::from_canonical_u32(0x39f19cd5), + BabyBear::from_canonical_u32(0x1b6903e5), + BabyBear::from_canonical_u32(0x6abb9429), + BabyBear::from_canonical_u32(0x6a249935), + BabyBear::from_canonical_u32(0x04872372), + BabyBear::from_canonical_u32(0x3eeed8ea), + BabyBear::from_canonical_u32(0x3ee43f85), + BabyBear::from_canonical_u32(0x1078d755), + BabyBear::from_canonical_u32(0x6fa852af), + ], + [ + BabyBear::from_canonical_u32(0x44740cbc), + BabyBear::from_canonical_u32(0x00f8081a), + BabyBear::from_canonical_u32(0x01811444), + BabyBear::from_canonical_u32(0x731ee59f), + BabyBear::from_canonical_u32(0x4867f0ce), + BabyBear::from_canonical_u32(0x0c588fd4), + BabyBear::from_canonical_u32(0x585a16fc), + BabyBear::from_canonical_u32(0x08719b0e), + BabyBear::from_canonical_u32(0x3b07029d), + BabyBear::from_canonical_u32(0x0259b02f), + BabyBear::from_canonical_u32(0x5139ceb4), + BabyBear::from_canonical_u32(0x5ac73677), + BabyBear::from_canonical_u32(0x7685ac3b), + BabyBear::from_canonical_u32(0x04c072ab), + BabyBear::from_canonical_u32(0x3f849fcf), + BabyBear::from_canonical_u32(0x4c6154cf), + BabyBear::from_canonical_u32(0x4ab453ac), + BabyBear::from_canonical_u32(0x44d5a7a3), + BabyBear::from_canonical_u32(0x2effdd19), + BabyBear::from_canonical_u32(0x4f374fbc), + BabyBear::from_canonical_u32(0x753bd5dc), + BabyBear::from_canonical_u32(0x6fdb5329), + BabyBear::from_canonical_u32(0x55e1b56b), + BabyBear::from_canonical_u32(0x4f49d1d6), + BabyBear::from_canonical_u32(0x34181fc0), + BabyBear::from_canonical_u32(0x566a107e), + BabyBear::from_canonical_u32(0x4a12eb1e), + BabyBear::from_canonical_u32(0x5fc4e3ce), + BabyBear::from_canonical_u32(0x54371f12), + BabyBear::from_canonical_u32(0x30f17e0c), + BabyBear::from_canonical_u32(0x19248bac), + BabyBear::from_canonical_u32(0x36f26187), + BabyBear::from_canonical_u32(0x55b53ee7), + BabyBear::from_canonical_u32(0x2b52f40b), + BabyBear::from_canonical_u32(0x6e073e98), + BabyBear::from_canonical_u32(0x60fb7805), + BabyBear::from_canonical_u32(0x2cd2ce95), + BabyBear::from_canonical_u32(0x3ba743e0), + BabyBear::from_canonical_u32(0x3f6f9a6e), + BabyBear::from_canonical_u32(0x4185ca95), + ], + [ + BabyBear::from_canonical_u32(0x1786fa28), + BabyBear::from_canonical_u32(0x4559df0d), + BabyBear::from_canonical_u32(0x3a378fe1), + BabyBear::from_canonical_u32(0x74f17873), + BabyBear::from_canonical_u32(0x6c1944a9), + BabyBear::from_canonical_u32(0x6d497657), + BabyBear::from_canonical_u32(0x43aca442), + BabyBear::from_canonical_u32(0x3d5fad48), + BabyBear::from_canonical_u32(0x55d2185a), + BabyBear::from_canonical_u32(0x1b449603), + BabyBear::from_canonical_u32(0x4a8eb16c), + BabyBear::from_canonical_u32(0x47c25f03), + BabyBear::from_canonical_u32(0x6e7fb57a), + BabyBear::from_canonical_u32(0x32912858), + BabyBear::from_canonical_u32(0x64f3275f), + BabyBear::from_canonical_u32(0x2a4a3bc2), + BabyBear::from_canonical_u32(0x3f0527db), + BabyBear::from_canonical_u32(0x3b326392), + BabyBear::from_canonical_u32(0x071b2b1b), + BabyBear::from_canonical_u32(0x10693c50), + BabyBear::from_canonical_u32(0x33fb0dd0), + BabyBear::from_canonical_u32(0x078f4c37), + BabyBear::from_canonical_u32(0x6eedfbb2), + BabyBear::from_canonical_u32(0x6821df43), + BabyBear::from_canonical_u32(0x55d2c713), + BabyBear::from_canonical_u32(0x5c7fe3e0), + BabyBear::from_canonical_u32(0x50e832a2), + BabyBear::from_canonical_u32(0x3a7631aa), + BabyBear::from_canonical_u32(0x04ba0123), + BabyBear::from_canonical_u32(0x2cfb5b6b), + BabyBear::from_canonical_u32(0x0b9c5273), + BabyBear::from_canonical_u32(0x670142d5), + BabyBear::from_canonical_u32(0x0b3fb804), + BabyBear::from_canonical_u32(0x0e00153c), + BabyBear::from_canonical_u32(0x08b069e8), + BabyBear::from_canonical_u32(0x27e235b7), + BabyBear::from_canonical_u32(0x60f78fb7), + BabyBear::from_canonical_u32(0x30a2dc3b), + BabyBear::from_canonical_u32(0x303d0e38), + BabyBear::from_canonical_u32(0x3ddf3f65), + ], + [ + BabyBear::from_canonical_u32(0x0b3b8328), + BabyBear::from_canonical_u32(0x21086d1c), + BabyBear::from_canonical_u32(0x2f1f9de8), + BabyBear::from_canonical_u32(0x3e23caf9), + BabyBear::from_canonical_u32(0x11f14ba7), + BabyBear::from_canonical_u32(0x09d38106), + BabyBear::from_canonical_u32(0x5ec2b952), + BabyBear::from_canonical_u32(0x0baec601), + BabyBear::from_canonical_u32(0x11e49227), + BabyBear::from_canonical_u32(0x15e2ef33), + BabyBear::from_canonical_u32(0x314952f9), + BabyBear::from_canonical_u32(0x24475bc3), + BabyBear::from_canonical_u32(0x5038a984), + BabyBear::from_canonical_u32(0x5258f8b5), + BabyBear::from_canonical_u32(0x100379e6), + BabyBear::from_canonical_u32(0x775b5485), + BabyBear::from_canonical_u32(0x4b707a64), + BabyBear::from_canonical_u32(0x04483436), + BabyBear::from_canonical_u32(0x200c8ad0), + BabyBear::from_canonical_u32(0x123d4eac), + BabyBear::from_canonical_u32(0x4c046cbc), + BabyBear::from_canonical_u32(0x73709a74), + BabyBear::from_canonical_u32(0x7202ca82), + BabyBear::from_canonical_u32(0x475a3238), + BabyBear::from_canonical_u32(0x5db391c4), + BabyBear::from_canonical_u32(0x1d1b7660), + BabyBear::from_canonical_u32(0x60f72b67), + BabyBear::from_canonical_u32(0x71254dab), + BabyBear::from_canonical_u32(0x56968dbb), + BabyBear::from_canonical_u32(0x20e0a8c3), + BabyBear::from_canonical_u32(0x114e2fd1), + BabyBear::from_canonical_u32(0x61df1451), + BabyBear::from_canonical_u32(0x381788ba), + BabyBear::from_canonical_u32(0x294050ac), + BabyBear::from_canonical_u32(0x5a6fd148), + BabyBear::from_canonical_u32(0x4034b9ee), + BabyBear::from_canonical_u32(0x5cc417f3), + BabyBear::from_canonical_u32(0x5e7095ce), + BabyBear::from_canonical_u32(0x054e4a34), + BabyBear::from_canonical_u32(0x0f7ba825), + ], + [ + BabyBear::from_canonical_u32(0x73123b93), + BabyBear::from_canonical_u32(0x048a12b8), + BabyBear::from_canonical_u32(0x5056936f), + BabyBear::from_canonical_u32(0x37d594d3), + BabyBear::from_canonical_u32(0x52ca2586), + BabyBear::from_canonical_u32(0x32493cc3), + BabyBear::from_canonical_u32(0x7049fb4d), + BabyBear::from_canonical_u32(0x707fa3d2), + BabyBear::from_canonical_u32(0x4106b220), + BabyBear::from_canonical_u32(0x3ff59341), + BabyBear::from_canonical_u32(0x719a522a), + BabyBear::from_canonical_u32(0x0cb25ff3), + BabyBear::from_canonical_u32(0x53e971d1), + BabyBear::from_canonical_u32(0x7214fee0), + BabyBear::from_canonical_u32(0x56225dbb), + BabyBear::from_canonical_u32(0x4d81d005), + BabyBear::from_canonical_u32(0x44831a9b), + BabyBear::from_canonical_u32(0x495e9666), + BabyBear::from_canonical_u32(0x4c67147f), + BabyBear::from_canonical_u32(0x7072557c), + BabyBear::from_canonical_u32(0x334a89a9), + BabyBear::from_canonical_u32(0x04baf7a4), + BabyBear::from_canonical_u32(0x6f9126b3), + BabyBear::from_canonical_u32(0x3084290f), + BabyBear::from_canonical_u32(0x37a0384f), + BabyBear::from_canonical_u32(0x0d932c18), + BabyBear::from_canonical_u32(0x3dbf6b43), + BabyBear::from_canonical_u32(0x22e761f3), + BabyBear::from_canonical_u32(0x62ed68aa), + BabyBear::from_canonical_u32(0x6626e5d8), + BabyBear::from_canonical_u32(0x14a12159), + BabyBear::from_canonical_u32(0x1e0f509a), + BabyBear::from_canonical_u32(0x37e4adb6), + BabyBear::from_canonical_u32(0x0663011d), + BabyBear::from_canonical_u32(0x6f0f4803), + BabyBear::from_canonical_u32(0x54fd0b9b), + BabyBear::from_canonical_u32(0x03abc2db), + BabyBear::from_canonical_u32(0x4838194c), + BabyBear::from_canonical_u32(0x433fbe4d), + BabyBear::from_canonical_u32(0x24eb8870), + ], + [ + BabyBear::from_canonical_u32(0x13f7400e), + BabyBear::from_canonical_u32(0x74795c2a), + BabyBear::from_canonical_u32(0x4fbb9877), + BabyBear::from_canonical_u32(0x41e2755c), + BabyBear::from_canonical_u32(0x51363155), + BabyBear::from_canonical_u32(0x67f66a57), + BabyBear::from_canonical_u32(0x335a0ba7), + BabyBear::from_canonical_u32(0x43c4f31d), + BabyBear::from_canonical_u32(0x5efe1dde), + BabyBear::from_canonical_u32(0x6c397d85), + BabyBear::from_canonical_u32(0x23568de0), + BabyBear::from_canonical_u32(0x495fc6df), + BabyBear::from_canonical_u32(0x49e8e211), + BabyBear::from_canonical_u32(0x6d4de95e), + BabyBear::from_canonical_u32(0x5c808b39), + BabyBear::from_canonical_u32(0x1fc94a5f), + BabyBear::from_canonical_u32(0x245bc14d), + BabyBear::from_canonical_u32(0x5f1ac904), + BabyBear::from_canonical_u32(0x388436ca), + BabyBear::from_canonical_u32(0x58e6b4e9), + BabyBear::from_canonical_u32(0x04c079c7), + BabyBear::from_canonical_u32(0x3735485f), + BabyBear::from_canonical_u32(0x2c80244b), + BabyBear::from_canonical_u32(0x0c9d8b45), + BabyBear::from_canonical_u32(0x4774ba20), + BabyBear::from_canonical_u32(0x713bdb3c), + BabyBear::from_canonical_u32(0x6b316c15), + BabyBear::from_canonical_u32(0x74ac4278), + BabyBear::from_canonical_u32(0x0c12d5fb), + BabyBear::from_canonical_u32(0x61001dab), + BabyBear::from_canonical_u32(0x33856054), + BabyBear::from_canonical_u32(0x4e1b746d), + BabyBear::from_canonical_u32(0x21b51f61), + BabyBear::from_canonical_u32(0x37b550a9), + BabyBear::from_canonical_u32(0x39338fd9), + BabyBear::from_canonical_u32(0x433a0639), + BabyBear::from_canonical_u32(0x57f006b2), + BabyBear::from_canonical_u32(0x272b7c47), + BabyBear::from_canonical_u32(0x20f739ca), + BabyBear::from_canonical_u32(0x523350db), + ], + [ + BabyBear::from_canonical_u32(0x4d7a5406), + BabyBear::from_canonical_u32(0x49ec80e4), + BabyBear::from_canonical_u32(0x2c41d259), + BabyBear::from_canonical_u32(0x265919f9), + BabyBear::from_canonical_u32(0x3307e5f2), + BabyBear::from_canonical_u32(0x6048fe9c), + BabyBear::from_canonical_u32(0x4836baa1), + BabyBear::from_canonical_u32(0x3bfe0fae), + BabyBear::from_canonical_u32(0x1f5db0c6), + BabyBear::from_canonical_u32(0x201ead4d), + BabyBear::from_canonical_u32(0x2e317c44), + BabyBear::from_canonical_u32(0x4222e148), + BabyBear::from_canonical_u32(0x2a870077), + BabyBear::from_canonical_u32(0x75f8076a), + BabyBear::from_canonical_u32(0x5d63eb28), + BabyBear::from_canonical_u32(0x5a22e558), + BabyBear::from_canonical_u32(0x3e7d4b9c), + BabyBear::from_canonical_u32(0x63df2690), + BabyBear::from_canonical_u32(0x1669ac94), + BabyBear::from_canonical_u32(0x715f6546), + BabyBear::from_canonical_u32(0x5a8377b6), + BabyBear::from_canonical_u32(0x0b4cac61), + BabyBear::from_canonical_u32(0x57f3fa25), + BabyBear::from_canonical_u32(0x120101f3), + BabyBear::from_canonical_u32(0x4fe5cf2e), + BabyBear::from_canonical_u32(0x3359279e), + BabyBear::from_canonical_u32(0x35e2bdce), + BabyBear::from_canonical_u32(0x15364956), + BabyBear::from_canonical_u32(0x284650b3), + BabyBear::from_canonical_u32(0x6478767b), + BabyBear::from_canonical_u32(0x5f3cd9f5), + BabyBear::from_canonical_u32(0x2a422821), + BabyBear::from_canonical_u32(0x6c1e3000), + BabyBear::from_canonical_u32(0x16387587), + BabyBear::from_canonical_u32(0x5bb9f8e6), + BabyBear::from_canonical_u32(0x1d51cdca), + BabyBear::from_canonical_u32(0x2bcbb005), + BabyBear::from_canonical_u32(0x507cdada), + BabyBear::from_canonical_u32(0x1c13cd1b), + BabyBear::from_canonical_u32(0x2c3e9d96), + ], + [ + BabyBear::from_canonical_u32(0x10f69a5f), + BabyBear::from_canonical_u32(0x65d4145e), + BabyBear::from_canonical_u32(0x43a60545), + BabyBear::from_canonical_u32(0x65d0b19b), + BabyBear::from_canonical_u32(0x296f658f), + BabyBear::from_canonical_u32(0x20bb0340), + BabyBear::from_canonical_u32(0x381c8547), + BabyBear::from_canonical_u32(0x24e32392), + BabyBear::from_canonical_u32(0x635352ea), + BabyBear::from_canonical_u32(0x2da311b2), + BabyBear::from_canonical_u32(0x6391c01b), + BabyBear::from_canonical_u32(0x05dfd4e5), + BabyBear::from_canonical_u32(0x2116d3a6), + BabyBear::from_canonical_u32(0x170532fb), + BabyBear::from_canonical_u32(0x5f79effa), + BabyBear::from_canonical_u32(0x0e35a671), + BabyBear::from_canonical_u32(0x237cc347), + BabyBear::from_canonical_u32(0x42433afa), + BabyBear::from_canonical_u32(0x5fb2dab8), + BabyBear::from_canonical_u32(0x6860e85c), + BabyBear::from_canonical_u32(0x05558970), + BabyBear::from_canonical_u32(0x3c1bc9cf), + BabyBear::from_canonical_u32(0x36269175), + BabyBear::from_canonical_u32(0x58553992), + BabyBear::from_canonical_u32(0x0d10d603), + BabyBear::from_canonical_u32(0x121317e6), + BabyBear::from_canonical_u32(0x412d2b5c), + BabyBear::from_canonical_u32(0x3b2a9a4d), + BabyBear::from_canonical_u32(0x4709ec32), + BabyBear::from_canonical_u32(0x410b23ae), + BabyBear::from_canonical_u32(0x0e4da53d), + BabyBear::from_canonical_u32(0x42ac4c88), + BabyBear::from_canonical_u32(0x58fefacd), + BabyBear::from_canonical_u32(0x44eef020), + BabyBear::from_canonical_u32(0x59971e5b), + BabyBear::from_canonical_u32(0x07abb7fb), + BabyBear::from_canonical_u32(0x0b1dc3b9), + BabyBear::from_canonical_u32(0x48f6a651), + BabyBear::from_canonical_u32(0x3ca13acf), + BabyBear::from_canonical_u32(0x5a3f16a1), ], ]; pub static ref PART_RC_40_38: [BabyBear; 38] = [ - f(0x149c8770), - f(0x3f0f3def), - f(0x39dd69a7), - f(0x0a64912f), - f(0x2edb5627), - f(0x28e94ccc), - f(0x1354ce30), - f(0x498d56fb), - f(0x1fcc6319), - f(0x61083c5e), - f(0x01d92333), - f(0x042f8047), - f(0x169af0df), - f(0x151fdb30), - f(0x35455f11), - f(0x6be79519), - f(0x4002cc98), - f(0x2cd41aed), - f(0x29beacb7), - f(0x48e1f6f1), - f(0x1b25dc05), - f(0x145f27bc), - f(0x30ef81f2), - f(0x0fcbdb7c), - f(0x01fe6001), - f(0x4d63b479), - f(0x3bde3675), - f(0x6780bba5), - f(0x0e4b1d84), - f(0x2c0fc861), - f(0x17c04e4a), - f(0x4123526f), - f(0x0eb4ebd2), - f(0x3f9a03f7), - f(0x5a7b90aa), - f(0x52115888), - f(0x2c91859d), - f(0x0ad66832), + BabyBear::from_canonical_u32(0x149c8770), + BabyBear::from_canonical_u32(0x3f0f3def), + BabyBear::from_canonical_u32(0x39dd69a7), + BabyBear::from_canonical_u32(0x0a64912f), + BabyBear::from_canonical_u32(0x2edb5627), + BabyBear::from_canonical_u32(0x28e94ccc), + BabyBear::from_canonical_u32(0x1354ce30), + BabyBear::from_canonical_u32(0x498d56fb), + BabyBear::from_canonical_u32(0x1fcc6319), + BabyBear::from_canonical_u32(0x61083c5e), + BabyBear::from_canonical_u32(0x01d92333), + BabyBear::from_canonical_u32(0x042f8047), + BabyBear::from_canonical_u32(0x169af0df), + BabyBear::from_canonical_u32(0x151fdb30), + BabyBear::from_canonical_u32(0x35455f11), + BabyBear::from_canonical_u32(0x6be79519), + BabyBear::from_canonical_u32(0x4002cc98), + BabyBear::from_canonical_u32(0x2cd41aed), + BabyBear::from_canonical_u32(0x29beacb7), + BabyBear::from_canonical_u32(0x48e1f6f1), + BabyBear::from_canonical_u32(0x1b25dc05), + BabyBear::from_canonical_u32(0x145f27bc), + BabyBear::from_canonical_u32(0x30ef81f2), + BabyBear::from_canonical_u32(0x0fcbdb7c), + BabyBear::from_canonical_u32(0x01fe6001), + BabyBear::from_canonical_u32(0x4d63b479), + BabyBear::from_canonical_u32(0x3bde3675), + BabyBear::from_canonical_u32(0x6780bba5), + BabyBear::from_canonical_u32(0x0e4b1d84), + BabyBear::from_canonical_u32(0x2c0fc861), + BabyBear::from_canonical_u32(0x17c04e4a), + BabyBear::from_canonical_u32(0x4123526f), + BabyBear::from_canonical_u32(0x0eb4ebd2), + BabyBear::from_canonical_u32(0x3f9a03f7), + BabyBear::from_canonical_u32(0x5a7b90aa), + BabyBear::from_canonical_u32(0x52115888), + BabyBear::from_canonical_u32(0x2c91859d), + BabyBear::from_canonical_u32(0x0ad66832), ]; } diff --git a/src/poseidon/util.rs b/src/poseidon/util.rs index 14e19fcb..24534183 100644 --- a/src/poseidon/util.rs +++ b/src/poseidon/util.rs @@ -31,7 +31,7 @@ pub(crate) fn matmul_internal( ) { let sum: AF = state.iter().cloned().sum(); for (state, diag) in zip(state.iter_mut(), mat_internal_diag) { - *state *= diag + AF::neg_one(); + *state *= diag; *state += sum.clone(); } }