Reference Edwards-curve signature RFCs
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 10 Feb 2017 08:05:54 +0000 (09:05 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 20 Mar 2017 20:18:00 +0000 (21:18 +0100)
src/libstrongswan/credentials/keys/public_key.h
src/libstrongswan/crypto/hashers/hasher.c
src/libstrongswan/crypto/hashers/hasher.h

index a8958fd..06c1aa4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2015 Tobias Brunner
  * Copyright (C) 2007 Martin Willi
- * Copyright (C) 2014-2016 Andreas Steffen
+ * Copyright (C) 2014-2017 Andreas Steffen
  * HSR Hochschule fuer Technik Rapperswil
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -44,9 +44,9 @@ enum key_type_t {
        KEY_ECDSA   = 2,
        /** DSA */
        KEY_DSA     = 3,
-       /** Ed25519 PureEdDSA instance as in draft-irtf-cfrg-eddsa */
+       /** Ed25519 PureEdDSA instance as in RFC 8032 */
        KEY_ED25519 = 4,
-       /** Ed448   PureEdDSA instance as in draft-irtf-cfrg-eddsa */
+       /** Ed448   PureEdDSA instance as in RFC 8032 */
        KEY_ED448   = 5,
        /** BLISS */
        KEY_BLISS = 6,
@@ -105,9 +105,9 @@ enum signature_scheme_t {
        SIGN_ECDSA_384,
        /** ECDSA on the P-521 curve with SHA-512 as in RFC 4754           */
        SIGN_ECDSA_521,
-       /** PureEdDSA on Curve25519 as in draft-ietf-curdle-pkix           */
+       /** PureEdDSA on Curve25519 as in draft-ietf-curdle-pkix (RFC TBA) */
        SIGN_ED25519,
-       /** PureEdDSA on Curve448 as in draft-ietf-curdle-pkix             */
+       /** PureEdDSA on Curve448 as in draft-ietf-curdle-pkix (RFC TBA)   */
        SIGN_ED448,
        /** BLISS with SHA-2_256                                           */
        SIGN_BLISS_WITH_SHA2_256,
index aab18ec..26aab0c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2012-2015 Tobias Brunner
- * Copyright (C) 2015-2016 Andreas Steffen
+ * Copyright (C) 2015-2017 Andreas Steffen
  * Copyright (C) 2005-2006 Martin Willi
  * Copyright (C) 2005 Jan Hutter
  * HSR Hochschule fuer Technik Rapperswil
 
 #include <asn1/oid.h>
 
-ENUM_BEGIN(hash_algorithm_names, HASH_IDENTITY, HASH_SHA512,
-       "HASH_IDENTITY",
+ENUM_BEGIN(hash_algorithm_names, HASH_SHA1, HASH_IDENTITY,
        "HASH_SHA1",
        "HASH_SHA256",
        "HASH_SHA384",
-       "HASH_SHA512");
-ENUM_NEXT(hash_algorithm_names, HASH_UNKNOWN, HASH_SHA3_512, HASH_SHA512,
+       "HASH_SHA512",
+       "HASH_IDENTITY");
+ENUM_NEXT(hash_algorithm_names, HASH_UNKNOWN, HASH_SHA3_512, HASH_IDENTITY,
        "HASH_UNKNOWN",
        "HASH_MD2",
        "HASH_MD4",
@@ -38,13 +38,13 @@ ENUM_NEXT(hash_algorithm_names, HASH_UNKNOWN, HASH_SHA3_512, HASH_SHA512,
        "HASH_SHA3_512");
 ENUM_END(hash_algorithm_names, HASH_SHA3_512);
 
-ENUM_BEGIN(hash_algorithm_short_names, HASH_IDENTITY, HASH_SHA512,
-       "identity",
+ENUM_BEGIN(hash_algorithm_short_names, HASH_SHA1, HASH_IDENTITY,
        "sha1",
        "sha256",
        "sha384",
-       "sha512");
-ENUM_NEXT(hash_algorithm_short_names, HASH_UNKNOWN, HASH_SHA3_512, HASH_SHA512,
+       "sha512",
+       "identity");
+ENUM_NEXT(hash_algorithm_short_names, HASH_UNKNOWN, HASH_SHA3_512, HASH_IDENTITY,
        "unknown",
        "md2",
        "md4",
index 8cd9b13..ec0c632 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Andreas Steffen
+ * Copyright (C) 2016-2017 Andreas Steffen
  * Copyright (C) 2012-2015 Tobias Brunner
  * Copyright (C) 2005-2006 Martin Willi
  * Copyright (C) 2005 Jan Hutter
@@ -33,14 +33,16 @@ typedef struct hasher_t hasher_t;
 #include <credentials/keys/public_key.h>
 
 /**
- * Hash algorithms as defined for IKEv2 by RFC 7427
+ * Hash algorithms as defined for IKEv2
  */
 enum hash_algorithm_t {
-       HASH_IDENTITY           = 0,
+       /* RFC 7427 */
        HASH_SHA1                       = 1,
        HASH_SHA256                     = 2,
        HASH_SHA384                     = 3,
        HASH_SHA512                     = 4,
+       /* draft-ietf-ipsecme-eddsa (RFC TBA) */
+       HASH_IDENTITY           = 5,
        /* use private use range for algorithms not defined/permitted by RFC 7427 */
        HASH_UNKNOWN            = 1024,
        HASH_MD2                        = 1025,