Skip to contents

Sign one message with a Lamport keypair (native)

Usage

morie_crypto_lamport_sign(keypair, message)

Arguments

keypair

From morie_crypto_lamport_keygen.

message

Raw vector or single string.

Value

An object of class morie_lamport_signature: the 256 revealed 32-byte secrets (list) plus the message digest.

Examples

if (morie_crypto_sodium_available()) {
  kp <- morie_crypto_lamport_keygen()
  sig <- morie_crypto_lamport_sign(kp, "the die is cast")
  print(morie_crypto_lamport_verify(kp$pk, "the die is cast", sig))
}
#> [1] TRUE