Expand description

SLIP-0010 compatible Ed25519 cryptography that allows child key derivation. There are alternative Ed25519-based implementations in other projects that are incompatible with SLIP-0010, so make sure this is the right derivation method for your use-case.

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 it can be used in EcDSA, Cardano and of course, Mopheus/Prometheus/Mercury.

Implementation of Ed25519::ExtendedPrivateKey

Implementation of Ed25519::KeyId

Implementation of Ed25519::PrivateKey

Implementation of Ed25519::PublicKey

Implementation of Ed25519::Signature

Starting point for deriving all Morpheus related keys.

A Morpheus path describing a position of a node in the HD wallet without being bound to a given seed. Will be useful for hardware wallet integrations in the future.

Root node of a specific kind of DIDs. The kind is invisible outside the wallet.

The admin node for a Morpheus kind node will be used for self-encrypting administrative data on a storage for the collection of identifiers of that kind.

The operations on an identifier that require the private key to be available in memory.

The operations on an identifier that do not require the private key to be available in memory.

Representation of the root node of the Morpheus subtree in the HD wallet.

Configuration of Bip32 key derivation for Morpheus.

The admin node for the Morpheus root node will be used for self-encrypting administrative data on a storage for data not derived from the seed itself.

Enums

There can be several usages of DIDs differentiated inside the wallet invisible externally, e.g. on a blockchain. Each represents a separate subtree under the Morpheus root node of the HD wallet.

Constants

Size of the chain code in bytes

This constant is used for keyed hashing of public keys. This does not improve the security of the hash algorithm, but allows for domain separation if some use-case requires a different hash of the public key with the same algorithm.

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

Size of the signature is the version byte plus the actual Dalek Ed25519 signature size

The serialized byte representation for the current version of the signature algorithm (standard Ed25519 signature uses SHA256 internally and its output is only dependent on the private key and the message. It does not add an extra random keying that it could)

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

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”