
Verify a Lamport one-time signature (native)
Source:R/crypto_pqc_extra.R
morie_crypto_lamport_verify.RdVerify a Lamport one-time signature (native)
Value
TRUE if every revealed secret hashes to the committed public value selected by the message digest bits.
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))
print(morie_crypto_lamport_verify(kp$pk, "tampered message", sig))
}
#> [1] TRUE
#> [1] FALSE