Comments
This commit is contained in:
parent
3c80efbeee
commit
37ec59be9e
|
@ -529,7 +529,7 @@ template signSchnorrFoolproofRngImpl(makeKeypair: varargs[untyped]): untyped {.d
|
|||
|
||||
result = SkSchnorrSignature(data: default(array[64, byte])) # Silence compiler
|
||||
# All-zeroes all the time for example will break this function
|
||||
raiseAssert "RNG not giving random enough bytes, can't create valid key"
|
||||
raiseAssert "RNG not giving random enough bytes, can't create valid sig"
|
||||
|
||||
proc signSchnorr*(key: SkSecretKey, msg: SkMessage, rng: FoolproofRng): SkSchnorrSignature =
|
||||
## Sign message `msg` using private key `key` with the Schnorr signature algorithm and return signature object.
|
||||
|
|
|
@ -437,6 +437,19 @@ const
|
|||
|
||||
type
|
||||
secp256k1_schnorrsig_extraparams* = object
|
||||
## Data structure that contains additional arguments for schnorrsig_sign_custom.
|
||||
##
|
||||
## Members:
|
||||
## magic: set to SECP256K1_SCHNORRSIG_EXTRAPARAMS_MAGIC at initialization
|
||||
## and has no other function than making sure the object is
|
||||
## initialized.
|
||||
## noncefp: pointer to a nonce generation function. If NULL,
|
||||
## secp256k1_nonce_function_bip340 is used
|
||||
## ndata: pointer to arbitrary data used by the nonce generation function
|
||||
## (can be NULL). If it is non-NULL and
|
||||
## secp256k1_nonce_function_bip340 is used, then ndata must be a
|
||||
## pointer to 32-byte auxiliary randomness as per BIP-340.
|
||||
##
|
||||
magic*: array[4, uint8]
|
||||
noncefp*: secp256k1_nonce_function_hardened
|
||||
ndata*: pointer
|
||||
|
|
Loading…
Reference in New Issue