Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiyuu Nobori <da.git@softether.co.jp>2017-10-18 10:57:36 +0300
committerGitHub <noreply@github.com>2017-10-18 10:57:36 +0300
commitc32310205da79b8a617ef29807d40781215291ef (patch)
tree4fef83e407290bcebdb509243a9e55e8d07dbbcc /src/Cedar/IPsec_IkePacket.h
parent936815f2d400b750d905d0d9348d31fcc59d9acf (diff)
parent056c322601bade18e82208e2a06613d3ca87860d (diff)
Merge pull request #294 from moatazelmasry2/add-sha2
Add HMAC SHA2-256, HMAC SHA2-384, HMAC SHA2-512 support
Diffstat (limited to 'src/Cedar/IPsec_IkePacket.h')
-rw-r--r--src/Cedar/IPsec_IkePacket.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Cedar/IPsec_IkePacket.h b/src/Cedar/IPsec_IkePacket.h
index 6f714377..e82925b6 100644
--- a/src/Cedar/IPsec_IkePacket.h
+++ b/src/Cedar/IPsec_IkePacket.h
@@ -120,7 +120,7 @@
#endif // OS_WIN32
// Maximum hash size
-#define IKE_MAX_HASH_SIZE 20 // Size of SHA-1 is the maximum for now
+#define IKE_MAX_HASH_SIZE 64 // Size of SHA-2-512 is the maximum for now
// Maximum block size
#define IKE_MAX_BLOCK_SIZE 16 // Size of AES is maximum at the moment
@@ -250,6 +250,9 @@ struct IKE_TRANSFORM_VALUE
// Phase 1: The hash algorithm in IKE transform value
#define IKE_P1_HASH_MD5 1
#define IKE_P1_HASH_SHA1 2
+#define IKE_P1_HASH_SHA2_256 4
+#define IKE_P1_HASH_SHA2_384 5
+#define IKE_P1_HASH_SHA2_512 6
// Phase 1: The authentication method in the IKE transform value
#define IKE_P1_AUTH_METHOD_PRESHAREDKEY 1
@@ -536,6 +539,15 @@ struct IKE_P1_KEYSET
#define IKE_HASH_SHA1_ID 1
#define IKE_HASH_SHA1_STRING "SHA-1"
+#define IKE_HASH_SHA2_256_ID 2
+#define IKE_HASH_SHA2_256_STRING "SHA-2-256"
+
+#define IKE_HASH_SHA2_384_ID 3
+#define IKE_HASH_SHA2_384_STRING "SHA-2-384"
+
+#define IKE_HASH_SHA2_512_ID 4
+#define IKE_HASH_SHA2_512_STRING "SHA-2-512"
+
// Number and name of DH algorithm for IKE
#define IKE_DH_1_ID 0
#define IKE_DH_1_STRING "MODP 768 (Group 1)"