Moves to non-deterministic signatures

This commit is contained in:
Vitor Pamplona
2024-06-27 15:28:09 -04:00
parent 39c9b4d50f
commit a89440cba2
2 changed files with 99 additions and 1 deletions
@@ -38,9 +38,14 @@ class Nip01(
fun sign(
data: ByteArray,
privKey: ByteArray,
auxrand32: ByteArray? = null,
auxrand32: ByteArray? = random(32),
): ByteArray = secp256k1.signSchnorr(data, privKey, auxrand32)
fun signDeterministic(
data: ByteArray,
privKey: ByteArray,
): ByteArray = secp256k1.signSchnorr(data, privKey, null)
fun verify(
signature: ByteArray,
hash: ByteArray,