mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-19 21:03:23 -07:00
Implement Originality Signature Check in 'hf mfu info'
* add support for elliptic curve 'secp128r1' to mbedtls library * change ecdsa_signature_verify() to allow different curves, signature lengths, and skipping hash * add another public key for Mifare Ultralight EV1
This commit is contained in:
parent
88b3dada70
commit
3a5ffba7c1
13 changed files with 278 additions and 165 deletions
|
@ -84,7 +84,8 @@
|
|||
static unsigned long add_count, dbl_count, mul_count;
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \
|
||||
#if defined(MBEDTLS_ECP_DP_SECP128R1_ENABLED) || \
|
||||
defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \
|
||||
defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \
|
||||
defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \
|
||||
defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) || \
|
||||
|
@ -128,39 +129,42 @@ typedef enum
|
|||
static const mbedtls_ecp_curve_info ecp_supported_curves[] =
|
||||
{
|
||||
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP521R1, 25, 521, "secp521r1" },
|
||||
{ MBEDTLS_ECP_DP_SECP521R1, 25, 521, "secp521r1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_BP512R1, 28, 512, "brainpoolP512r1" },
|
||||
{ MBEDTLS_ECP_DP_BP512R1, 28, 512, "brainpoolP512r1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP384R1, 24, 384, "secp384r1" },
|
||||
{ MBEDTLS_ECP_DP_SECP384R1, 24, 384, "secp384r1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_BP384R1, 27, 384, "brainpoolP384r1" },
|
||||
{ MBEDTLS_ECP_DP_BP384R1, 27, 384, "brainpoolP384r1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP256R1, 23, 256, "secp256r1" },
|
||||
{ MBEDTLS_ECP_DP_SECP256R1, 23, 256, "secp256r1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP256K1, 22, 256, "secp256k1" },
|
||||
{ MBEDTLS_ECP_DP_SECP256K1, 22, 256, "secp256k1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_BP256R1, 26, 256, "brainpoolP256r1" },
|
||||
{ MBEDTLS_ECP_DP_BP256R1, 26, 256, "brainpoolP256r1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP224R1, 21, 224, "secp224r1" },
|
||||
{ MBEDTLS_ECP_DP_SECP224R1, 21, 224, "secp224r1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP224K1, 20, 224, "secp224k1" },
|
||||
{ MBEDTLS_ECP_DP_SECP224K1, 20, 224, "secp224k1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP192R1, 19, 192, "secp192r1" },
|
||||
{ MBEDTLS_ECP_DP_SECP192R1, 19, 192, "secp192r1" },
|
||||
#endif
|
||||
#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP192K1, 18, 192, "secp192k1" },
|
||||
{ MBEDTLS_ECP_DP_SECP192K1, 18, 192, "secp192k1" },
|
||||
#endif
|
||||
{ MBEDTLS_ECP_DP_NONE, 0, 0, NULL },
|
||||
#if defined(MBEDTLS_ECP_DP_SECP128R1_ENABLED)
|
||||
{ MBEDTLS_ECP_DP_SECP128R1, 0xFE00, 128, "secp128r1" },
|
||||
#endif
|
||||
{ MBEDTLS_ECP_DP_NONE, 0, 0, NULL },
|
||||
};
|
||||
|
||||
#define ECP_NB_CURVES sizeof( ecp_supported_curves ) / \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue