Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @stablelib/ed25519

Index

Variables

PUBLIC_KEY_LENGTH: 32 = 32
SECRET_KEY_LENGTH: 64 = 64
SEED_LENGTH: 32 = 32
SIGNATURE_LENGTH: 64 = 64

Functions

  • convertPublicKeyToX25519(publicKey: Uint8Array): Uint8Array
  • Convert Ed25519 public key to X25519 public key.

    Throws if given an invalid public key.

    Parameters

    • publicKey: Uint8Array

    Returns Uint8Array

  • convertSecretKeyToX25519(secretKey: Uint8Array): Uint8Array
  • Convert Ed25519 secret (private) key to X25519 secret key.

    Parameters

    • secretKey: Uint8Array

    Returns Uint8Array

  • extractPublicKeyFromSecretKey(secretKey: Uint8Array): Uint8Array
  • generateKeyPair(prng?: RandomSource): KeyPair
  • generateKeyPairFromSeed(seed: Uint8Array): KeyPair
  • sign(secretKey: Uint8Array, message: Uint8Array): Uint8Array
  • verify(publicKey: Uint8Array, message: Uint8Array, signature: Uint8Array): boolean
  • Parameters

    • publicKey: Uint8Array
    • message: Uint8Array
    • signature: Uint8Array

    Returns boolean

Generated using TypeDoc