jh

package
v1.0.2010 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package jh implements JH-256 algorithm.

Index

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 L

func L(m0, m1, m2, m3, m4, m5, m6, m7 *uint64)

The MDS transform

func New

func New() hash.Hash

func SS

func SS(m0, m1, m2, m3, m4, m5, m6, m7 *uint64, cc0, cc1 uint64)

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 SWAP1

func SWAP1(x *uint64)

swapping bit 2i with bit 2i+1 of 64-bit x

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 SWAP2

func SWAP2(x *uint64)

swapping bits 4i||4i+1 with bits 4i+2||4i+3 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

func SWAP8

func SWAP8(x *uint64)

swapping bits 16i||16i+1||......||16i+7 with bits 16i+8||16i+9||......||16i+15 of 64-bit x

func Sum

func Sum(data []byte) (sum [Size]byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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