package
1.3.4
Repository: https://github.com/getdatcrypto/nimbus.git
Documentation: pkg.go.dev

# Functions

CalculateLeaves calculates the number of leaves that would be pushed from data of size 'dataSize'.
GenerateKeyPair creates a public-secret keypair that can be used to sign and verify messages.
GenerateKeyPairDeterministic generates keys deterministically using the input entropy.
GenerateTwofishKey produces a key that can be used for encrypting and decrypting files.
HashAll takes a set of objects as input, encodes them all using the encoding package, and then hashes the result.
HashBytes takes a byte slice and returns the result.
HashObject takes an object as input, encodes it using the encoding package, and then hashes the result.
MerkleProof builds a Merkle proof that the data at segment 'proofIndex' is a part of the Merkle root formed by 'b'.
MerkleRoot returns the Merkle root of the input data.
NewCachedTree returns a CachedMerkleTree, which can be used for getting Merkle roots and proofs from data that has cached subroots.
NewHash returns a blake2b 256bit hasher.
NewTree returns a MerkleTree, which can be used for getting Merkle roots and Merkle proofs on data.
ReadSignedObject reads a length-prefixed object prefixed by its signature, and verifies the signature.
SecureWipe destroys the data contained within a byte slice.
SignHash signs a message using a secret key.
VerifyHash uses a public key and input data to verify a signature.
VerifySegment will verify that a segment, given the proof, is a part of a Merkle root.
WriteSignedObject writes a length-prefixed object prefixed by its signature.

# Constants

EntropySize defines the amount of entropy necessary to do secure cryptographic operations, in bytes.
HashSize is the length of a Hash in bytes.
PublicKeySize defines the size of public keys in bytes.
SecretKeySize defines the size of secret keys in bytes.
SegmentSize is the chunk size that is used when taking the Merkle root of a file.
SignatureSize defines the size of signatures in bytes.
TwofishOverhead is the number of bytes added by EncryptBytes.

# Variables

ErrHashWrongLen is the error when encoded value has the wrong length to be a hash.
ErrInsufficientLen is an error when supplied ciphertext is not long enough to contain a nonce.
ErrInvalidSignature is returned if a signature is provided that does not match the data and public key.

# Structs

CachedMerkleTree wraps merkletree.CachedTree, changing some of the function definitions to assume sia-specific constants and return sia-specific types.
MerkleTree wraps merkletree.Tree, changing some of the function definitions to assume sia-specific constants and return sia-specific types.

# Type aliases

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
No description provided by the author
No description provided by the author