# Packages
Package ciph manages encryption ciphers and encrypting blobs of data.
Package nonce provides a simple interface for generating standard AES encryption nonces that give strong cryptographic entropy to message encryption, as well as 8 byte (64 bit) random private identifiers for references between types.
Package sha256 provides a simple interface for single and double SHA256 hashes, used with secp256k1 signatures, message digest checksums, cloaked public key "addresses" and so on.
# Functions
No description provided by the author
ComputeSharedSecret computes an Elliptic Curve Diffie-Hellman shared secret that can be decrypted by the holder of the private key matching the public key provided, and the public key is provided as part of the message.
DerivePub generates a public key from the prv.Pub.
Gen3Nonces generates 3 Initialization Vectors.
GenCiphers generates a set of 3 Ciphers using Privs and Pubs.
Generate2Keys generates two Keys.
GenerateKeys generates one set of Keys.
GeneratePrvKey generates a secp256k1 private key.
GenerateTestKeyPair generates a key pair.
GenerateTestKeyPairs generates two public/private key pairs.
GenNonces generates an arbitrary number of Initialization Vector bytes.
GenPingNonces generates 6 Initialization Vector bytes.
GetCipherSet generates a set of Privs and Pubs.
GetCloak returns a value which a receiver with the private key can identify the association of a message with the peer in order to retrieve the private key to generate the message cipher.
GetTwoPrvKeys is a helper for tests to generate two new private keys.
MakeKeys uses a private key to generate a Keys.
Match uses the cached public key and the provided blinding factor to match the source public key so the packet address field is only recognisable to the intended recipient.
NewSigner creates a new KeySet which enables (relatively) fast generation of new private keys for use with ECDH encryption by using scalar addition.
PrvFromBased32 decodes a Based32 encoded private key.
PrvKeyFromBytes converts a byte slice into a private key.
PubFromBased32 decodes a Based32 encoded form of the Pub.
PubFromBytes converts a byte slice into a public key, if it is valid and on the secp256k1 elliptic curve.
SigFromBased32 decodes a SigBytes encoded in Based32.
Sign produces an ECDSA BIP62 compact signature.
# Constants
BlindLen is the length of the blinding factor in bytes for a Cloak.
CloakLen is the sum of the Blinder truncated hash from blinder and public key.
HashLen is the length from the hash of the key with the Blinder appended to the Cloak.
PrvKeyLen is the length of a private key, inherited from secp256k1.
PubKeyLen is the length of the serialized key.
SigLen is the length of a standard secp256k1 schnorr signature.
# Type aliases
Blinder is the bytes concatenated after a key to generate the Cloak hash.
No description provided by the author
CloakedPubKey is the blinded hash of a public key used to conceal a message public key from attackers.
Hash is the truncated SHA256 hash of the Blinder with a PubBytes.
No description provided by the author
No description provided by the author
Prv is a secp256k1 private key.
PrvBytes is the binary encoded form of a secp256k1 private key.
Pub is a public key.
PubBytes is the serialised form of a secp256k1 public key.
No description provided by the author
SigBytes is an ECDSA BIP62 formatted compact signature which allows the recovery of the public key from the signature.