[gcr/ecc: 2/10] egg: Add elliptic curve related ASN.1 definitions



commit 55d22d7ce0a8cf30bf1fc406b2e33a0c5b276e1c
Author: Stef Walter <stefw redhat com>
Date:   Thu Apr 17 07:12:20 2014 +0200

    egg: Add elliptic curve related ASN.1 definitions

 egg/pk.asn   |   13 +++++++++++++
 egg/pk.asn.h |   10 ++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/egg/pk.asn b/egg/pk.asn
index 347323c..2cd1f00 100644
--- a/egg/pk.asn
+++ b/egg/pk.asn
@@ -101,5 +101,18 @@ DHParameter ::= SEQUENCE {
        privateValueLength INTEGER OPTIONAL 
 }
 
+-- ECC from RFC5480
+ECPoint ::= OCTET STRING
+
+ECParameters ::= CHOICE {
+  namedCurve         OBJECT IDENTIFIER
+}
+
+ECPrivateKey ::= SEQUENCE {
+   Version       INTEGER, -- { ecPrivkeyVer1(1) }
+   privateKey    OCTET STRING,
+   parameters    [0] ECParameters OPTIONAL,
+   publicKey     [1] BIT STRING OPTIONAL
+}
 
 END
diff --git a/egg/pk.asn.h b/egg/pk.asn.h
index 8466b68..4f52c7a 100644
--- a/egg/pk.asn.h
+++ b/egg/pk.asn.h
@@ -67,5 +67,15 @@ const asn1_static_node pk_asn1_tab[] = {
   { "prime", 1073741827, NULL },
   { "base", 1073741827, NULL },
   { "privateValueLength", 16387, NULL },
+  { "ECPoint", 1073741831, NULL },
+  { "ECParameters", 1610612754, NULL },
+  { "namedCurve", 12, NULL },
+  { "ECPrivateKey", 536870917, NULL },
+  { "Version", 1073741827, NULL },
+  { "privateKey", 1073741831, NULL },
+  { "parameters", 1610637314, "ECParameters"},
+  { NULL, 2056, "0"},
+  { "publicKey", 536895494, NULL },
+  { NULL, 2056, "1"},
   { NULL, 0, NULL }
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]