package
0.14.1
Repository: https://github.com/autonity/autonity.git
Documentation: pkg.go.dev

# Packages

Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xb.
No description provided by the author
No description provided by the author
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
BLSPOPProof generate POP of BLS private key of Autonity protocol, the hash input start with a prefix of treasury address and ended with the public key of the secrete key, since we don't want the POP being cloned during the propagation of the on-boarding TX.
BLSPOPVerify verifies the POP provided by an on-boarding validator, it assumes the public key and signature was checked with infinite and group.
CompressPubkey encodes a public key to the 33-byte compressed format.
CreateAddress creates an ethereum address given the bytes and the nonce.
CreateAddress2 creates an ethereum address given the address bytes, initial contract code hash and a salt.
DecompressPubkey parses a public key in the 33-byte compressed format.
Ecrecover returns the uncompressed public key that created the given signature.
FromECDSA exports a private key into a binary dump.
No description provided by the author
No description provided by the author
GenerateKey generates a new private key.
Note!: All the functions use by AutonityPOPProof and AutonityPOPVerify should be deterministic, and should be backward compatible since it is used by precompiled contract for on-boarding validators of the whole lifecycle of a blockchain.
HashData hashes the provided data using the KeccakState and returns a 32 byte hash.
No description provided by the author
HexToAutonityKeys parse the hex string into a secp256k1 private key and a BLS private key.
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.
LoadAutonityKeys loads a secp256k1 private key and a consensus private key from the given file.
LoadECDSA loads a secp256k1 private key from the given file.
NewKeccakState creates a new KeccakState.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
S256 returns an instance of the secp256k1 curve.
SaveAutonityKeys saves a secp256k1 private key and the consensus key to the given file with restrictive permissions.
SaveECDSA saves a secp256k1 private key to the given file with restrictive permissions.
Sign calculates an ECDSA signature.
SigToPub returns the public key that created the given signature.
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.
ValidateSignatureValues verifies whether the signature values are valid with the given chain rules.
VerifySignature checks that the given public key created signature over hash.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
DigestLength sets the signature digest exact length.
No description provided by the author
No description provided by the author
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
No description provided by the author

# Interfaces

KeccakState wraps sha3.state.