class

NaCl::Signatures::Ed25519::SigningKey

Inherits NaCl::Serializable / NaCl::KeyComparator / Comparable / Reference / Object

Private key for producing digital signatures using the Ed25519 algorithm. Ed25519 provides a 128-bit security level, that is to say, all known attacks take at least 2^128 operations, providing the same security level as AES-128, NIST P-256, and RSA-3072.

Signing keys are produced from a 32-byte (256-bit) random seed value. This value can be passed into the SigningKey constructor as a String whose bytesize is 32.

The public VerifyKey can be computed from the private 32-byte seed value as well, eliminating the need to store a "keypair".

SigningKey produces 64-byte (512-bit) signatures. The signatures are deterministic: signing the same message will always produce the same signature. This prevents "entropy failure" seen in other signature algorithms like DSA and ECDSA, where poor random number generators can leak enough information to recover the private key.

Constructors

new(seed : Slice(UInt8))

Create a SigningKey from a seed value

Source

Class methods

generate

Generate a random SigningKey

Source
signature_bytes

The size of signatures generated by the SigningKey class

Source

Instance methods

bytes

Return the raw seed value of this key

Source
keypair_bytes

Return the raw 64 byte value of this key

Source
sign(message)

Sign a message using this key

Source
signature_bytes

The size of signatures generated by the SigningKey instance

Source
verify_key
Source