You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This also adds a note about the potential limitation of the signature
formats, depending on the tailoring.
Signed-off-by: Steffen Jaeckel <[email protected]>
This function will recover (a) public key from the ECDSA signature in the array pointed to by \textit{sig} of length \textit{siglen} octets, the message digest
5957
-
pointed to by the array \textit{hash} of length \textit{hashlen}, and the recovery id \textit{recid}. It will store the recovered
5958
-
key into \textit{key} and return CRYPT\_OK if recovery succeeds, or an error if recovery fails.
5956
+
This function will recover (a) public key from the \textit{ECDSA} signature in the array pointed to by \code{sig} of length \code{siglen} octets, the message digest
5957
+
pointed to by the array \code{hash} of length \code{hashlen}, and the recovery id \code{recid}. It will store the recovered
5958
+
key into \code{key} and return \code{CRYPT\_OK} if recovery succeeds, or an error if recovery fails.
5959
5959
This is for compatibility with the (v,r,s) signatures used in Ethereum, where public keys are not explicitly shared,
5960
-
only the parity of the public key. For curves like secp256k1, recid will take values of 0 or 1, corresponding to the
5961
-
parity of the public key's y coordinate. For curves like secp112r2, with a cofactor of 4, values 0..7 are possible,
5960
+
only the parity of the public key. For curves like \textit{secp256k1}, \code{recid} will take values of 0 or 1, corresponding to the
5961
+
parity of the public key's y coordinate. For curves like \textit{secp112r2}, with a cofactor of 4, values 0..7 are possible,
5962
5962
with the low bit corresponding to the parity and the higher bits specifying the public key's x coordinate's multiple
5963
5963
of the curve's order.
5964
-
If the signature format contains the recovery id (currently only \textit{LTC\_ECCSIG\_ETH27}), \textit{recid} can be -1
5964
+
If the signature format contains the recovery id (currently only \code{LTC\_ECCSIG\_ETH27}), \code{recid} can be -1
5965
5965
which signals that the recovery id from the signature blob should be used. This means an application does not need to
5966
5966
extract the recovery id from such a signature in order to use this function.
5967
-
The function \textit{ecc\_recover\_key} implements multiple signature formats, and the output is compliant for GF(p) curves.
5967
+
The function \code{ecc\_recover\_key()} implements multiple signature formats, and the output is compliant for GF(p) curves.
0 commit comments