Documentation ¶
Index ¶
- func BytesSplit(buf []byte, size int) [][]byte
- func BytesToString(buf []byte) string
- func GfnDouble(input []byte) []byte
- func RightXor(X, Y []byte) []byte
- func ShiftBytesLeft(x []byte) []byte
- func ShiftBytesLeftN(dst, x []byte, n int)
- func StringToBytes(str string) []byte
- func XorBytes(Z, X, Y []byte)
- func XorBytesMut(X, Y []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GfnDouble ¶
GfnDouble computes 2 * input in the field of 2^n elements. The irreducible polynomial in the finite field for n=128 is x^128 + x^7 + x^2 + x + 1 (equals 0x87) Constant-time execution in order to avoid side-channel attacks
func RightXor ¶
RightXor XORs smaller input (assumed Y) at the right of the larger input (assumed X)
func ShiftBytesLeft ¶
ShiftBytesLeft outputs the byte array corresponding to x << 1 in binary.
func ShiftBytesLeftN ¶
ShiftBytesLeftN puts in dst the byte array corresponding to x << n in binary.
func XorBytes ¶
func XorBytes(Z, X, Y []byte)
XorBytes assumes equal input length, puts X XOR Y into Z
func XorBytesMut ¶
func XorBytesMut(X, Y []byte)
XorBytesMut assumes equal input length, replaces X with X XOR Y
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.