finalize()
method is working; still bugs elsewhere
m128i
Original:
st->k = AND256(PERM32(k, SET32(3,7,2,6,1,5,0,4)), SET32(0,-1,0,-1,0,-1,0,-1));
Mine:
impl AdditionKey {
pub(super) unsafe fn from_key(secret_key: __m256i) -> Self {
// The addition key is the second half of the secret key; mask out the lower bits.
let upper_bits = _mm256_and_si256(secret_key, _mm256_set_epi32(-1, -1, -1, -1, 0, 0, 0, 0));
// Shuffle the 32-bit words so they can be read as 64-bit words:
// [k_3, k_2, k_1, k_0, 0, 0, 0, 0] -> [0, k_3, 0, k_2, 0, k_1, 0, k_0]
let k = _mm256_permutevar8x32_epi32(upper_bits, _mm256_set_epi32(3, 7, 2, 6, 1, 5, 0, 4));
AdditionKey(k)
}
}
update_padded
cargo audit
spotting yanked crates https://github.com/iqlusioninc/yubikey-piv.rs/commit/ed5134e9a26c5f6059d37858edcee9b61bc60f2f/checks?check_suite_id=419480114