func IsEnabledX2() bool
IsEnabledX2 returns true if the architecture supports a two-way SIMD implementation provided in this package.
func IsEnabledX4() bool
IsEnabledX4 returns true if the architecture supports a four-way SIMD implementation provided in this package.
StateX2 contains state for the two-way permutation including the two interleaved [25]uint64 buffers. Call Initialize() before use to initialize and get a pointer to the interleaved buffer.
type StateX2 struct {
// contains filtered or unexported fields
}
func (s *StateX2) Initialize(turbo bool) []uint64
Initialize the state and returns the buffer on which the two permutations will act: a uint64 slice of length 50. The first permutation will act on {a[0], a[2], ..., a[48]} and the second on {a[1], a[3], ..., a[49]}. If turbo is true, applies 12-round variant instead of the usual 24.
func (s *StateX2) Permute()
Permute performs the two parallel Keccak-f[1600]s interleaved on the slice returned from Initialize().
StateX4 contains state for the four-way permutation including the four interleaved [25]uint64 buffers. Call Initialize() before use to initialize and get a pointer to the interleaved buffer.
type StateX4 struct {
// contains filtered or unexported fields
}
func (s *StateX4) Initialize(turbo bool) []uint64
Initialize the state and returns the buffer on which the four permutations will act: a uint64 slice of length 100. The first permutation will act on {a[0], a[4], ..., a[96]}, the second on {a[1], a[5], ..., a[97]}, etc. If turbo is true, applies 12-round variant instead of the usual 24.
func (s *StateX4) Permute()
Permute performs the four parallel Keccak-f[1600]s interleaved on the slice returned from Initialize().