Documentation ¶
Index ¶
- func Clone(b []byte) []byte
- func FromString(str string) []byte
- func GfnDouble(input []byte) []byte
- func RightXOR(X, Y []byte) []byte
- func ShiftLeft(x []byte) []byte
- func ShiftLeftN(dst, x []byte, n int)
- func SplitSize(buf []byte, size int) [][]byte
- func ToString(buf []byte) string
- func XORBytes(Z, X, Y []byte)
- func XORBytesMut(X, Y []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶ added in v1.0.5003
Clone returns a copy of b[:len(b)]. The result may have additional unused capacity.
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 ¶ added in v1.0.5003
RightXOR XORs smaller input (assumed Y) at the right of the larger input (assumed X)
func ShiftLeft ¶ added in v1.0.5003
ShiftLeft outputs the byte array corresponding to x << 1 in binary.
func ShiftLeftN ¶ added in v1.0.5003
ShiftLeftN puts in dst the byte array corresponding to x << n in binary.
func XORBytes ¶ added in v1.0.5003
func XORBytes(Z, X, Y []byte)
XORBytes assumes equal input length, puts X XOR Y into Z
func XORBytesMut ¶ added in v1.0.5003
func XORBytesMut(X, Y []byte)
XORBytesMut assumes equal input length, replaces X with X XOR Y
Types ¶
This section is empty.