Crypto
Types
Link copied to clipboard
Specify how private keys are tweaked when creating Schnorr signatures
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun decodeSignatureLax(input: ByteArrayInput): Pair<ByteArray, ByteArray>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun recoverPublicKey(sig: ByteVector64, message: ByteArray): Pair<PublicKey, PublicKey>
Content copied to clipboard
Recover public keys from a signature and the message that was signed. This method will return 2 public keys, and the signature can be verified with both, but only one of them matches that private key that was used to generate the signature.
fun recoverPublicKey( sig: ByteVector64, message: ByteArray, recid: Int): PublicKey
Content copied to clipboard
Recover public keys from a signature, the message that was signed, and the recovery id (i.e. the sign of the recovered public key)
Link copied to clipboard
Link copied to clipboard
Sign data with a private key, using RCF6979 deterministic signatures
Link copied to clipboard
fun signSchnorr( data: ByteVector32, privateKey: PrivateKey, schnorrTweak: Crypto.SchnorrTweak, auxrand32: ByteVector32? = null): ByteVector64
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun verifySignature( data: ByteArray, signature: ByteVector64, publicKey: PublicKey): Boolean
Content copied to clipboard
Link copied to clipboard
fun verifySignatureSchnorr( data: ByteVector32, signature: ByteVector, publicKey: XonlyPublicKey): Boolean
Content copied to clipboard