Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ed25519/ed25519"

Index

Variables

Const PUBLIC_KEY_LENGTH

PUBLIC_KEY_LENGTH: 32 = 32

Const SECRET_KEY_LENGTH

SECRET_KEY_LENGTH: 64 = 64

Const SEED_LENGTH

SEED_LENGTH: 32 = 32

Const SIGNATURE_LENGTH

SIGNATURE_LENGTH: 64 = 64

Functions

convertPublicKeyToX25519

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

    Throws if given an invalid public key.

    Parameters

    • publicKey: Uint8Array

    Returns Uint8Array

convertSecretKeyToX25519

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

    Parameters

    • secretKey: Uint8Array

    Returns Uint8Array

extractPublicKeyFromSecretKey

  • extractPublicKeyFromSecretKey(secretKey: Uint8Array): Uint8Array

generateKeyPair

  • generateKeyPair(prng?: RandomSource): KeyPair

generateKeyPairFromSeed

  • generateKeyPairFromSeed(seed: Uint8Array): KeyPair

sign

  • sign(secretKey: Uint8Array, message: Uint8Array): Uint8Array

verify

  • verify(publicKey: Uint8Array, message: Uint8Array, signature: Uint8Array): boolean
  • Parameters

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

    Returns boolean

Generated using TypeDoc