Documentation ¶
Overview ¶
Package jh implements JH-256 algorithm.
Index ¶
- Constants
- func L(m0, m1, m2, m3, m4, m5, m6, m7 *uint64)
- func New() hash.Hash
- func SS(m0, m1, m2, m3, m4, m5, m6, m7 *uint64, cc0, cc1 uint64)
- func SWAP1(x *uint64)
- func SWAP16(x *uint64)
- func SWAP2(x *uint64)
- func SWAP32(x *uint64)
- func SWAP4(x *uint64)
- func SWAP8(x *uint64)
- func Sum(data []byte) (sum [Size]byte)
Constants ¶
View Source
const BlockSize = 64
The blocksize of jh in bytes.
View Source
const Size = 32
The size of an jh checksum in bytes.
Variables ¶
This section is empty.
Functions ¶
func SS ¶
Two Sboxes are computed in parallel, each Sbox implements S0 and S1, selected by a constant bit
The reason to compute two Sboxes in parallel is to try to fully utilize the parallel processing power
func SWAP16 ¶
func SWAP16(x *uint64)
swapping bits 32i||32i+1||......||32i+15 with bits 32i+16||32i+17||......||32i+31 of 64-bit x
func SWAP32 ¶
func SWAP32(x *uint64)
swapping bits 64i||64i+1||......||64i+31 with bits 64i+32||64i+33||......||64i+63 of 64-bit x
func SWAP4 ¶
func SWAP4(x *uint64)
swapping bits 8i||8i+1||8i+2||8i+3 with bits 8i+4||8i+5||8i+6||8i+7 of 64-bit x
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.