iota-crypto-demo

module
v0.0.0-...-d02f37a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0

README

Crypto demo

This repository contains Go example implementations related to several cryptographic constructs used in various DLTs.

Packages

It contains the following general packages:

  • slip10 implements the SLIP-10 private key derivation with full BIP-32 compatibility.
  • bip32path provides utilities for BIP-32 chains.
  • bip39 implements the BIP-39 specification and mnemonic word lists.
  • bech32 implements Bech32 addresses based on the format described in BIP-173.
  • ed25519 implements Ed25519 signatures with particular validation rules around edge cases as described in ZIP-215.
  • merkle implements a simple Merkle tree hash.

All these packages are tested against the full test vectors provided in the corresponding specifications.

Examples

  • bech32 encode and decode addresses using the bech32 address scheme.
    Run the example with go run examples/bech32/main.go and use -help to see the available commands.
  • kdf shows the private and public key derivation using SLIP-10 and BIP-39 mnemonics + passphrase.
    It performs the Ed25519 key derivation following SLIP-10.
    Run with go run examples/kdf/main.go and use -help to see the available command-line flags.
  • merkle prints the Merkle tree of several random transaction hashes on the console.
    Run with go run examples/merkle/main.go and use -help to see the available command-line flags.

Directories

Path Synopsis
examples
kdf
internal
hexutil
Package hexutil implements hexadecimal encoding.
Package hexutil implements hexadecimal encoding.
pkg
bech32
Package bech32 implements bech32 encoding and decoding.
Package bech32 implements bech32 encoding and decoding.
bech32/address
Package address provides utility functionality to encode and decode bech32 based addresses.
Package address provides utility functionality to encode and decode bech32 based addresses.
bech32/internal/base32
Package base32 implements the conversion for bytes (base256) to base32.
Package base32 implements the conversion for bytes (base256) to base32.
bip32path
Package bip32path provides utilities for BIP-0032 chains.
Package bip32path provides utilities for BIP-0032 chains.
bip39
Package bip39 implements the BIP-0039 specification of using a mnemonic sentence to encode/decode binary entropy and to derive a seed that can then be used to generate deterministic wallets.
Package bip39 implements the BIP-0039 specification of using a mnemonic sentence to encode/decode binary entropy and to derive a seed that can then be used to generate deterministic wallets.
bip39/wordlist
Package wordlist defines the requirements for a word list used for the bip39 package.
Package wordlist defines the requirements for a word list used for the bip39 package.
ed25519
Package ed25519 implements the Ed25519 signature algorithm.
Package ed25519 implements the Ed25519 signature algorithm.
merkle
Package merkle implements the Merkle tree hash computation.
Package merkle implements the Merkle tree hash computation.
slip10
Package slip10 implements the SLIP-0010 private key derivation.
Package slip10 implements the SLIP-0010 private key derivation.
slip10/btccurve
Package btccurve implements the secp256k1 curve used by Bitcoin.
Package btccurve implements the secp256k1 curve used by Bitcoin.
slip10/elliptic/internal/btccurve
Package btccurve implements the secp256k1 curve used by Bitcoin.
Package btccurve implements the secp256k1 curve used by Bitcoin.
vrf
Package vrf implements the ECVRF-EDWARDS25519-SHA512-TAI VRF according to draft-irtf-cfrg-vrf-15.
Package vrf implements the ECVRF-EDWARDS25519-SHA512-TAI VRF according to draft-irtf-cfrg-vrf-15.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL