private static void BytesToBlock128(byte[] key, out DWords128 kb128) { fixed(byte *k = key) { kb128 = *((DWords128 *)k); } }
public static uint32[] getKeySchedules_64_128(DWords128 key) { var keys = new uint32[ROUNDS64128]; keys[0] = key.v0; var a = stackalloc uint32[3]; a[0] = key.v1; a[1] = key.v2; a[2] = key.v3; for (uint32 i = 0; i < ROUNDS64128 - 1; i++) { speck_round_32(ref a[i % 3], ref key.v0, i); keys[1 + i] = key.v0; } return(keys); }