f1600x4

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2022 License: MIT, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

f1600x4 implements a fast fourway KeccaK-f[1600] permutation on platforms that support it. KeccaK-f[1600] is the permutation underlying KeccaK, SHA3 and SHAKE.

Copied by bas@westerbaam.name from the internal package of https://github.com/cloudflare/circl written by bas@cloudflare.com.

TODO Use the upstream version.

Index

Constants

This section is empty.

Variables

View Source
var Available = cpu.X86.HasAVX2

Available is true when this system supports a fast fourway KeccaK-f[1600].

Functions

This section is empty.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

Contains state for the fourway permutation including the four interleaved [25]uint64 buffers. Call Initialize() before use to initialize and get a pointer to the interleaved buffer.

func (*State) Initialize

func (s *State) Initialize() []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.

func (*State) Permute

func (s *State) Permute()

Perform the four parallel KeccaK-f[1600]s interleaved on the slice returned from Initialize().

func (*State) Zero

func (s *State) Zero()

Zeroes internal buffer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL