Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

pubkey.cpp File Reference
#include <pubkey.h>
#include <secp256k1.h>
#include <secp256k1_recovery.h>
+ Include dependency graph for pubkey.cpp:

Go to the source code of this file.

Functions

static int ecdsa_signature_parse_der_lax (const secp256k1_context *ctx, secp256k1_ecdsa_signature *sig, const unsigned char *input, size_t inputlen)
 This function is taken from the libsecp256k1 distribution and implements DER parsing for ECDSA signatures, while supporting an arbitrary subset of format violations. More...
 

Function Documentation

◆ ecdsa_signature_parse_der_lax()

static int ecdsa_signature_parse_der_lax ( const secp256k1_context ctx,
secp256k1_ecdsa_signature sig,
const unsigned char *  input,
size_t  inputlen 
)
static

This function is taken from the libsecp256k1 distribution and implements DER parsing for ECDSA signatures, while supporting an arbitrary subset of format violations.

Supported violations include negative integers, excessive padding, garbage at the end, and overly long length descriptors. This is safe to use in Bitcoin because since the activation of BIP66, signatures are verified to be strict DER before being passed to this module, and we know it supports all violations present in the blockchain before that point.

Definition at line 27 of file pubkey.cpp.

References ctx, memcpy(), and secp256k1_ecdsa_signature_parse_compact().

Referenced by CPubKey::CheckLowS(), test_ecdsa_der_parse(), and CPubKey::Verify().

Released under the MIT license