[][src]Crate sr25519

Python bindings for the schnorrkel library.

py-sr25519-bindings provides bindings to the Rust create schnorrkel, allowing for some limited use and management of sr25519 elliptic keys.

Structs

ExtendedKeypair
ExtendedPubKey
Keypair
Message
PrivKey
PubKey
Seed
Sig

Constants

CHAIN_CODE_LENGTH

Length in bytes of our chain codes.

MINI_SECRET_KEY_LENGTH

The length of a Ristretto Schnorr MiniSecretKey, in bytes.

PUBLIC_KEY_LENGTH

The length of a Ristretto Schnorr PublicKey, in bytes.

SECRET_KEY_LENGTH

The length of a Ristretto Schnorr key, SecretKey, in bytes.

SIGNATURE_LENGTH

The length of a curve25519 EdDSA Signature, in bytes.

Functions

PyInit_sr25519

This autogenerated function is called by the python interpreter when importing the module.

derive_keypair

Returns the soft deriviation of the private and public key of the specified child.

derive_pubkey

Returns the soft derivation of the public key of the specified child.

hard_derive_keypair

Returns the hard derivation of the private and public key of the specified child.

pair_from_seed

Returns a public and private key pair from the given 32-byte seed.

public_from_secret_key

Returns the corresponding public key for the given secret key.

sign

Signs a message with the given keypair, returning the resulting signature.

verify

Verifies that a signature on a given message was generated by private key corresponding to the specified public key.