Expand description

SLIP-0010 and BIP-0032 compatible Secp256k1 cryptography that allows child key derivation.

Modules

ARK.io related Network implementations

Bitcoin related Network implementations

Hydra coin related Network implementations

Internet of People related Network implementations

Structs

Chain code for key derivation in extended private and public keys. This is a 256-bit secret key that is completely independent of the private key and is used as an extension to the cryptographic domain, basically an extra state during iteration.

This elliptic curve cryptography implements both the AsymmetricCrypto and KeyDerivationCrypto traits so for BTC, ETH and IOP as examples.

Implementation of Secp256k1::ExtendedPrivateKey

Implementation of Secp256k1::ExtendedPublicKey

Implementation of Secp256k1::KeyId

Implementation of Secp256k1::PrivateKey

Implementation of Secp256k1::PublicKey

Implementation of Secp256k1::Signature

Enums

BIP-0178 is an extension to the de-facto WIF to encode how the private key was used to generate receiving addresses. If in doubt, just use Compressed, which is compatible with most wallets.

Constants

Size of the chain code in bytes

The size of the key identifier in bytes. Since a version byte is prepended to the hash result, it is not a standard size.

The serialized byte representation for the current version of the hash algorithm applied on the public key to obtain the key identifier

The size of the private key in the format used by to_bytes

The size of the public key in the compressed format used by to_bytes

The size of the public key in the uncompressed format used by uncompressed

Size of the signature is the version byte plus the actual libsecp256k1 signature size

The serialized byte representation for the current version of the signature algorithm

SLIP-0010 defines keyed hashing for master key derivation. This does domain separation for different cryptographic algorithms. This is the standard key for BIP-0032

Since Wigy could not find any constant expression for the length of u8 in bytes (std::u8::LEN could be a good place), this is some manual trickery to define our “standard version byte length in bytes”

Functions

Decoding string with BASE58 into binary data and verify if the 4-byte checksum at the end matches the rest of the data. Only the decoded data without checksum will be returned.

Encoding binary data with BASE58 after adding a 4-byte checksum pops up in the Bitcoin ecosystem on several places. Addresses, wallet-import-format, extended public and private key serialization formats. So this transformation is pulled up here as a free function.