Bitcoin Core  27.99.0
P2P Digital Currency
Functions
secp256k1_ecdsa_signature_parse_der_lax.cpp File Reference
#include <key.h>
#include <secp256k1.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <cstdint>
#include <vector>
Include dependency graph for secp256k1_ecdsa_signature_parse_der_lax.cpp:

Go to the source code of this file.

Functions

bool SigHasLowR (const secp256k1_ecdsa_signature *sig)
 
int ecdsa_signature_parse_der_lax (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...
 
 FUZZ_TARGET (secp256k1_ecdsa_signature_parse_der_lax)
 

Function Documentation

◆ ecdsa_signature_parse_der_lax()

int ecdsa_signature_parse_der_lax ( 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.

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 43 of file pubkey.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FUZZ_TARGET()

FUZZ_TARGET ( secp256k1_ecdsa_signature_parse_der_lax  )

Definition at line 17 of file secp256k1_ecdsa_signature_parse_der_lax.cpp.

Here is the call graph for this function:

◆ SigHasLowR()

bool SigHasLowR ( const secp256k1_ecdsa_signature sig)

Definition at line 196 of file key.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: