beetlebug▾
/

ztcl::crypto pubkey

Gives the public key of an Ed25519 seed.

ztcl::crypto pubkey ed25519 SEED

Description

Gives the 32-byte Ed25519 public key of the 32-byte SEED.

Arguments

ArgumentTypeDefaultDescription
SEEDbytesrequiredThe secret seed, 32 bytes.

Returns

32 bytes.

Examples

Each example of this page runs after package require ztcl::crypto.

% set seed [binary decode hex 9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60]
> binary encode hex [ztcl::crypto pubkey ed25519 $seed]
d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a

Errors

% ztcl::crypto pubkey ed25519 abc
an Ed25519 seed is 32 bytes
-errorcode ZTCL CRYPTO KEY

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.10
Compute cost
One compute unit for each 4,096 bytes of the message, the data, and the key, and 64 more units for a signature command.

See also