@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
Name | Type |
---|---|
bytes | Uint8Array |
Returns
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
Name | Type |
---|---|
privKey | PrivKey |
pubKey | PubKey |
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
Name | Type |
---|---|
bytes | string | Uint8Array |
Returns
Defined in
packages/core/dist/support/ed25519.d.ts:15
pointToBytes
▸ pointToBytes(point
): Uint8Array
Converts a point to bytes (compressed public key).
Parameters
Name | Type |
---|---|
point | Point |
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
Name | Type |
---|---|
msg | Uint8Array |
privKey | PrivKey | 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
Name | Type |
---|---|
sig | Uint8Array |
msg | Uint8Array |
pubKey | Uint8Array | PubKey | HDPubKey |
Returns
boolean
Defined in
packages/core/dist/support/ed25519.d.ts:27