Merged support for secp224k1, secp192k1 and secp25k1

This commit is contained in:
Paul Bakker 2014-01-22 13:08:44 +01:00
commit 0ac99ca7bc
10 changed files with 319 additions and 8 deletions

View file

@ -259,6 +259,9 @@
#define POLARSSL_ECP_DP_SECP256R1_ENABLED
#define POLARSSL_ECP_DP_SECP384R1_ENABLED
#define POLARSSL_ECP_DP_SECP521R1_ENABLED
#define POLARSSL_ECP_DP_SECP192K1_ENABLED
#define POLARSSL_ECP_DP_SECP224K1_ENABLED
#define POLARSSL_ECP_DP_SECP256K1_ENABLED
#define POLARSSL_ECP_DP_BP256R1_ENABLED
#define POLARSSL_ECP_DP_BP384R1_ENABLED
#define POLARSSL_ECP_DP_BP512R1_ENABLED

View file

@ -68,6 +68,9 @@ typedef enum
POLARSSL_ECP_DP_M255, /*!< Curve25519 */
POLARSSL_ECP_DP_M383, /*!< (not implemented yet) */
POLARSSL_ECP_DP_M511, /*!< (not implemented yet) */
POLARSSL_ECP_DP_SECP192K1, /*!< (not implemented yet) */
POLARSSL_ECP_DP_SECP224K1, /*!< (not implemented yet) */
POLARSSL_ECP_DP_SECP256K1, /*!< 256-bits Koblitz curve */
} ecp_group_id;
/**
@ -75,7 +78,7 @@ typedef enum
*
* (Montgomery curves excluded for now.)
*/
#define POLARSSL_ECP_DP_MAX 9
#define POLARSSL_ECP_DP_MAX 12
/**
* Curve information for use by other modules

View file

@ -263,7 +263,7 @@
#define OID_EC_ALG_ECDH OID_CERTICOM "\x01\x0c"
/*
* ECParameters namedCurve identifiers, from RFC 5480 and RFC 5639
* ECParameters namedCurve identifiers, from RFC 5480, RFC 5639, and SEC2
*/
/* secp192r1 OBJECT IDENTIFIER ::= {
@ -286,6 +286,18 @@
* iso(1) identified-organization(3) certicom(132) curve(0) 35 } */
#define OID_EC_GRP_SECP521R1 OID_CERTICOM "\x00\x23"
/* secp192k1 OBJECT IDENTIFIER ::= {
* iso(1) identified-organization(3) certicom(132) curve(0) 31 } */
#define OID_EC_GRP_SECP192K1 OID_CERTICOM "\x00\x1f"
/* secp224k1 OBJECT IDENTIFIER ::= {
* iso(1) identified-organization(3) certicom(132) curve(0) 32 } */
#define OID_EC_GRP_SECP224K1 OID_CERTICOM "\x00\x20"
/* secp256k1 OBJECT IDENTIFIER ::= {
* iso(1) identified-organization(3) certicom(132) curve(0) 10 } */
#define OID_EC_GRP_SECP256K1 OID_CERTICOM "\x00\x0a"
/* RFC 5639 4.1
* ecStdCurvesAndGeneration OBJECT IDENTIFIER::= {iso(1)
* identified-organization(3) teletrust(36) algorithm(3) signature-