* TAG: 1d45758621762e061368e68868e2f929
*/
-#define BUF_MAX 512
+#define BUF_MAX 1024
/* These are the different types of line that are found in the input file. */
enum {
}
int
-aead_from_name(const EVP_AEAD **aead, const char *name){
+aead_from_name(const EVP_AEAD **aead, const char *name)
+{
*aead = NULL;
if (strcmp(name, "aes-128-gcm") == 0) {
*aead = EVP_aead_aes_256_gcm();
#else
fprintf(stderr, "No AES support.\n");
+#endif
+ } else if (strcmp(name, "chacha20-poly1305") == 0) {
+#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
+ *aead = EVP_aead_chacha20_poly1305();
+#else
+ fprintf(stderr, "No chacha20-poly1305 support.\n");
#endif
} else {
fprintf(stderr, "Unknown AEAD: %s\n", name);
+#
# MACsec GCM-AES Test Vectors (bn-randall-test-vectors-0511-v1.pdf)
+#
+
# 2.5.1 65-byte Packet Authentication Using GCM-AES-128
AEAD: aes-128-gcm
KEY: 013FE00B5F11BE7F866D0CBBC55A7A90
CT:
TAG: 217867E50C2DAD74C28C3B50ABDF695A
-# MACsec GCM-AES Test Vectors (bn-randall-test-vectors-0511-v1.pdf)
# 2.5.2 65-byte Packet Authentication Using GCM-AES-256
AEAD: aes-256-gcm
KEY: 83C093B58DE7FFE1C0DA926AC43FB3609AC1C80FEE1B624497EF942E2F79A823
CT:
TAG: 6EE160E8FAECA4B36C86B234920CA975
-# MACsec GCM-AES Test Vectors (bn-randall-test-vectors-0511-v1.pdf)
# 2.8.1 75-byte Packet Encryption Using GCM-AES-128
AEAD: aes-128-gcm
KEY: 88EE087FD95DA9FBF6725AA9D757B0CD
CT: C31F53D99E5687F7365119B832D2AAE70741D593F1F9E2AB3455779B078EB8FEACDFEC1F8E3E5277F8180B43361F6512ADB16D2E38548A2C719DBA7228D840
TAG: 88F8757ADB8AA788D8F65AD668BE70E7
-# MACsec GCM-AES Test Vectors (bn-randall-test-vectors-0511-v1.pdf)
# 2.8.2 75-byte Packet Encryption Using GCM-AES-256
AEAD: aes-256-gcm
KEY: 4C973DBC7364621674F8B5B89E5C15511FCED9216490FB1C1A2CAA0FFE0407E5
AD: 68F2E77696CE7AE8E2CA4EC588E54D002E58495C
CT: BA8AE31BC506486D6873E4FCE460E7DC57591FF00611F31C3834FE1C04AD80B66803AFCF5B27E6333FA67C99DA47C2F0CED68D531BD741A943CFF7A6713BD0
TAG: 2611CD7DAA01D61C5C886DC1A8170107
+
+#
+# Test vector from draft-agl-tls-chacha20poly1305-04 section 7.
+#
+AEAD: chacha20-poly1305
+KEY: 4290bcb154173531f314af57f3be3b5006da371ece272afa1b5dbdd1100a1007
+NONCE: cd7cf67be39c794a
+IN: 86d09974840bded2a5ca
+AD: 87e229d4500845a079c0
+CT: e3e446f7ede9a19b62a4677dabf4e3d24b876bb284753896e1d6
+TAG:
+