package secp256k1-internal
Module External.SignSource
Signature
buffer signature is the underlying buffer of signature. DO NOT MODIFY.
64 bytes
65 bytes
32 bytes
Input/Output
read_recoverable_exn ctx buf reads a recoverable signature in buf if everything goes well or return an error otherwise.
read_recoverable_exn ctx buf reads a recoverable signature in buf.
to_bytes ?der ctx signature writes the serialization of signature in a freshly allocated Bigstring.t, which is then returned.
Sign
normalize ctx sig is the normalized lower-S form of Some normalized_sig if sig was not already in this form, or None otherwise.
Creation
val sign_recoverable :
Context.t ->
sk:Key.secret Key.t ->
Bigstring.t ->
(recoverable t, string) resultDirect write
val write_sign :
Context.t ->
Bigstring.t ->
sk:Key.secret Key.t ->
msg:Bigstring.t ->
(int, string) resultwrite_sign ctx buf ~sk ~msg writes signs msg with sk and writes the signature to buf at ?pos. It returns the number of bytes written (64) on success, or ar error message otherwise.
val write_sign_exn :
Context.t ->
Bigstring.t ->
sk:Key.secret Key.t ->
msg:Bigstring.t ->
intwrite_sign_exn ctx buf ~sk ~msg writes signs msg with sk and writes the signature to buf at ?pos. It returns the number of bytes written (64).
val write_sign_recoverable :
Context.t ->
sk:Key.secret Key.t ->
msg:Bigstring.t ->
Bigstring.t ->
(int, string) resultval write_sign_recoverable_exn :
Context.t ->
sk:Key.secret Key.t ->
msg:Bigstring.t ->
Bigstring.t ->
intVerification
val verify :
Context.t ->
pk:Key.public Key.t ->
msg:Bigstring.t ->
signature:_ t ->
(bool, string) resultRecovery
val recover :
Context.t ->
signature:recoverable t ->
Bigstring.t ->
(Key.public Key.t, string) result