core/crypto/ed25519

ed25519

Types

2

Private_Key

Private_Key :: struct { // WARNING: All of the members are to be treated as internal (ie: // the Private_Key structure is intended to be opaque). There are // subtle vulnerabilities that can be introduced if the internal // values are allowed to be altered. // // See: https://github.com/MystenLabs/ed25519-unsafe-libs _b: [32]u8, _s: grp.Scalar, _hdigest2: [HDIGEST2_SIZE]u8, _pub_key: Public_Key, _is_initialized: bool, }Source

Private_Key is an Ed25519 private key.

Public_Key

Public_Key :: struct { // WARNING: All of the members are to be treated as internal (ie: // the Public_Key structure is intended to be opaque). _b: [32]u8, _neg_A: grp.Group_Element, _is_valid: bool, _is_initialized: bool, }Source

Public_Key is an Ed25519 public key.

Constants

3

Procedures

14

verify

verify :: proc(pub_key: ^Public_Key, msg: []u8, sig: []u8, allow_small_order_A: untyped boolean = false) -> (bool)Source

verify returns true if and only if (⟺) sig is a valid signature by pub_key over msg.

The optional allow_small_order_A parameter will make this implementation strictly compatible with FIPS 186-5, at the expense of SBS-security. Doing so is NOT recommended, and the disallowed public keys all have a known discrete-log.

Reference search

Find anything

Documentation preferences

Settings

System theme variants

Used only while Theme is set to System.