Bitcoin ABC 0.30.7
P2P Digital Currency
|
#include <script/sigencoding.h>
#include <pubkey.h>
#include <script/script_flags.h>
#include <boost/range/adaptor/sliced.hpp>
Go to the source code of this file.
Typedefs | |
typedef boost::sliced_range< const valtype > | slicedvaltype |
Functions | |
static bool | IsValidDERSignatureEncoding (const slicedvaltype &sig) |
A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len
S> | |
static bool | IsSchnorrSig (const slicedvaltype &sig) |
static bool | CheckRawECDSASignatureEncoding (const slicedvaltype &sig, uint32_t flags, ScriptError *serror) |
static bool | CheckRawSchnorrSignatureEncoding (const slicedvaltype &sig, uint32_t flags, ScriptError *serror) |
static bool | CheckRawSignatureEncoding (const slicedvaltype &sig, uint32_t flags, ScriptError *serror) |
bool | CheckDataSignatureEncoding (const valtype &vchSig, uint32_t flags, ScriptError *serror) |
Check that the signature provided on some data is properly encoded. More... | |
static bool | CheckSighashEncoding (const valtype &vchSig, uint32_t flags, ScriptError *serror) |
template<typename F > | |
static bool | CheckTransactionSignatureEncodingImpl (const valtype &vchSig, uint32_t flags, ScriptError *serror, F fun) |
bool | CheckTransactionSignatureEncoding (const valtype &vchSig, uint32_t flags, ScriptError *serror) |
Check that the signature provided to authentify a transaction is properly encoded. More... | |
bool | CheckTransactionECDSASignatureEncoding (const valtype &vchSig, uint32_t flags, ScriptError *serror) |
Check that the signature provided to authentify a transaction is properly encoded ECDSA signature. More... | |
bool | CheckTransactionSchnorrSignatureEncoding (const valtype &vchSig, uint32_t flags, ScriptError *serror) |
Check that the signature provided to authentify a transaction is properly encoded Schnorr signature (or null). More... | |
static bool | IsCompressedOrUncompressedPubKey (const valtype &vchPubKey) |
bool | CheckPubKeyEncoding (const valtype &vchPubKey, uint32_t flags, ScriptError *serror) |
Check that a public key is encoded properly. More... | |
typedef boost::sliced_range<const valtype> slicedvaltype |
Definition at line 14 of file sigencoding.cpp.
bool CheckDataSignatureEncoding | ( | const valtype & | vchSig, |
uint32_t | flags, | ||
ScriptError * | serror | ||
) |
Check that the signature provided on some data is properly encoded.
Signatures passed to OP_CHECKDATASIG and its verify variant must be checked using this function.
Definition at line 202 of file sigencoding.cpp.
bool CheckPubKeyEncoding | ( | const valtype & | vchPubKey, |
uint32_t | flags, | ||
ScriptError * | serror | ||
) |
Check that a public key is encoded properly.
Definition at line 305 of file sigencoding.cpp.
|
static |
Definition at line 160 of file sigencoding.cpp.
|
static |
Definition at line 183 of file sigencoding.cpp.
|
static |
Definition at line 192 of file sigencoding.cpp.
|
static |
bool CheckTransactionECDSASignatureEncoding | ( | const valtype & | vchSig, |
uint32_t | flags, | ||
ScriptError * | serror | ||
) |
Check that the signature provided to authentify a transaction is properly encoded ECDSA signature.
Signatures passed to OP_CHECKMULTISIG and its verify variant must be checked using this function.
Definition at line 265 of file sigencoding.cpp.
bool CheckTransactionSchnorrSignatureEncoding | ( | const valtype & | vchSig, |
uint32_t | flags, | ||
ScriptError * | serror | ||
) |
Check that the signature provided to authentify a transaction is properly encoded Schnorr signature (or null).
Signatures passed to the new-mode OP_CHECKMULTISIG and its verify variant must be checked using this function.
Definition at line 277 of file sigencoding.cpp.
bool CheckTransactionSignatureEncoding | ( | const valtype & | vchSig, |
uint32_t | flags, | ||
ScriptError * | serror | ||
) |
Check that the signature provided to authentify a transaction is properly encoded.
Signatures passed to OP_CHECKSIG and its verify variant must be checked using this function.
Definition at line 254 of file sigencoding.cpp.
|
static |
Definition at line 236 of file sigencoding.cpp.
|
static |
|
static |
|
static |
A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len
S> , where R and S are not negative (their first byte has its highest bit not set), and not excessively padded (do not start with a 0 byte, unless an otherwise negative number follows, in which case a single 0 byte is necessary and even required).
See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
This function is consensus-critical since BIP66.
Definition at line 27 of file sigencoding.cpp.