[gcr/ecc: 3/12] egg: Added updates to ASN.1 from RFCs 5480 & 5758 & 5915
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr/ecc: 3/12] egg: Added updates to ASN.1 from RFCs 5480 & 5758 & 5915
- Date: Thu, 17 Apr 2014 18:25:29 +0000 (UTC)
commit 0ca1cbb5bb52e60c7aea2dd890b85fd9958f9e21
Author: Scott Schmit <i grok comcast net>
Date: Sun Feb 9 15:37:12 2014 -0500
egg: Added updates to ASN.1 from RFCs 5480 & 5758 & 5915
Signed-off-by: Stef Walter <stefw gnome org>
* Fixed conflicts and combined into one commit
egg/pkix.asn | 126 ++++++++++++++++++++++++++++++++++++++++
egg/pkix.asn.h | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 303 insertions(+), 0 deletions(-)
---
diff --git a/egg/pkix.asn b/egg/pkix.asn
index 02c2732..d5f8fde 100644
--- a/egg/pkix.asn
+++ b/egg/pkix.asn
@@ -6,6 +6,7 @@ DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- This contains both PKIX1Implicit88 and RFC2630 ASN.1 modules.
+-- It also includes updates from RFC 5480 and RFC 5758
-- ISO arc for standard certificate and CRL extensions
@@ -629,6 +630,122 @@ Dss-Parms ::= SEQUENCE {
q INTEGER,
g INTEGER }
+-- EC algorithm OIDs and parameter structures from RFC 3279
+ansi-X9-62 OBJECT IDENTIFIER ::= {
+ iso(1) member-body(2) us(840) 10045 }
+
+id-ecSigType OBJECT IDENTIFIER ::= {
+ ansi-X9-62 signatures(4) }
+
+ecdsa-with-SHA1 OBJECT IDENTIFIER ::= {
+ id-ecSigType 1 }
+
+Ecdsa-Sig-Value ::= SEQUENCE {
+ r INTEGER,
+ s INTEGER }
+
+id-public-key-type OBJECT IDENTIFIER ::= { ansi-X9-62 2 }
+
+id-ecPublicKey OBJECT IDENTIFIER ::= { id-public-key-type 1 }
+
+ECPoint ::= OCTET STRING
+
+-- The EC parameters structure was amended by RFC 5480
+
+ECParameters ::= CHOICE {
+ namedCurve OBJECT IDENTIFIER
+ -- implicitCurve NULL
+ -- specifiedCurve SpecifiedECDomain
+}
+ -- implicitCurve and specifiedCurve MUST NOT be used in PKIX.
+ -- Details for SpecifiedECDomain can be found in [X9.62].
+ -- Any future additions to this CHOICE should be coordinated
+ -- with ANSI X9.
+
+--
+-- Named Elliptic Curves (from RFC 5480)
+--
+
+-- Note that in X9.62 the curves are referred to as 'ansiX9' as
+-- opposed to 'sec'. For example secp192r1 is the same curve as
+-- ansix9p192r1.
+
+-- Note that in RFC 3279 the secp192r1 curve was referred to as
+-- prime192v1 and the secp256r1 curve was referred to as prime256v1.
+
+-- Note that FIPS186-3 refers to secp192r1 as P-192, secp224r1 as
+-- P-224, secp256r1 as P-256, secp384r1 as P-384, and secp521r1 as
+-- P-521.
+
+secp192r1 OBJECT IDENTIFIER ::= {
+ iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)
+ prime(1) 1 }
+
+sect163k1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 1 }
+
+sect163r2 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 15 }
+
+secp224r1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 33 }
+
+sect233k1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 26 }
+
+sect233r1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 27 }
+
+secp256r1 OBJECT IDENTIFIER ::= {
+ iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)
+ prime(1) 7 }
+
+sect283k1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 16 }
+
+sect283r1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 17 }
+
+secp384r1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 34 }
+
+sect409k1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 36 }
+
+sect409r1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 37 }
+
+secp521r1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 35 }
+
+sect571k1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 38 }
+
+sect571r1 OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0) 39 }
+
+-- Algorithm OIDs added by RFC 5758
+
+id-dsa-with-sha224 OBJECT IDENTIFIER ::= { joint-iso-ccitt(2)
+ country(16) us(840) organization(1) gov(101) csor(3)
+ algorithms(4) id-dsa-with-sha2(3) 1 }
+
+id-dsa-with-sha256 OBJECT IDENTIFIER ::= { joint-iso-ccitt(2)
+ country(16) us(840) organization(1) gov(101) csor(3)
+ algorithms(4) id-dsa-with-sha2(3) 2 }
+
+ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 }
+
+ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 }
+
+ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 }
+
+ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 }
+
-- x400 address syntax starts here
-- OR Names
@@ -1245,4 +1362,13 @@ SignedPublicKeyAndChallenge ::= SEQUENCE {
ExtensionRequest ::= SEQUENCE OF Extension
+-- rfc5915 (EC private key structure)
+
+ECPrivateKey ::= SEQUENCE {
+ version INTEGER { ecPrivkeyVer1(1) },
+ privateKey OCTET STRING,
+ parameters [0] ECParameters OPTIONAL,
+ publicKey [1] BIT STRING OPTIONAL
+}
+
END
diff --git a/egg/pkix.asn.h b/egg/pkix.asn.h
index b3a7a2a..6323389 100644
--- a/egg/pkix.asn.h
+++ b/egg/pkix.asn.h
@@ -604,6 +604,175 @@ const asn1_static_node pkix_asn1_tab[] = {
{ "p", 1073741827, NULL },
{ "q", 1073741827, NULL },
{ "g", 3, NULL },
+ { "ansi-X9-62", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { NULL, 1, "10045"},
+ { "id-ecSigType", 1879048204, NULL },
+ { NULL, 1073741825, "ansi-X9-62"},
+ { "signatures", 1, "4"},
+ { "ecdsa-with-SHA1", 1879048204, NULL },
+ { NULL, 1073741825, "id-ecSigType"},
+ { NULL, 1, "1"},
+ { "Ecdsa-Sig-Value", 1610612741, NULL },
+ { "r", 1073741827, NULL },
+ { "s", 3, NULL },
+ { "id-public-key-type", 1879048204, NULL },
+ { NULL, 1073741825, "ansi-X9-62"},
+ { NULL, 1, "2"},
+ { "id-ecPublicKey", 1879048204, NULL },
+ { NULL, 1073741825, "id-public-key-type"},
+ { NULL, 1, "1"},
+ { "ECPoint", 1073741831, NULL },
+ { "ECParameters", 1610612754, NULL },
+ { "namedCurve", 12, NULL },
+ { "secp192r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "ansi-X9-62", 1073741825, "10045"},
+ { "curves", 1073741825, "3"},
+ { "prime", 1073741825, "1"},
+ { NULL, 1, "1"},
+ { "sect163k1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "1"},
+ { "sect163r2", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "15"},
+ { "secp224r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "33"},
+ { "sect233k1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "26"},
+ { "sect233r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "27"},
+ { "secp256r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "ansi-X9-62", 1073741825, "10045"},
+ { "curves", 1073741825, "3"},
+ { "prime", 1073741825, "1"},
+ { NULL, 1, "7"},
+ { "sect283k1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "16"},
+ { "sect283r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "17"},
+ { "secp384r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "34"},
+ { "sect409k1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "36"},
+ { "sect409r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "37"},
+ { "secp521r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "35"},
+ { "sect571k1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "38"},
+ { "sect571r1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "certicom", 1073741825, "132"},
+ { "curve", 1073741825, "0"},
+ { NULL, 1, "39"},
+ { "id-dsa-with-sha224", 1879048204, NULL },
+ { "joint-iso-ccitt", 1073741825, "2"},
+ { "country", 1073741825, "16"},
+ { "us", 1073741825, "840"},
+ { "organization", 1073741825, "1"},
+ { "gov", 1073741825, "101"},
+ { "csor", 1073741825, "3"},
+ { "algorithms", 1073741825, "4"},
+ { "id-dsa-with-sha2", 1073741825, "3"},
+ { NULL, 1, "1"},
+ { "id-dsa-with-sha256", 1879048204, NULL },
+ { "joint-iso-ccitt", 1073741825, "2"},
+ { "country", 1073741825, "16"},
+ { "us", 1073741825, "840"},
+ { "organization", 1073741825, "1"},
+ { "gov", 1073741825, "101"},
+ { "csor", 1073741825, "3"},
+ { "algorithms", 1073741825, "4"},
+ { "id-dsa-with-sha2", 1073741825, "3"},
+ { NULL, 1, "2"},
+ { "ecdsa-with-SHA224", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "ansi-X9-62", 1073741825, "10045"},
+ { "signatures", 1073741825, "4"},
+ { "ecdsa-with-SHA2", 1073741825, "3"},
+ { NULL, 1, "1"},
+ { "ecdsa-with-SHA256", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "ansi-X9-62", 1073741825, "10045"},
+ { "signatures", 1073741825, "4"},
+ { "ecdsa-with-SHA2", 1073741825, "3"},
+ { NULL, 1, "2"},
+ { "ecdsa-with-SHA384", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "ansi-X9-62", 1073741825, "10045"},
+ { "signatures", 1073741825, "4"},
+ { "ecdsa-with-SHA2", 1073741825, "3"},
+ { NULL, 1, "3"},
+ { "ecdsa-with-SHA512", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "ansi-X9-62", 1073741825, "10045"},
+ { "signatures", 1073741825, "4"},
+ { "ecdsa-with-SHA2", 1073741825, "3"},
+ { NULL, 1, "4"},
{ "ORAddress", 1610612741, NULL },
{ "built-in-standard-attributes", 1073741826, "BuiltInStandardAttributes"},
{ "built-in-domain-defined-attributes", 1073758210, "BuiltInDomainDefinedAttributes"},
@@ -1115,5 +1284,13 @@ const asn1_static_node pkix_asn1_tab[] = {
{ "signature", 6, NULL },
{ "ExtensionRequest", 536870923, NULL },
{ NULL, 2, "Extension"},
+ { "ECPrivateKey", 536870917, NULL },
+ { "version", 1610874883, NULL },
+ { "ecPrivkeyVer1", 1, "1"},
+ { "privateKey", 1073741831, NULL },
+ { "parameters", 1610637314, "ECParameters"},
+ { NULL, 4104, "0"},
+ { "publicKey", 536895494, NULL },
+ { NULL, 4104, "1"},
{ NULL, 0, NULL }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]