package
0.0.0-20250119000602-809120120630
Repository: https://github.com/n42blockchain/n42.git
Documentation: pkg.go.dev

# Packages

Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xb.
Package bls implements a go-wrapper around a library implementing the the BLS12-381 curve and signature scheme.
nolint:gofmt.
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
No description provided by the author
Package csidh implements commutative supersingular isogeny-based Diffie-Hellman key exchange algorithm (CSIDH) resulting from the group action.
dilithium implements the CRYSTALS-Dilithium signature schemes as submitted to round3 of the NIST PQC competition and described in https://pq-crystals.org/dilithium/data/dilithium-specification-round3-20210208.pdf Each of the eight different modes of Dilithium is implemented by a subpackage.
No description provided by the author
Package keccakf1600 provides a two and four-way Keccak-f[1600] permutation in parallel.
Package kem provides a unified interface for KEM schemes.
No description provided by the author
Package pke provides a variety of public key encryption mechanisms.
Package rand defines methods of obtaining random number generators.
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.

# Functions

CreateAddress creates an ethereum address given the bytes and the nonce DESCRIBED: docs/programmers_guide/guide.md#address---identifier-of-an-account.
CreateAddress2 creates an ethereum address given the address bytes, initial contract code hash and a salt.
FromECDSA exports a private key into a binary dump.
No description provided by the author
GenerateKey generates a new private key.
HashData hashes the provided data using the KeccakState and returns a 32 byte hash.
HexToECDSA parses a secp256k1 private key.
Keccak256 calculates and returns the Keccak256 hash of the input data.
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
Keccak512 calculates and returns the Keccak512 hash of the input data.
LoadECDSA loads a secp256k1 private key from the given file.
MarshalPubkey converts a public key into a 64 bytes "uncompressed" format.
MarshalPubkeyStd converts a public key into the standard "uncompressed" format.
NewKeccakState creates a new KeccakState.
DESCRIBED: docs/programmers_guide/guide.md#address---identifier-of-an-account.
SaveECDSA saves a secp256k1 private key to the given file with restrictive permissions.
ToECDSA creates a private key with the given D value.
ToECDSAUnsafe blindly converts a binary blob to a private key.
UnmarshalPubkey converts bytes to a secp256k1 public key.
UnmarshalPubkeyStd parses a public key from the given bytes in the standard "uncompressed" format.
ValidateSignatureValues verifies whether the signature values are valid with the given chain rules.

# Constants

DigestLength sets the signature digest exact length.
RecoveryIDOffset points to the byte offset within the signature that contains the recovery id.
64 bytes ECDSA signature + 1 byte recovery id.

# Variables

No description provided by the author

# Interfaces

KeccakState wraps sha3.state.