Skip to content

@aldea/sdk / Exports / ed25519

Namespace: ed25519

Table of contents

Classes

Functions

Functions

calcPoint

calcPoint(bytes): Point

Calculates the EdDSA Point (public key) from the given bytes (private key).

Parameters

NameType
bytesUint8Array

Returns

Point

Defined in

packages/core/dist/support/ed25519.d.ts:6


getSharedSecret

getSharedSecret(privKey, pubKey): Uint8Array

Calculates a shared secret between an Ed25519 privkey and pubkey. It first converts the keys to the Montgomery X25519 curve.

Parameters

NameType
privKeyPrivKey
pubKeyPubKey

Returns

Uint8Array

Defined in

packages/core/dist/support/ed25519.d.ts:11


pointFromBytes

pointFromBytes(bytes): Point

Returns a point from the given bytes (compressed public key).

Parameters

NameType
bytesstring | Uint8Array

Returns

Point

Defined in

packages/core/dist/support/ed25519.d.ts:15


pointToBytes

pointToBytes(point): Uint8Array

Converts a point to bytes (compressed public key).

Parameters

NameType
pointPoint

Returns

Uint8Array

Defined in

packages/core/dist/support/ed25519.d.ts:19


sign

sign(msg, privKey): Uint8Array

Signs the given message with the PrivKey and returns a 64 byte signature.

Parameters

NameType
msgUint8Array
privKeyPrivKey | HDPrivKey | Uint8Array

Returns

Uint8Array

Defined in

packages/core/dist/support/ed25519.d.ts:23


verify

verify(sig, msg, pubKey): boolean

Verifies the given signature using the specified message and Public Key.

Parameters

NameType
sigUint8Array
msgUint8Array
pubKeyUint8Array | PubKey | HDPubKey

Returns

boolean

Defined in

packages/core/dist/support/ed25519.d.ts:27