Latest update.
This commit is contained in:
@@ -54,6 +54,7 @@ static int do_encrypt(unsigned char *iv_gen, unsigned char *ct, int *ct_len,
|
||||
&& TEST_true(EVP_EncryptUpdate(ctx, ct, ct_len, gcm_pt,
|
||||
sizeof(gcm_pt)) > 0)
|
||||
&& TEST_true(EVP_EncryptFinal_ex(ctx, outbuf, &outlen) > 0)
|
||||
&& TEST_int_eq(EVP_CIPHER_CTX_tag_length(ctx), 16)
|
||||
&& TEST_true(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, 16,
|
||||
tag) > 0)
|
||||
&& TEST_true(iv_gen == NULL
|
||||
@@ -75,6 +76,7 @@ static int do_decrypt(const unsigned char *iv, const unsigned char *ct,
|
||||
&& TEST_true(EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), NULL,
|
||||
NULL, NULL) > 0)
|
||||
&& TEST_true(EVP_DecryptInit_ex(ctx, NULL, NULL, gcm_key, iv) > 0)
|
||||
&& TEST_int_eq(EVP_CIPHER_CTX_tag_length(ctx), 16)
|
||||
&& TEST_true(EVP_DecryptUpdate(ctx, NULL, &outlen, gcm_aad,
|
||||
sizeof(gcm_aad)) > 0)
|
||||
&& TEST_true(EVP_DecryptUpdate(ctx, pt, &ptlen, ct,
|
||||
@@ -100,6 +102,20 @@ static int kat_test(void)
|
||||
&& do_decrypt(gcm_iv, ct, ctlen, tag, taglen);
|
||||
}
|
||||
|
||||
static int badkeylen_test(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_CIPHER_CTX *ctx = NULL;
|
||||
const EVP_CIPHER *cipher;
|
||||
|
||||
ret = TEST_ptr(cipher = EVP_aes_192_gcm())
|
||||
&& TEST_ptr(ctx = EVP_CIPHER_CTX_new())
|
||||
&& TEST_true(EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL))
|
||||
&& TEST_false(EVP_CIPHER_CTX_set_key_length(ctx, 2));
|
||||
EVP_CIPHER_CTX_free(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef FIPS_MODE
|
||||
static int ivgen_test(void)
|
||||
{
|
||||
@@ -116,6 +132,7 @@ static int ivgen_test(void)
|
||||
int setup_tests(void)
|
||||
{
|
||||
ADD_TEST(kat_test);
|
||||
ADD_TEST(badkeylen_test);
|
||||
#ifdef FIPS_MODE
|
||||
ADD_TEST(ivgen_test);
|
||||
#endif /* FIPS_MODE */
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include "internal/asn1_dsa.h"
|
||||
#include "testutil.h"
|
||||
|
||||
static unsigned char t_dsa_sig[] = {
|
||||
0x30, 0x06, /* SEQUENCE tag + length */
|
||||
0x02, 0x01, 0x01, /* INTEGER tag + length + content */
|
||||
0x02, 0x01, 0x02 /* INTEGER tag + length + content */
|
||||
};
|
||||
|
||||
static unsigned char t_dsa_sig_extra[] = {
|
||||
0x30, 0x06, /* SEQUENCE tag + length */
|
||||
0x02, 0x01, 0x01, /* INTEGER tag + length + content */
|
||||
0x02, 0x01, 0x02, /* INTEGER tag + length + content */
|
||||
0x05, 0x00 /* NULL tag + length */
|
||||
};
|
||||
|
||||
static unsigned char t_dsa_sig_msb[] = {
|
||||
0x30, 0x08, /* SEQUENCE tag + length */
|
||||
0x02, 0x02, 0x00, 0x81, /* INTEGER tag + length + content */
|
||||
0x02, 0x02, 0x00, 0x82 /* INTEGER tag + length + content */
|
||||
};
|
||||
|
||||
static unsigned char t_dsa_sig_two[] = {
|
||||
0x30, 0x08, /* SEQUENCE tag + length */
|
||||
0x02, 0x02, 0x01, 0x00, /* INTEGER tag + length + content */
|
||||
0x02, 0x02, 0x02, 0x00 /* INTEGER tag + length + content */
|
||||
};
|
||||
|
||||
/*
|
||||
* Badly coded ASN.1 INTEGER zero wrapped in a sequence along with another
|
||||
* (valid) INTEGER.
|
||||
*/
|
||||
static unsigned char t_invalid_int_zero[] = {
|
||||
0x30, 0x05, /* SEQUENCE tag + length */
|
||||
0x02, 0x00, /* INTEGER tag + length */
|
||||
0x02, 0x01, 0x2a /* INTEGER tag + length */
|
||||
};
|
||||
|
||||
/*
|
||||
* Badly coded ASN.1 INTEGER (with leading zeros) wrapped in a sequence along
|
||||
* with another (valid) INTEGER.
|
||||
*/
|
||||
static unsigned char t_invalid_int[] = {
|
||||
0x30, 0x07, /* SEQUENCE tag + length */
|
||||
0x02, 0x02, 0x00, 0x7f, /* INTEGER tag + length */
|
||||
0x02, 0x01, 0x2a /* INTEGER tag + length */
|
||||
};
|
||||
|
||||
/*
|
||||
* Negative ASN.1 INTEGER wrapped in a sequence along with another
|
||||
* (valid) INTEGER.
|
||||
*/
|
||||
static unsigned char t_neg_int[] = {
|
||||
0x30, 0x06, /* SEQUENCE tag + length */
|
||||
0x02, 0x01, 0xaa, /* INTEGER tag + length */
|
||||
0x02, 0x01, 0x2a /* INTEGER tag + length */
|
||||
};
|
||||
|
||||
static unsigned char t_trunc_der[] = {
|
||||
0x30, 0x08, /* SEQUENCE tag + length */
|
||||
0x02, 0x02, 0x00, 0x81, /* INTEGER tag + length */
|
||||
0x02, 0x02, 0x00 /* INTEGER tag + length */
|
||||
};
|
||||
|
||||
static unsigned char t_trunc_seq[] = {
|
||||
0x30, 0x07, /* SEQUENCE tag + length */
|
||||
0x02, 0x02, 0x00, 0x81, /* INTEGER tag + length */
|
||||
0x02, 0x02, 0x00, 0x82 /* INTEGER tag + length */
|
||||
};
|
||||
|
||||
static int test_decode(void)
|
||||
{
|
||||
int rv = 0;
|
||||
BIGNUM *r;
|
||||
BIGNUM *s;
|
||||
const unsigned char *pder;
|
||||
|
||||
r = BN_new();
|
||||
s = BN_new();
|
||||
|
||||
/* Positive tests */
|
||||
pder = t_dsa_sig;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_dsa_sig)) == 0
|
||||
|| !TEST_ptr_eq(pder, (t_dsa_sig + sizeof(t_dsa_sig)))
|
||||
|| !TEST_BN_eq_word(r, 1) || !TEST_BN_eq_word(s, 2)) {
|
||||
TEST_info("asn1_dsa test_decode: t_dsa_sig failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
BN_clear(r);
|
||||
BN_clear(s);
|
||||
pder = t_dsa_sig_extra;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_dsa_sig_extra)) == 0
|
||||
|| !TEST_ptr_eq(pder,
|
||||
(t_dsa_sig_extra + sizeof(t_dsa_sig_extra) - 2))
|
||||
|| !TEST_BN_eq_word(r, 1) || !TEST_BN_eq_word(s, 2)) {
|
||||
TEST_info("asn1_dsa test_decode: t_dsa_sig_extra failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
BN_clear(r);
|
||||
BN_clear(s);
|
||||
pder = t_dsa_sig_msb;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_dsa_sig_msb)) == 0
|
||||
|| !TEST_ptr_eq(pder, (t_dsa_sig_msb + sizeof(t_dsa_sig_msb)))
|
||||
|| !TEST_BN_eq_word(r, 0x81) || !TEST_BN_eq_word(s, 0x82)) {
|
||||
TEST_info("asn1_dsa test_decode: t_dsa_sig_msb failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
BN_clear(r);
|
||||
BN_clear(s);
|
||||
pder = t_dsa_sig_two;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_dsa_sig_two)) == 0
|
||||
|| !TEST_ptr_eq(pder, (t_dsa_sig_two + sizeof(t_dsa_sig_two)))
|
||||
|| !TEST_BN_eq_word(r, 0x100) || !TEST_BN_eq_word(s, 0x200)) {
|
||||
TEST_info("asn1_dsa test_decode: t_dsa_sig_two failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Negative tests */
|
||||
pder = t_invalid_int_zero;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_invalid_int_zero)) != 0) {
|
||||
TEST_info("asn1_dsa test_decode: Expected t_invalid_int_zero to fail");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
BN_clear(r);
|
||||
BN_clear(s);
|
||||
pder = t_invalid_int;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_invalid_int)) != 0) {
|
||||
TEST_info("asn1_dsa test_decode: Expected t_invalid_int to fail");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
BN_clear(r);
|
||||
BN_clear(s);
|
||||
pder = t_neg_int;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_neg_int)) != 0) {
|
||||
TEST_info("asn1_dsa test_decode: Expected t_neg_int to fail");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
BN_clear(r);
|
||||
BN_clear(s);
|
||||
pder = t_trunc_der;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_trunc_der)) != 0) {
|
||||
TEST_info("asn1_dsa test_decode: Expected fail t_trunc_der");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
BN_clear(r);
|
||||
BN_clear(s);
|
||||
pder = t_trunc_seq;
|
||||
if (decode_der_dsa_sig(r, s, &pder, sizeof(t_trunc_seq)) != 0) {
|
||||
TEST_info("asn1_dsa test_decode: Expected fail t_trunc_seq");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
rv = 1;
|
||||
fail:
|
||||
BN_free(r);
|
||||
BN_free(s);
|
||||
return rv;
|
||||
}
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
ADD_TEST(test_decode);
|
||||
return 1;
|
||||
}
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#include "../ssl/packet_locl.h"
|
||||
#include "internal/packet.h"
|
||||
|
||||
#include "ssltestlib.h"
|
||||
#include "testutil.h"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/kdf.h>
|
||||
#include "../ssl/packet_locl.h"
|
||||
#include "internal/packet.h"
|
||||
#include "internal/nelem.h"
|
||||
#include "testutil.h"
|
||||
|
||||
|
||||
+1
-1
@@ -2526,7 +2526,7 @@ int setup_tests(void)
|
||||
break;
|
||||
default:
|
||||
case OPT_ERR:
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
n = test_get_argument_count();
|
||||
|
||||
+27
-13
@@ -1,19 +1,20 @@
|
||||
SUBDIRS=ossl_shim
|
||||
|
||||
# TODO: use ../apps/libapps.a instead of direct ../apps source.
|
||||
# TODO: use ../apps/libapps.a instead of direct ../apps/lib source.
|
||||
# This can't currently be done, because some of its units drag in too many
|
||||
# unresolved references that don't apply here. Most of all, ../apps/apps.c
|
||||
# needs to be divided in smaller pieces to be useful here.
|
||||
# unresolved references that don't apply here.
|
||||
# Most of all, ../apps/lib/apps.c needs to be divided in smaller pieces to
|
||||
# be useful here.
|
||||
#
|
||||
# Auxilliary program source (copied from ../apps/build.info)
|
||||
IF[{- $config{target} =~ /^(?:VC-|mingw)/ -}]
|
||||
# It's called 'init', but doesn't have much 'init' in it...
|
||||
$AUXLIBAPPSSRC=../apps/win32_init.c
|
||||
$AUXLIBAPPSSRC=../apps/lib/win32_init.c
|
||||
ENDIF
|
||||
IF[{- $config{target} =~ /^vms-/ -}]
|
||||
$AUXLIBAPPSSRC=../apps/vms_term_sock.c ../apps/vms_decc_argv.c
|
||||
$AUXLIBAPPSSRC=../apps/lib/vms_term_sock.c ../apps/lib/vms_decc_argv.c
|
||||
ENDIF
|
||||
$LIBAPPSSRC=../apps/opt.c ../apps/bf_prefix.c $AUXLIBAPPSSRC
|
||||
$LIBAPPSSRC=../apps/lib/opt.c ../apps/lib/bf_prefix.c $AUXLIBAPPSSRC
|
||||
|
||||
IF[{- !$disabled{tests} -}]
|
||||
LIBS{noinst,has_main}=libtestutil.a
|
||||
@@ -22,7 +23,7 @@ IF[{- !$disabled{tests} -}]
|
||||
testutil/format_output.c testutil/tap_bio.c \
|
||||
testutil/test_cleanup.c testutil/main.c testutil/init.c \
|
||||
testutil/options.c testutil/test_options.c \
|
||||
testutil/apps_mem.c $LIBAPPSSRC
|
||||
testutil/apps_mem.c testutil/random.c $LIBAPPSSRC
|
||||
INCLUDE[libtestutil.a]=../include ../apps/include ..
|
||||
DEPEND[libtestutil.a]=../libcrypto
|
||||
|
||||
@@ -37,14 +38,14 @@ IF[{- !$disabled{tests} -}]
|
||||
destest mdc2test \
|
||||
dhtest enginetest casttest \
|
||||
bftest ssltest_old dsatest dsa_no_digest_size_test exptest rsa_test \
|
||||
evp_test evp_extra_test igetest v3nametest v3ext \
|
||||
evp_test evp_extra_test evp_fetch_prov_test igetest v3nametest v3ext \
|
||||
crltest danetest bad_dtls_test lhash_test sparse_array_test \
|
||||
conf_include_test params_api_test params_conversion_test \
|
||||
constant_time_test verify_extra_test clienthellotest \
|
||||
packettest asynctest secmemtest srptest memleaktest stack_test \
|
||||
dtlsv1listentest ct_test threadstest afalgtest d2i_test \
|
||||
ssl_test_ctx_test ssl_test x509aux cipherlist_test asynciotest \
|
||||
bio_callback_test bio_memleak_test \
|
||||
bio_callback_test bio_memleak_test param_build_test \
|
||||
bioprinttest sslapitest dtlstest sslcorrupttest bio_enc_test \
|
||||
pkey_meth_test pkey_meth_kdf_test evp_kdf_test uitest \
|
||||
cipherbytes_test \
|
||||
@@ -194,6 +195,10 @@ IF[{- !$disabled{tests} -}]
|
||||
SOURCE[evp_extra_test]=evp_extra_test.c
|
||||
INCLUDE[evp_extra_test]=../include ../apps/include ../crypto/include
|
||||
DEPEND[evp_extra_test]=../libcrypto libtestutil.a
|
||||
|
||||
SOURCE[evp_fetch_prov_test]=evp_fetch_prov_test.c
|
||||
INCLUDE[evp_fetch_prov_test]=../include ../apps/include ../crypto/include
|
||||
DEPEND[evp_fetch_prov_test]=../libcrypto libtestutil.a
|
||||
IF[{- $disabled{fips} || !$target{dso_scheme} -}]
|
||||
DEFINE[evp_extra_test]=NO_FIPS_MODULE
|
||||
ENDIF
|
||||
@@ -326,6 +331,10 @@ IF[{- !$disabled{tests} -}]
|
||||
INCLUDE[params_conversion_test]=../include ../apps/include
|
||||
DEPEND[params_conversion_test]=../libcrypto libtestutil.a
|
||||
|
||||
SOURCE[param_build_test]=param_build_test.c
|
||||
INCLUDE[param_build_test]=../include ../apps/include
|
||||
DEPEND[param_build_test]=../libcrypto.a libtestutil.a
|
||||
|
||||
SOURCE[sslapitest]=sslapitest.c ssltestlib.c
|
||||
INCLUDE[sslapitest]=../include ../apps/include ..
|
||||
DEPEND[sslapitest]=../libcrypto ../libssl libtestutil.a
|
||||
@@ -431,7 +440,7 @@ IF[{- !$disabled{tests} -}]
|
||||
DEPEND[cipher_overhead_test]=../libcrypto ../libssl libtestutil.a
|
||||
ENDIF
|
||||
|
||||
SOURCE[uitest]=uitest.c ../apps/apps_ui.c
|
||||
SOURCE[uitest]=uitest.c ../apps/lib/apps_ui.c
|
||||
INCLUDE[uitest]=.. ../include ../apps/include
|
||||
DEPEND[uitest]=../libcrypto ../libssl libtestutil.a
|
||||
|
||||
@@ -469,7 +478,8 @@ IF[{- !$disabled{tests} -}]
|
||||
PROGRAMS{noinst}=asn1_internal_test modes_internal_test x509_internal_test \
|
||||
tls13encryptiontest wpackettest ctype_internal_test \
|
||||
rdrand_sanitytest property_test \
|
||||
rsa_sp800_56b_test bn_internal_test
|
||||
rsa_sp800_56b_test bn_internal_test \
|
||||
asn1_dsa_internal_test
|
||||
|
||||
IF[{- !$disabled{poly1305} -}]
|
||||
PROGRAMS{noinst}=poly1305_internal_test
|
||||
@@ -503,7 +513,7 @@ IF[{- !$disabled{tests} -}]
|
||||
DEPEND[asn1_internal_test]=../libcrypto.a libtestutil.a
|
||||
|
||||
SOURCE[modes_internal_test]=modes_internal_test.c
|
||||
INCLUDE[modes_internal_test]=.. ../include ../apps/include
|
||||
INCLUDE[modes_internal_test]=.. ../include ../apps/include ../crypto/include
|
||||
DEPEND[modes_internal_test]=../libcrypto.a libtestutil.a
|
||||
|
||||
SOURCE[x509_internal_test]=x509_internal_test.c
|
||||
@@ -561,6 +571,10 @@ IF[{- !$disabled{tests} -}]
|
||||
SOURCE[bn_internal_test]=bn_internal_test.c
|
||||
INCLUDE[bn_internal_test]=.. ../include ../crypto/include ../crypto/bn ../apps/include
|
||||
DEPEND[bn_internal_test]=../libcrypto.a libtestutil.a
|
||||
|
||||
SOURCE[asn1_dsa_internal_test]=asn1_dsa_internal_test.c
|
||||
INCLUDE[asn1_dsa_internal_test]=.. ../include ../apps/include ../crypto/include
|
||||
DEPEND[asn1_dsa_internal_test]=../libcrypto.a libtestutil.a
|
||||
ENDIF
|
||||
|
||||
IF[{- !$disabled{mdc2} -}]
|
||||
@@ -582,7 +596,7 @@ IF[{- !$disabled{tests} -}]
|
||||
IF[{- !$disabled{shared} -}]
|
||||
PROGRAMS{noinst}=tls13secretstest
|
||||
SOURCE[tls13secretstest]=tls13secretstest.c
|
||||
SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
|
||||
SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../crypto/packet.c
|
||||
INCLUDE[tls13secretstest]=.. ../include ../apps/include
|
||||
DEPEND[tls13secretstest]=../libcrypto ../libssl libtestutil.a
|
||||
ENDIF
|
||||
|
||||
@@ -233,6 +233,35 @@ genee() {
|
||||
-set_serial 2 -days "${DAYS}" "$@"
|
||||
}
|
||||
|
||||
geneenocsr() {
|
||||
local OPTIND=1
|
||||
local purpose=serverAuth
|
||||
|
||||
while getopts p: o
|
||||
do
|
||||
case $o in
|
||||
p) purpose="$OPTARG";;
|
||||
*) echo "Usage: $0 genee [-p EKU] cn certname cakeyname cacertname" >&2
|
||||
return 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND - 1))
|
||||
local cn=$1; shift
|
||||
local cert=$1; shift
|
||||
local cakey=$1; shift
|
||||
local ca=$1; shift
|
||||
|
||||
exts=$(printf "%s\n%s\n%s\n%s\n%s\n[alts]\n%s\n" \
|
||||
"subjectKeyIdentifier = hash" \
|
||||
"authorityKeyIdentifier = keyid, issuer" \
|
||||
"basicConstraints = CA:false" \
|
||||
"extendedKeyUsage = $purpose" \
|
||||
"subjectAltName = @alts" "DNS=${cn}")
|
||||
cert "$cert" "$exts" -CA "${ca}.pem" -CAkey "${cakey}.pem" \
|
||||
-set_serial 2 -days "${DAYS}" "$@"
|
||||
}
|
||||
|
||||
genss() {
|
||||
local cn=$1; shift
|
||||
local key=$1; shift
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDYjCCAkqgAwIBAgIBAjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdSb290
|
||||
IENBMCAXDTE5MDgwODEwNDMxMFoYDzIxMTkwODA5MTA0MzEwWjAUMRIwEAYDVQQD
|
||||
DAlsb2NhbGhvc3QwggFSMD0GCSqGSIb3DQEBCjAwoA0wCwYJYIZIAWUDBAIBoRow
|
||||
GAYJKoZIhvcNAQEIMAsGCWCGSAFlAwQCAaIDAgEgA4IBDwAwggEKAoIBAQDDlygk
|
||||
sUEAajpdVquo9XIAyTd9ZJ+55hNmhBfhn3lHz3ryPD+0XlgCE9qsKwfR7iYaqmnN
|
||||
ilQnsxWpMGXAgOlC1+w5zh8qHvrI5wX+A6U9N8leIOSgFuFNP0FMMG7I677QzRxG
|
||||
FqKX1o4V73JWqnHCfnfHRyZY9xM0tYbJKNbRO7Hy4jKBPl3ptPHUoTltr4WYTOpg
|
||||
stcEamdiiif+0U4bQvVltNg9pzFEjkAktTUGn92W5CgLnsbPXxBo6a/kUlHcgmhY
|
||||
bpOXEjCPufZLgsQo8iF2Bq8eWMEsByjr0chQjzrfZAUVtD8Hmh2uMVAPQFAHUkaL
|
||||
j2tHukL+s9tAaWKNAgMBAAGjgY4wgYswHQYDVR0OBBYEFLqlLFaNrS8hbX6voiGi
|
||||
AfMYfsivMB8GA1UdIwQYMBaAFHB/Lq6DaFmYBCMqzes+F80k3QFJMAkGA1UdEwQC
|
||||
MAAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwKQYDVR0RBCIwIIIeU2VydmVyIFJTQS1Q
|
||||
U1MgcmVzdHJpY3RlZCBjZXJ0MA0GCSqGSIb3DQEBCwUAA4IBAQAEhm9Skn2XfEZo
|
||||
Q+YMu6HIQZovRT3IljHvesjIby7KfS86SU4r+CG7qaPLw7jeIR92YMnihnaXRGGJ
|
||||
POixpHY6gapEzR2Sqg7c0ApGenDZ3uKnBUjf9LEorPmhrEHUsnHREXoPx5Lt5Nh/
|
||||
7WRNB/GKvbnAby+5HQBOvU6P8t37/zK1JjJhGNv0uvaYthQGk3r6nEhQG+O6JBSw
|
||||
H/auU4ClIB4fg8GWaMuupN5VMNP9mxpL9tONH8QRKs+KIQWMOsr83rOKwSHrrkIL
|
||||
/vDI5hPj9RHvjjta6FQx140wA6c8ZB59x9YIv1alJWf6s3+TM8bv70L/aBBT8+IM
|
||||
vwjUz9Gp
|
||||
-----END CERTIFICATE-----
|
||||
@@ -0,0 +1,29 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIE7wIBADA9BgkqhkiG9w0BAQowMKANMAsGCWCGSAFlAwQCAaEaMBgGCSqGSIb3
|
||||
DQEBCDALBglghkgBZQMEAgGiAwIBIASCBKkwggSlAgEAAoIBAQDDlygksUEAajpd
|
||||
Vquo9XIAyTd9ZJ+55hNmhBfhn3lHz3ryPD+0XlgCE9qsKwfR7iYaqmnNilQnsxWp
|
||||
MGXAgOlC1+w5zh8qHvrI5wX+A6U9N8leIOSgFuFNP0FMMG7I677QzRxGFqKX1o4V
|
||||
73JWqnHCfnfHRyZY9xM0tYbJKNbRO7Hy4jKBPl3ptPHUoTltr4WYTOpgstcEamdi
|
||||
iif+0U4bQvVltNg9pzFEjkAktTUGn92W5CgLnsbPXxBo6a/kUlHcgmhYbpOXEjCP
|
||||
ufZLgsQo8iF2Bq8eWMEsByjr0chQjzrfZAUVtD8Hmh2uMVAPQFAHUkaLj2tHukL+
|
||||
s9tAaWKNAgMBAAECggEBAIzgfwWOtmb6HHfGSXY085wlUlZ696EKWsboNdtI5i4W
|
||||
/1Mimi/sFC/K5SJFDCjlA4UJYZOuItdFYkCun1t8foaqx3cLQ98u2SuDWwmOzqG9
|
||||
YMjvoDy+viDJgtrBt8n4I0R5t/ezrgD3hPe/s/dAZRfVx6g9Ux2ZOLgqV57kT3X7
|
||||
6paEz3jrIMvuoXQCsi9Qh+eJQ23/sAcc7OHQ7uD8QJVudEBnSHQ+ttvOPXhr7tba
|
||||
8NuNVa6E/KewkKHRAZqBTJolCVyPtWmvfaDwdJtunCvyR1w3Rv1adZLK4YRFz+vc
|
||||
sOMK+K1c2aojA+/Fnba19inNq13j6Dwqmq8Ho7MZwHECgYEA6aSx7/93S1VGpxQ9
|
||||
KqFE4Fy9ylliC/hanc9qOcfEIo0tDus9lfpuPp+aOXML0msVkIfhCnaru32qtnaI
|
||||
AQkIbPhSZFvC/i6BibpArXINbDzTS/46zZHehXskjWFGw+iRm/YI7MBuCmWzSnFO
|
||||
YUwSKRIPKZKyXswFzP8RsQO/QbsCgYEA1k5SamQheuKdo/X40ShWTTOoDlpL4Sir
|
||||
b2zTnEqlHyMv8c7w880hPf4P+0pqrKyf7jmEykJvp1qSAmyMUCWzrKTr8gQ2sMyb
|
||||
zj90cEm++M5YIQh5lPJy4pGqmCliJXqkt+zT1xmnRASwMNQOnU2bBmXkve/ofb4M
|
||||
dEwyig/nZFcCgYBLWPilTD6dhce+NBGxwMZkkKQIMKEk+RfIEs7QCXNgLSUdzZFT
|
||||
36pT+caTxl1Go5AVxyw04qZpVZKLO1iK9O3Jrp9rjAgrTrYpw23+QWzAvjDqLfeq
|
||||
ueMIKvlTus5GeacTo9mm+DvEkJ2sYTQEvrKQmilXn950IdmxDYUYD/xK5wKBgQDQ
|
||||
5ON9BUGFUSQsUHVLG7CT7EhiRS41ubjyEfhrHm+53Ei9weQpIcjHbsERR8aXrmTu
|
||||
h26i4QOI88XjSv+ymC19mfzLmcPdrnQpJL1RPvFCAZDyEhrBT1sg8rCBRcV/lv68
|
||||
scMEpuLecFt2HR5pwt3b7LJ9Wj8bYoctTaDt5va8XQKBgQDCr4hZB5haAcKmNm/g
|
||||
PjlaLdrDEIuuBjxMzX1t3PXwsEene1cE731v6fbmrDUa8AuJyMY80xhGrTTDQfS3
|
||||
QOu/6wtcUv/JC/06OwEaUlT/kdYek+zYfBm3b1sKP3HVKSxCLTcPcC4aQoAFqbEy
|
||||
3kuSVh03vVBdaP//qMPyeue17w==
|
||||
-----END PRIVATE KEY-----
|
||||
@@ -369,3 +369,9 @@ REQMASK=MASK:0x800 ./mkcert.sh req badalt7-key "O = Bad NC Test Certificate 7" \
|
||||
OPENSSL_KEYALG=ec OPENSSL_KEYBITS=brainpoolP256r1 ./mkcert.sh genee \
|
||||
"Server ECDSA brainpoolP256r1 cert" server-ecdsa-brainpoolP256r1-key \
|
||||
server-ecdsa-brainpoolP256r1-cert rootkey rootcert
|
||||
|
||||
openssl req -new -nodes -subj "/CN=localhost" \
|
||||
-newkey rsa-pss -keyout server-pss-restrict-key.pem \
|
||||
-pkeyopt rsa_pss_keygen_md:sha256 -pkeyopt rsa_pss_keygen_saltlen:32 | \
|
||||
./mkcert.sh geneenocsr "Server RSA-PSS restricted cert" \
|
||||
server-pss-restrict-cert rootkey rootcert
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <openssl/err.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "../ssl/packet_locl.h"
|
||||
#include "internal/packet.h"
|
||||
|
||||
#include "testutil.h"
|
||||
|
||||
@@ -89,6 +89,7 @@ static int test_client_hello(int currtest)
|
||||
case TEST_SET_SESSION_TICK_DATA_VER_NEG:
|
||||
#if !defined(OPENSSL_NO_TLS1_3) && defined(OPENSSL_NO_TLS1_2)
|
||||
/* TLSv1.3 is enabled and TLSv1.2 is disabled so can't do this test */
|
||||
SSL_CTX_free(ctx);
|
||||
return 1;
|
||||
#else
|
||||
/* Testing for session tickets <= TLS1.2; not relevant for 1.3 */
|
||||
|
||||
+2
-21
@@ -87,29 +87,10 @@ static void tear_down(CT_TEST_FIXTURE *fixture)
|
||||
OPENSSL_free(fixture);
|
||||
}
|
||||
|
||||
static char *mk_file_path(const char *dir, const char *file)
|
||||
{
|
||||
# ifndef OPENSSL_SYS_VMS
|
||||
const char *sep = "/";
|
||||
# else
|
||||
const char *sep = "";
|
||||
# endif
|
||||
size_t len = strlen(dir) + strlen(sep) + strlen(file) + 1;
|
||||
char *full_file = OPENSSL_zalloc(len);
|
||||
|
||||
if (full_file != NULL) {
|
||||
OPENSSL_strlcpy(full_file, dir, len);
|
||||
OPENSSL_strlcat(full_file, sep, len);
|
||||
OPENSSL_strlcat(full_file, file, len);
|
||||
}
|
||||
|
||||
return full_file;
|
||||
}
|
||||
|
||||
static X509 *load_pem_cert(const char *dir, const char *file)
|
||||
{
|
||||
X509 *cert = NULL;
|
||||
char *file_path = mk_file_path(dir, file);
|
||||
char *file_path = test_mk_file_path(dir, file);
|
||||
|
||||
if (file_path != NULL) {
|
||||
BIO *cert_io = BIO_new_file(file_path, "r");
|
||||
@@ -127,7 +108,7 @@ static int read_text_file(const char *dir, const char *file,
|
||||
char *buffer, int buffer_length)
|
||||
{
|
||||
int len = -1;
|
||||
char *file_path = mk_file_path(dir, file);
|
||||
char *file_path = test_mk_file_path(dir, file);
|
||||
|
||||
if (file_path != NULL) {
|
||||
BIO *file_io = BIO_new_file(file_path, "r");
|
||||
|
||||
@@ -600,38 +600,38 @@ static int test_ed448(void)
|
||||
EVP_MD_CTX *hashctx = EVP_MD_CTX_new();
|
||||
|
||||
if (!TEST_ptr(hashctx)
|
||||
|| !TEST_true(ED448_sign(outsig, NULL, 0, pubkey1, privkey1, NULL,
|
||||
0))
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, NULL, 0, pubkey1, privkey1,
|
||||
NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(sig1, outsig, sizeof(sig1)), 0)
|
||||
|| !TEST_true(ED448_sign(outsig, msg2, sizeof(msg2), pubkey2,
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, msg2, sizeof(msg2), pubkey2,
|
||||
privkey2, NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(sig2, outsig, sizeof(sig2)), 0)
|
||||
|| !TEST_true(ED448_sign(outsig, msg3, sizeof(msg3), pubkey3,
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, msg3, sizeof(msg3), pubkey3,
|
||||
privkey3, context3, sizeof(context3)))
|
||||
|| !TEST_int_eq(memcmp(sig3, outsig, sizeof(sig3)), 0)
|
||||
|| !TEST_true(ED448_sign(outsig, msg4, sizeof(msg4), pubkey4,
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, msg4, sizeof(msg4), pubkey4,
|
||||
privkey4, NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(sig4, outsig, sizeof(sig4)), 0)
|
||||
|| !TEST_true(ED448_sign(outsig, msg5, sizeof(msg5), pubkey5,
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, msg5, sizeof(msg5), pubkey5,
|
||||
privkey5, NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(sig5, outsig, sizeof(sig5)), 0)
|
||||
|| !TEST_true(ED448_sign(outsig, msg6, sizeof(msg6), pubkey6,
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, msg6, sizeof(msg6), pubkey6,
|
||||
privkey6, NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(sig6, outsig, sizeof(sig6)), 0)
|
||||
|| !TEST_true(ED448_sign(outsig, msg7, sizeof(msg7), pubkey7,
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, msg7, sizeof(msg7), pubkey7,
|
||||
privkey7, NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(sig7, outsig, sizeof(sig7)), 0)
|
||||
|| !TEST_true(ED448_sign(outsig, msg8, sizeof(msg8), pubkey8,
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, msg8, sizeof(msg8), pubkey8,
|
||||
privkey8, NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(sig8, outsig, sizeof(sig8)), 0)
|
||||
|| !TEST_true(ED448_sign(outsig, msg9, sizeof(msg9), pubkey9,
|
||||
|| !TEST_true(ED448_sign(NULL, outsig, msg9, sizeof(msg9), pubkey9,
|
||||
privkey9, NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(sig9, outsig, sizeof(sig9)), 0)
|
||||
|| !TEST_true(ED448ph_sign(outsig, dohash(hashctx, phmsg1,
|
||||
|| !TEST_true(ED448ph_sign(NULL, outsig, dohash(hashctx, phmsg1,
|
||||
sizeof(phmsg1)), phpubkey1, phprivkey1,
|
||||
NULL, 0))
|
||||
|| !TEST_int_eq(memcmp(phsig1, outsig, sizeof(phsig1)), 0)
|
||||
|| !TEST_true(ED448ph_sign(outsig, dohash(hashctx, phmsg2,
|
||||
|| !TEST_true(ED448ph_sign(NULL, outsig, dohash(hashctx, phmsg2,
|
||||
sizeof(phmsg2)), phpubkey2, phprivkey2,
|
||||
phcontext2, sizeof(phcontext2)))
|
||||
|| !TEST_int_eq(memcmp(phsig2, outsig, sizeof(phsig2)), 0)) {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
openssl_conf = openssl_init
|
||||
|
||||
.include fipsinstall.conf
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
default = default_sect
|
||||
fips = fips_sect
|
||||
|
||||
[default_sect]
|
||||
activate = 1
|
||||
@@ -0,0 +1,14 @@
|
||||
openssl_conf = openssl_init
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
default = default_sect
|
||||
legacy = legacy_sect
|
||||
|
||||
[default_sect]
|
||||
activate = 1
|
||||
|
||||
[legacy_sect]
|
||||
activate = 1
|
||||
@@ -0,0 +1,10 @@
|
||||
openssl_conf = openssl_init
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
default = default_sect
|
||||
|
||||
[default_sect]
|
||||
activate = 1
|
||||
+89
-21
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/obj_mac.h>
|
||||
#include "testutil.h"
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
@@ -62,6 +63,22 @@ static int dh_test(void)
|
||||
|| !TEST_true(DH_set0_pqg(dh, p, q, g)))
|
||||
goto err1;
|
||||
|
||||
/* check fails, because p is way too small */
|
||||
if (!DH_check(dh, &i))
|
||||
goto err2;
|
||||
i ^= DH_MODULUS_TOO_SMALL;
|
||||
if (!TEST_false(i & DH_CHECK_P_NOT_PRIME)
|
||||
|| !TEST_false(i & DH_CHECK_P_NOT_SAFE_PRIME)
|
||||
|| !TEST_false(i & DH_UNABLE_TO_CHECK_GENERATOR)
|
||||
|| !TEST_false(i & DH_NOT_SUITABLE_GENERATOR)
|
||||
|| !TEST_false(i & DH_CHECK_Q_NOT_PRIME)
|
||||
|| !TEST_false(i & DH_CHECK_INVALID_Q_VALUE)
|
||||
|| !TEST_false(i & DH_CHECK_INVALID_J_VALUE)
|
||||
|| !TEST_false(i & DH_MODULUS_TOO_SMALL)
|
||||
|| !TEST_false(i & DH_MODULUS_TOO_LARGE)
|
||||
|| !TEST_false(i))
|
||||
goto err2;
|
||||
|
||||
/* test the combined getter for p, q, and g */
|
||||
DH_get0_pqg(dh, &p2, &q2, &g2);
|
||||
if (!TEST_ptr_eq(p2, p)
|
||||
@@ -91,25 +108,12 @@ static int dh_test(void)
|
||||
|| !TEST_ptr_eq(DH_get0_priv_key(dh), priv_key2))
|
||||
goto err3;
|
||||
|
||||
/* now generate a key pair ... */
|
||||
if (!DH_generate_key(dh))
|
||||
/* now generate a key pair (expect failure since modulus is too small) */
|
||||
if (!TEST_false(DH_generate_key(dh)))
|
||||
goto err3;
|
||||
|
||||
/* ... and check whether the private key was reused: */
|
||||
|
||||
/* test it with the combined getter for pub_key and priv_key */
|
||||
DH_get0_key(dh, &pub_key2, &priv_key2);
|
||||
if (!TEST_ptr(pub_key2)
|
||||
|| !TEST_ptr_eq(priv_key2, priv_key))
|
||||
goto err3;
|
||||
|
||||
/* test it the simple getters for pub_key and priv_key */
|
||||
if (!TEST_ptr_eq(DH_get0_pub_key(dh), pub_key2)
|
||||
|| !TEST_ptr_eq(DH_get0_priv_key(dh), priv_key2))
|
||||
goto err3;
|
||||
|
||||
/* check whether the public key was calculated correctly */
|
||||
TEST_uint_eq(BN_get_word(pub_key2), 3331L);
|
||||
/* We'll have a stale error on the queue from the above test so clear it */
|
||||
ERR_clear_error();
|
||||
|
||||
/*
|
||||
* II) key generation
|
||||
@@ -120,7 +124,7 @@ static int dh_test(void)
|
||||
goto err3;
|
||||
BN_GENCB_set(_cb, &cb, NULL);
|
||||
if (!TEST_ptr(a = DH_new())
|
||||
|| !TEST_true(DH_generate_parameters_ex(a, 64,
|
||||
|| !TEST_true(DH_generate_parameters_ex(a, 512,
|
||||
DH_GENERATOR_5, _cb)))
|
||||
goto err3;
|
||||
|
||||
@@ -130,7 +134,13 @@ static int dh_test(void)
|
||||
if (!TEST_false(i & DH_CHECK_P_NOT_PRIME)
|
||||
|| !TEST_false(i & DH_CHECK_P_NOT_SAFE_PRIME)
|
||||
|| !TEST_false(i & DH_UNABLE_TO_CHECK_GENERATOR)
|
||||
|| !TEST_false(i & DH_NOT_SUITABLE_GENERATOR))
|
||||
|| !TEST_false(i & DH_NOT_SUITABLE_GENERATOR)
|
||||
|| !TEST_false(i & DH_CHECK_Q_NOT_PRIME)
|
||||
|| !TEST_false(i & DH_CHECK_INVALID_Q_VALUE)
|
||||
|| !TEST_false(i & DH_CHECK_INVALID_J_VALUE)
|
||||
|| !TEST_false(i & DH_MODULUS_TOO_SMALL)
|
||||
|| !TEST_false(i & DH_MODULUS_TOO_LARGE)
|
||||
|| !TEST_false(i))
|
||||
goto err3;
|
||||
|
||||
DH_get0_pqg(a, &ap, NULL, &ag);
|
||||
@@ -179,7 +189,7 @@ static int dh_test(void)
|
||||
|| !TEST_true((cout = DH_compute_key(cbuf, apub_key, c)) != -1))
|
||||
goto err3;
|
||||
|
||||
if (!TEST_true(aout >= 4)
|
||||
if (!TEST_true(aout >= 20)
|
||||
|| !TEST_mem_eq(abuf, aout, bbuf, bout)
|
||||
|| !TEST_mem_eq(abuf, aout, cbuf, cout))
|
||||
goto err3;
|
||||
@@ -609,6 +619,63 @@ static int rfc5114_test(void)
|
||||
TEST_error("Test failed RFC5114 set %d\n", i + 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rfc7919_test(void)
|
||||
{
|
||||
DH *a = NULL, *b = NULL;
|
||||
const BIGNUM *apub_key = NULL, *bpub_key = NULL;
|
||||
unsigned char *abuf = NULL;
|
||||
unsigned char *bbuf = NULL;
|
||||
int i, alen, blen, aout, bout;
|
||||
int ret = 0;
|
||||
|
||||
if (!TEST_ptr(a = DH_new_by_nid(NID_ffdhe2048)))
|
||||
goto err;
|
||||
|
||||
if (!DH_check(a, &i))
|
||||
goto err;
|
||||
if (!TEST_false(i & DH_CHECK_P_NOT_PRIME)
|
||||
|| !TEST_false(i & DH_CHECK_P_NOT_SAFE_PRIME)
|
||||
|| !TEST_false(i & DH_UNABLE_TO_CHECK_GENERATOR)
|
||||
|| !TEST_false(i & DH_NOT_SUITABLE_GENERATOR)
|
||||
|| !TEST_false(i))
|
||||
goto err;
|
||||
|
||||
if (!DH_generate_key(a))
|
||||
goto err;
|
||||
DH_get0_key(a, &apub_key, NULL);
|
||||
|
||||
/* now create another copy of the DH group for the peer */
|
||||
if (!TEST_ptr(b = DH_new_by_nid(NID_ffdhe2048)))
|
||||
goto err;
|
||||
|
||||
if (!DH_generate_key(b))
|
||||
goto err;
|
||||
DH_get0_key(b, &bpub_key, NULL);
|
||||
|
||||
alen = DH_size(a);
|
||||
if (!TEST_ptr(abuf = OPENSSL_malloc(alen))
|
||||
|| !TEST_true((aout = DH_compute_key(abuf, bpub_key, a)) != -1))
|
||||
goto err;
|
||||
|
||||
blen = DH_size(b);
|
||||
if (!TEST_ptr(bbuf = OPENSSL_malloc(blen))
|
||||
|| !TEST_true((bout = DH_compute_key(bbuf, apub_key, b)) != -1))
|
||||
goto err;
|
||||
|
||||
if (!TEST_true(aout >= 20)
|
||||
|| !TEST_mem_eq(abuf, aout, bbuf, bout))
|
||||
goto err;
|
||||
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
OPENSSL_free(abuf);
|
||||
OPENSSL_free(bbuf);
|
||||
DH_free(a);
|
||||
DH_free(b);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -619,6 +686,7 @@ int setup_tests(void)
|
||||
#else
|
||||
ADD_TEST(dh_test);
|
||||
ADD_TEST(rfc5114_test);
|
||||
ADD_TEST(rfc7919_test);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ static int test_cavs_kats(const struct drbg_kat *test[], int i)
|
||||
if (!single_kat_pr_true(td))
|
||||
goto err;
|
||||
break;
|
||||
default: /* cant happen */
|
||||
default: /* cant happen */
|
||||
goto err;
|
||||
}
|
||||
rv = 1;
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(OPENSSL_SYS_UNIX)
|
||||
# include <sys/types.h>
|
||||
# include <sys/wait.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "testutil.h"
|
||||
#include "drbgtest.h"
|
||||
|
||||
@@ -708,6 +715,40 @@ static int test_drbg_reseed(int expect_success,
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#if defined(OPENSSL_SYS_UNIX)
|
||||
/*
|
||||
* Test whether master, public and private DRBG are reseeded after
|
||||
* forking the process.
|
||||
*/
|
||||
static int test_drbg_reseed_after_fork(RAND_DRBG *master,
|
||||
RAND_DRBG *public,
|
||||
RAND_DRBG *private)
|
||||
{
|
||||
pid_t pid;
|
||||
int status=0;
|
||||
|
||||
pid = fork();
|
||||
if (!TEST_int_ge(pid, 0))
|
||||
return 0;
|
||||
|
||||
if (pid > 0) {
|
||||
/* I'm the parent; wait for the child and check its exit code */
|
||||
return TEST_int_eq(waitpid(pid, &status, 0), pid) && TEST_int_eq(status, 0);
|
||||
}
|
||||
|
||||
/* I'm the child; check whether all three DRBGs reseed. */
|
||||
if (!TEST_true(test_drbg_reseed(1, master, public, private, 1, 1, 1, 0)))
|
||||
status = 1;
|
||||
|
||||
/* Remove hooks */
|
||||
unhook_drbg(master);
|
||||
unhook_drbg(public);
|
||||
unhook_drbg(private);
|
||||
exit(status);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Test whether the default rand_method (RAND_OpenSSL()) is
|
||||
* setup correctly, in particular whether reseeding works
|
||||
@@ -798,6 +839,10 @@ static int test_rand_drbg_reseed(void)
|
||||
goto error;
|
||||
reset_drbg_hook_ctx();
|
||||
|
||||
#if defined(OPENSSL_SYS_UNIX)
|
||||
if (!TEST_true(test_drbg_reseed_after_fork(master, public, private)))
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
/* fill 'randomness' buffer with some arbitrary data */
|
||||
memset(rand_add_buf, 'r', sizeof(rand_add_buf));
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ int setup_tests(void)
|
||||
break;
|
||||
default:
|
||||
case OPT_ERR:
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+474
-33
@@ -1625,22 +1625,22 @@ static int check_named_curve_test(int id)
|
||||
}
|
||||
|
||||
/* Passes because this is a valid curve */
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(group, 0), nid)
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(group, 0, NULL), nid)
|
||||
/* Only NIST curves pass */
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(group, 1),
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(group, 1, NULL),
|
||||
EC_curve_nid2nist(nid) != NULL ? nid : NID_undef))
|
||||
goto err;
|
||||
|
||||
/* Fail if the curve name doesn't match the parameters */
|
||||
EC_GROUP_set_curve_name(group, nid + 1);
|
||||
ERR_set_mark();
|
||||
if (!TEST_int_le(EC_GROUP_check_named_curve(group, 0), 0))
|
||||
if (!TEST_int_le(EC_GROUP_check_named_curve(group, 0, NULL), 0))
|
||||
goto err;
|
||||
ERR_pop_to_mark();
|
||||
|
||||
/* Restore curve name and ensure it's passing */
|
||||
EC_GROUP_set_curve_name(group, nid);
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(group, 0), nid))
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(group, 0, NULL), nid))
|
||||
goto err;
|
||||
|
||||
if (!TEST_int_eq(EC_GROUP_set_seed(group, invalid_seed, invalid_seed_len),
|
||||
@@ -1652,47 +1652,46 @@ static int check_named_curve_test(int id)
|
||||
* If the built-in curve has a seed and we set the seed to another value
|
||||
* then it will fail the check.
|
||||
*/
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(group, 0), 0))
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(group, 0, NULL), 0))
|
||||
goto err;
|
||||
} else {
|
||||
/*
|
||||
* If the built-in curve does not have a seed then setting the seed will
|
||||
* pass the check (as the seed is optional).
|
||||
*/
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(group, 0), nid))
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(group, 0, NULL), nid))
|
||||
goto err;
|
||||
}
|
||||
/* Pass if the seed is unknown (as it is optional) */
|
||||
if (!TEST_int_eq(EC_GROUP_set_seed(group, NULL, 0), 1)
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(group, 0), nid))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(group, 0, NULL), nid))
|
||||
goto err;
|
||||
|
||||
/* Check that a duped group passes */
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0), nid))
|
||||
if (!TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), nid))
|
||||
goto err;
|
||||
|
||||
/* check that changing any generator parameter fails */
|
||||
if (!TEST_true(EC_GROUP_set_generator(gtest, other_gen, group_order,
|
||||
group_cofactor))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0), 0)
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), 0)
|
||||
|| !TEST_true(EC_GROUP_set_generator(gtest, group_gen, other_order,
|
||||
group_cofactor))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0), 0)
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), 0)
|
||||
/* The order is not an optional field, so this should fail */
|
||||
|| !TEST_true(EC_GROUP_set_generator(gtest, group_gen, NULL,
|
||||
group_cofactor))
|
||||
|| !TEST_int_le(EC_GROUP_check_named_curve(gtest, 0), 0)
|
||||
|| !TEST_false(EC_GROUP_set_generator(gtest, group_gen, NULL,
|
||||
group_cofactor))
|
||||
|| !TEST_true(EC_GROUP_set_generator(gtest, group_gen, group_order,
|
||||
other_cofactor))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0), 0)
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), 0)
|
||||
/* Check that if the cofactor is not set then it still passes */
|
||||
|| !TEST_true(EC_GROUP_set_generator(gtest, group_gen, group_order,
|
||||
NULL))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0), nid)
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), nid)
|
||||
/* check that restoring the generator passes */
|
||||
|| !TEST_true(EC_GROUP_set_generator(gtest, group_gen, group_order,
|
||||
group_cofactor))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0), nid))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), nid))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
@@ -1704,7 +1703,7 @@ static int check_named_curve_test(int id)
|
||||
*/
|
||||
ERR_set_mark();
|
||||
if (EC_GROUP_set_curve(gtest, other_p, group_a, group_b, NULL)) {
|
||||
if (!TEST_int_le(EC_GROUP_check_named_curve(gtest, 0), 0))
|
||||
if (!TEST_int_le(EC_GROUP_check_named_curve(gtest, 0, NULL), 0))
|
||||
goto err;
|
||||
} else {
|
||||
/* clear the error stack if EC_GROUP_set_curve() failed */
|
||||
@@ -1712,7 +1711,7 @@ static int check_named_curve_test(int id)
|
||||
ERR_set_mark();
|
||||
}
|
||||
if (EC_GROUP_set_curve(gtest, group_p, other_a, group_b, NULL)) {
|
||||
if (!TEST_int_le(EC_GROUP_check_named_curve(gtest, 0), 0))
|
||||
if (!TEST_int_le(EC_GROUP_check_named_curve(gtest, 0, NULL), 0))
|
||||
goto err;
|
||||
} else {
|
||||
/* clear the error stack if EC_GROUP_set_curve() failed */
|
||||
@@ -1720,7 +1719,7 @@ static int check_named_curve_test(int id)
|
||||
ERR_set_mark();
|
||||
}
|
||||
if (EC_GROUP_set_curve(gtest, group_p, group_a, other_b, NULL)) {
|
||||
if (!TEST_int_le(EC_GROUP_check_named_curve(gtest, 0), 0))
|
||||
if (!TEST_int_le(EC_GROUP_check_named_curve(gtest, 0, NULL), 0))
|
||||
goto err;
|
||||
} else {
|
||||
/* clear the error stack if EC_GROUP_set_curve() failed */
|
||||
@@ -1731,7 +1730,7 @@ static int check_named_curve_test(int id)
|
||||
|
||||
/* Check that restoring the curve parameters passes */
|
||||
if (!TEST_true(EC_GROUP_set_curve(gtest, group_p, group_a, group_b, NULL))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0), nid))
|
||||
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), nid))
|
||||
goto err;
|
||||
|
||||
ret = 1;
|
||||
@@ -1778,7 +1777,7 @@ static int check_named_curve_lookup_test(int id)
|
||||
if (!TEST_ptr(g = EC_GROUP_new_from_ecparameters(p)))
|
||||
goto err;
|
||||
|
||||
if (!TEST_int_gt(rv = EC_GROUP_check_named_curve(g, 0), 0))
|
||||
if (!TEST_int_gt(rv = EC_GROUP_check_named_curve(g, 0, NULL), 0))
|
||||
goto err;
|
||||
if (rv != nid) {
|
||||
/*
|
||||
@@ -1813,6 +1812,272 @@ static int check_named_curve_lookup_test(int id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sometime we cannot compare nids for equality, as the built-in curve table
|
||||
* includes aliases with different names for the same curve.
|
||||
*
|
||||
* This function returns TRUE (1) if the checked nids are identical, or if they
|
||||
* alias to the same curve. FALSE (0) otherwise.
|
||||
*/
|
||||
static ossl_inline
|
||||
int are_ec_nids_compatible(int n1d, int n2d)
|
||||
{
|
||||
int ret = 0;
|
||||
switch (n1d) {
|
||||
# ifndef OPENSSL_NO_EC2M
|
||||
case NID_sect113r1:
|
||||
case NID_wap_wsg_idm_ecid_wtls4:
|
||||
ret = (n2d == NID_sect113r1 || n2d == NID_wap_wsg_idm_ecid_wtls4);
|
||||
break;
|
||||
case NID_sect163k1:
|
||||
case NID_wap_wsg_idm_ecid_wtls3:
|
||||
ret = (n2d == NID_sect163k1 || n2d == NID_wap_wsg_idm_ecid_wtls3);
|
||||
break;
|
||||
case NID_sect233k1:
|
||||
case NID_wap_wsg_idm_ecid_wtls10:
|
||||
ret = (n2d == NID_sect233k1 || n2d == NID_wap_wsg_idm_ecid_wtls10);
|
||||
break;
|
||||
case NID_sect233r1:
|
||||
case NID_wap_wsg_idm_ecid_wtls11:
|
||||
ret = (n2d == NID_sect233r1 || n2d == NID_wap_wsg_idm_ecid_wtls11);
|
||||
break;
|
||||
case NID_X9_62_c2pnb163v1:
|
||||
case NID_wap_wsg_idm_ecid_wtls5:
|
||||
ret = (n2d == NID_X9_62_c2pnb163v1
|
||||
|| n2d == NID_wap_wsg_idm_ecid_wtls5);
|
||||
break;
|
||||
# endif /* OPENSSL_NO_EC2M */
|
||||
case NID_secp112r1:
|
||||
case NID_wap_wsg_idm_ecid_wtls6:
|
||||
ret = (n2d == NID_secp112r1 || n2d == NID_wap_wsg_idm_ecid_wtls6);
|
||||
break;
|
||||
case NID_secp160r2:
|
||||
case NID_wap_wsg_idm_ecid_wtls7:
|
||||
ret = (n2d == NID_secp160r2 || n2d == NID_wap_wsg_idm_ecid_wtls7);
|
||||
break;
|
||||
# ifdef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
case NID_secp224r1:
|
||||
case NID_wap_wsg_idm_ecid_wtls12:
|
||||
ret = (n2d == NID_secp224r1 || n2d == NID_wap_wsg_idm_ecid_wtls12);
|
||||
break;
|
||||
# else
|
||||
/*
|
||||
* For SEC P-224 we want to ensure that the SECP nid is returned, as
|
||||
* that is associated with a specialized method.
|
||||
*/
|
||||
case NID_wap_wsg_idm_ecid_wtls12:
|
||||
ret = (n2d == NID_secp224r1);
|
||||
break;
|
||||
# endif /* def(OPENSSL_NO_EC_NISTP_64_GCC_128) */
|
||||
|
||||
default:
|
||||
ret = (n1d == n2d);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* This checks that EC_GROUP_bew_from_ecparameters() returns a "named"
|
||||
* EC_GROUP for built-in curves.
|
||||
*
|
||||
* Note that it is possible to retrieve an alternative alias that does not match
|
||||
* the original nid.
|
||||
*
|
||||
* Ensure that the OPENSSL_EC_EXPLICIT_CURVE ASN1 flag is set.
|
||||
*/
|
||||
static int check_named_curve_from_ecparameters(int id)
|
||||
{
|
||||
int ret = 0, nid, tnid;
|
||||
EC_GROUP *group = NULL, *tgroup = NULL, *tmpg = NULL;
|
||||
const EC_POINT *group_gen = NULL;
|
||||
EC_POINT *other_gen = NULL;
|
||||
BIGNUM *group_cofactor = NULL, *other_cofactor = NULL;
|
||||
BIGNUM *other_gen_x = NULL, *other_gen_y = NULL;
|
||||
const BIGNUM *group_order = NULL;
|
||||
BIGNUM *other_order = NULL;
|
||||
BN_CTX *bn_ctx = NULL;
|
||||
static const unsigned char invalid_seed[] = "THIS IS NOT A VALID SEED";
|
||||
static size_t invalid_seed_len = sizeof(invalid_seed);
|
||||
ECPARAMETERS *params = NULL, *other_params = NULL;
|
||||
EC_GROUP *g_ary[8] = {NULL};
|
||||
EC_GROUP **g_next = &g_ary[0];
|
||||
ECPARAMETERS *p_ary[8] = {NULL};
|
||||
ECPARAMETERS **p_next = &p_ary[0];
|
||||
|
||||
/* Do some setup */
|
||||
nid = curves[id].nid;
|
||||
TEST_note("Curve %s", OBJ_nid2sn(nid));
|
||||
if (!TEST_ptr(bn_ctx = BN_CTX_new()))
|
||||
return ret;
|
||||
BN_CTX_start(bn_ctx);
|
||||
|
||||
if (/* Allocations */
|
||||
!TEST_ptr(group_cofactor = BN_CTX_get(bn_ctx))
|
||||
|| !TEST_ptr(other_gen_x = BN_CTX_get(bn_ctx))
|
||||
|| !TEST_ptr(other_gen_y = BN_CTX_get(bn_ctx))
|
||||
|| !TEST_ptr(other_order = BN_CTX_get(bn_ctx))
|
||||
|| !TEST_ptr(other_cofactor = BN_CTX_get(bn_ctx))
|
||||
/* Generate reference group and params */
|
||||
|| !TEST_ptr(group = EC_GROUP_new_by_curve_name(nid))
|
||||
|| !TEST_ptr(params = EC_GROUP_get_ecparameters(group, NULL))
|
||||
|| !TEST_ptr(group_gen = EC_GROUP_get0_generator(group))
|
||||
|| !TEST_ptr(group_order = EC_GROUP_get0_order(group))
|
||||
|| !TEST_true(EC_GROUP_get_cofactor(group, group_cofactor, NULL))
|
||||
/* compute `other_*` values */
|
||||
|| !TEST_ptr(tmpg = EC_GROUP_dup(group))
|
||||
|| !TEST_ptr(other_gen = EC_POINT_dup(group_gen, group))
|
||||
|| !TEST_true(EC_POINT_add(group, other_gen, group_gen, group_gen, NULL))
|
||||
|| !TEST_true(EC_POINT_get_affine_coordinates(group, other_gen,
|
||||
other_gen_x, other_gen_y, bn_ctx))
|
||||
|| !TEST_true(BN_copy(other_order, group_order))
|
||||
|| !TEST_true(BN_add_word(other_order, 1))
|
||||
|| !TEST_true(BN_copy(other_cofactor, group_cofactor))
|
||||
|| !TEST_true(BN_add_word(other_cofactor, 1)))
|
||||
goto err;
|
||||
|
||||
EC_POINT_free(other_gen);
|
||||
other_gen = NULL;
|
||||
|
||||
if (!TEST_ptr(other_gen = EC_POINT_new(tmpg))
|
||||
|| !TEST_true(EC_POINT_set_affine_coordinates(tmpg, other_gen,
|
||||
other_gen_x, other_gen_y,
|
||||
bn_ctx)))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* ###########################
|
||||
* # Actual tests start here #
|
||||
* ###########################
|
||||
*/
|
||||
|
||||
/*
|
||||
* Creating a group from built-in explicit parameters returns a
|
||||
* "named" EC_GROUP
|
||||
*/
|
||||
if (!TEST_ptr(tgroup = *g_next++ = EC_GROUP_new_from_ecparameters(params))
|
||||
|| !TEST_int_ne((tnid = EC_GROUP_get_curve_name(tgroup)), NID_undef))
|
||||
goto err;
|
||||
/*
|
||||
* We cannot always guarantee the names match, as the built-in table
|
||||
* contains aliases for the same curve with different names.
|
||||
*/
|
||||
if (!TEST_true(are_ec_nids_compatible(nid, tnid))) {
|
||||
TEST_info("nid = %s, tnid = %s", OBJ_nid2sn(nid), OBJ_nid2sn(tnid));
|
||||
goto err;
|
||||
}
|
||||
/* Ensure that the OPENSSL_EC_EXPLICIT_CURVE ASN1 flag is set. */
|
||||
if (!TEST_int_eq(EC_GROUP_get_asn1_flag(tgroup), OPENSSL_EC_EXPLICIT_CURVE))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* An invalid seed in the parameters should be ignored: expect a "named"
|
||||
* group.
|
||||
*/
|
||||
if (!TEST_int_eq(EC_GROUP_set_seed(tmpg, invalid_seed, invalid_seed_len),
|
||||
invalid_seed_len)
|
||||
|| !TEST_ptr(other_params = *p_next++ =
|
||||
EC_GROUP_get_ecparameters(tmpg, NULL))
|
||||
|| !TEST_ptr(tgroup = *g_next++ =
|
||||
EC_GROUP_new_from_ecparameters(other_params))
|
||||
|| !TEST_int_ne((tnid = EC_GROUP_get_curve_name(tgroup)), NID_undef)
|
||||
|| !TEST_true(are_ec_nids_compatible(nid, tnid))
|
||||
|| !TEST_int_eq(EC_GROUP_get_asn1_flag(tgroup),
|
||||
OPENSSL_EC_EXPLICIT_CURVE)) {
|
||||
TEST_info("nid = %s, tnid = %s", OBJ_nid2sn(nid), OBJ_nid2sn(tnid));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* A null seed in the parameters should be ignored, as it is optional:
|
||||
* expect a "named" group.
|
||||
*/
|
||||
if (!TEST_int_eq(EC_GROUP_set_seed(tmpg, NULL, 0), 1)
|
||||
|| !TEST_ptr(other_params = *p_next++ =
|
||||
EC_GROUP_get_ecparameters(tmpg, NULL))
|
||||
|| !TEST_ptr(tgroup = *g_next++ =
|
||||
EC_GROUP_new_from_ecparameters(other_params))
|
||||
|| !TEST_int_ne((tnid = EC_GROUP_get_curve_name(tgroup)), NID_undef)
|
||||
|| !TEST_true(are_ec_nids_compatible(nid, tnid))
|
||||
|| !TEST_int_eq(EC_GROUP_get_asn1_flag(tgroup),
|
||||
OPENSSL_EC_EXPLICIT_CURVE)) {
|
||||
TEST_info("nid = %s, tnid = %s", OBJ_nid2sn(nid), OBJ_nid2sn(tnid));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that changing any of the generator parameters does not yield a
|
||||
* match with the built-in curves
|
||||
*/
|
||||
if (/* Other gen, same group order & cofactor */
|
||||
!TEST_true(EC_GROUP_set_generator(tmpg, other_gen, group_order,
|
||||
group_cofactor))
|
||||
|| !TEST_ptr(other_params = *p_next++ =
|
||||
EC_GROUP_get_ecparameters(tmpg, NULL))
|
||||
|| !TEST_ptr(tgroup = *g_next++ =
|
||||
EC_GROUP_new_from_ecparameters(other_params))
|
||||
|| !TEST_int_eq((tnid = EC_GROUP_get_curve_name(tgroup)), NID_undef)
|
||||
/* Same gen & cofactor, different order */
|
||||
|| !TEST_true(EC_GROUP_set_generator(tmpg, group_gen, other_order,
|
||||
group_cofactor))
|
||||
|| !TEST_ptr(other_params = *p_next++ =
|
||||
EC_GROUP_get_ecparameters(tmpg, NULL))
|
||||
|| !TEST_ptr(tgroup = *g_next++ =
|
||||
EC_GROUP_new_from_ecparameters(other_params))
|
||||
|| !TEST_int_eq((tnid = EC_GROUP_get_curve_name(tgroup)), NID_undef)
|
||||
/* The order is not an optional field, so this should fail */
|
||||
|| !TEST_false(EC_GROUP_set_generator(tmpg, group_gen, NULL,
|
||||
group_cofactor))
|
||||
/* Check that a wrong cofactor is ignored, and we still match */
|
||||
|| !TEST_true(EC_GROUP_set_generator(tmpg, group_gen, group_order,
|
||||
other_cofactor))
|
||||
|| !TEST_ptr(other_params = *p_next++ =
|
||||
EC_GROUP_get_ecparameters(tmpg, NULL))
|
||||
|| !TEST_ptr(tgroup = *g_next++ =
|
||||
EC_GROUP_new_from_ecparameters(other_params))
|
||||
|| !TEST_int_ne((tnid = EC_GROUP_get_curve_name(tgroup)), NID_undef)
|
||||
|| !TEST_true(are_ec_nids_compatible(nid, tnid))
|
||||
|| !TEST_int_eq(EC_GROUP_get_asn1_flag(tgroup),
|
||||
OPENSSL_EC_EXPLICIT_CURVE)
|
||||
/* Check that if the cofactor is not set then it still matches */
|
||||
|| !TEST_true(EC_GROUP_set_generator(tmpg, group_gen, group_order,
|
||||
NULL))
|
||||
|| !TEST_ptr(other_params = *p_next++ =
|
||||
EC_GROUP_get_ecparameters(tmpg, NULL))
|
||||
|| !TEST_ptr(tgroup = *g_next++ =
|
||||
EC_GROUP_new_from_ecparameters(other_params))
|
||||
|| !TEST_int_ne((tnid = EC_GROUP_get_curve_name(tgroup)), NID_undef)
|
||||
|| !TEST_true(are_ec_nids_compatible(nid, tnid))
|
||||
|| !TEST_int_eq(EC_GROUP_get_asn1_flag(tgroup),
|
||||
OPENSSL_EC_EXPLICIT_CURVE)
|
||||
/* check that restoring the generator passes */
|
||||
|| !TEST_true(EC_GROUP_set_generator(tmpg, group_gen, group_order,
|
||||
group_cofactor))
|
||||
|| !TEST_ptr(other_params = *p_next++ =
|
||||
EC_GROUP_get_ecparameters(tmpg, NULL))
|
||||
|| !TEST_ptr(tgroup = *g_next++ =
|
||||
EC_GROUP_new_from_ecparameters(other_params))
|
||||
|| !TEST_int_ne((tnid = EC_GROUP_get_curve_name(tgroup)), NID_undef)
|
||||
|| !TEST_true(are_ec_nids_compatible(nid, tnid))
|
||||
|| !TEST_int_eq(EC_GROUP_get_asn1_flag(tgroup),
|
||||
OPENSSL_EC_EXPLICIT_CURVE))
|
||||
goto err;
|
||||
|
||||
ret = 1;
|
||||
err:
|
||||
for (g_next = &g_ary[0]; g_next < g_ary + OSSL_NELEM(g_ary); g_next++)
|
||||
EC_GROUP_free(*g_next);
|
||||
for (p_next = &p_ary[0]; p_next < p_ary + OSSL_NELEM(g_ary); p_next++)
|
||||
ECPARAMETERS_free(*p_next);
|
||||
ECPARAMETERS_free(params);
|
||||
EC_POINT_free(other_gen);
|
||||
EC_GROUP_free(tmpg);
|
||||
EC_GROUP_free(group);
|
||||
BN_CTX_end(bn_ctx);
|
||||
BN_CTX_free(bn_ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int parameter_test(void)
|
||||
{
|
||||
EC_GROUP *group = NULL, *group2 = NULL;
|
||||
@@ -1820,7 +2085,7 @@ static int parameter_test(void)
|
||||
unsigned char *buf = NULL;
|
||||
int r = 0, len;
|
||||
|
||||
if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(NID_secp224r1))
|
||||
if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(NID_secp384r1))
|
||||
|| !TEST_ptr(ecparameters = EC_GROUP_get_ecparameters(group, NULL))
|
||||
|| !TEST_ptr(group2 = EC_GROUP_new_from_ecparameters(ecparameters))
|
||||
|| !TEST_int_eq(EC_GROUP_cmp(group, group2, NULL), 0))
|
||||
@@ -1856,6 +2121,179 @@ err:
|
||||
return r;
|
||||
}
|
||||
|
||||
/*-
|
||||
* random 256-bit explicit parameters curve, cofactor absent
|
||||
* order: 0x0c38d96a9f892b88772ec2e39614a82f4f (132 bit)
|
||||
* cofactor: 0x12bc94785251297abfafddf1565100da (125 bit)
|
||||
*/
|
||||
static const unsigned char params_cf_pass[] = {
|
||||
0x30, 0x81, 0xcd, 0x02, 0x01, 0x01, 0x30, 0x2c, 0x06, 0x07, 0x2a, 0x86,
|
||||
0x48, 0xce, 0x3d, 0x01, 0x01, 0x02, 0x21, 0x00, 0xe5, 0x00, 0x1f, 0xc5,
|
||||
0xca, 0x71, 0x9d, 0x8e, 0xf7, 0x07, 0x4b, 0x48, 0x37, 0xf9, 0x33, 0x2d,
|
||||
0x71, 0xbf, 0x79, 0xe7, 0xdc, 0x91, 0xc2, 0xff, 0xb6, 0x7b, 0xc3, 0x93,
|
||||
0x44, 0x88, 0xe6, 0x91, 0x30, 0x44, 0x04, 0x20, 0xe5, 0x00, 0x1f, 0xc5,
|
||||
0xca, 0x71, 0x9d, 0x8e, 0xf7, 0x07, 0x4b, 0x48, 0x37, 0xf9, 0x33, 0x2d,
|
||||
0x71, 0xbf, 0x79, 0xe7, 0xdc, 0x91, 0xc2, 0xff, 0xb6, 0x7b, 0xc3, 0x93,
|
||||
0x44, 0x88, 0xe6, 0x8e, 0x04, 0x20, 0x18, 0x8c, 0x59, 0x57, 0xc4, 0xbc,
|
||||
0x85, 0x57, 0xc3, 0x66, 0x9f, 0x89, 0xd5, 0x92, 0x0d, 0x7e, 0x42, 0x27,
|
||||
0x07, 0x64, 0xaa, 0x26, 0xed, 0x89, 0xc4, 0x09, 0x05, 0x4d, 0xc7, 0x23,
|
||||
0x47, 0xda, 0x04, 0x41, 0x04, 0x1b, 0x6b, 0x41, 0x0b, 0xf9, 0xfb, 0x77,
|
||||
0xfd, 0x50, 0xb7, 0x3e, 0x23, 0xa3, 0xec, 0x9a, 0x3b, 0x09, 0x31, 0x6b,
|
||||
0xfa, 0xf6, 0xce, 0x1f, 0xff, 0xeb, 0x57, 0x93, 0x24, 0x70, 0xf3, 0xf4,
|
||||
0xba, 0x7e, 0xfa, 0x86, 0x6e, 0x19, 0x89, 0xe3, 0x55, 0x6d, 0x5a, 0xe9,
|
||||
0xc0, 0x3d, 0xbc, 0xfb, 0xaf, 0xad, 0xd4, 0x7e, 0xa6, 0xe5, 0xfa, 0x1a,
|
||||
0x58, 0x07, 0x9e, 0x8f, 0x0d, 0x3b, 0xf7, 0x38, 0xca, 0x02, 0x11, 0x0c,
|
||||
0x38, 0xd9, 0x6a, 0x9f, 0x89, 0x2b, 0x88, 0x77, 0x2e, 0xc2, 0xe3, 0x96,
|
||||
0x14, 0xa8, 0x2f, 0x4f
|
||||
};
|
||||
|
||||
/*-
|
||||
* random 256-bit explicit parameters curve, cofactor absent
|
||||
* order: 0x045a75c0c17228ebd9b169a10e34a22101 (131 bit)
|
||||
* cofactor: 0x2e134b4ede82649f67a2e559d361e5fe (126 bit)
|
||||
*/
|
||||
static const unsigned char params_cf_fail[] = {
|
||||
0x30, 0x81, 0xcd, 0x02, 0x01, 0x01, 0x30, 0x2c, 0x06, 0x07, 0x2a, 0x86,
|
||||
0x48, 0xce, 0x3d, 0x01, 0x01, 0x02, 0x21, 0x00, 0xc8, 0x95, 0x27, 0x37,
|
||||
0xe8, 0xe1, 0xfd, 0xcc, 0xf9, 0x6e, 0x0c, 0xa6, 0x21, 0xc1, 0x7d, 0x6b,
|
||||
0x9d, 0x44, 0x42, 0xea, 0x73, 0x4e, 0x04, 0xb6, 0xac, 0x62, 0x50, 0xd0,
|
||||
0x33, 0xc2, 0xea, 0x13, 0x30, 0x44, 0x04, 0x20, 0xc8, 0x95, 0x27, 0x37,
|
||||
0xe8, 0xe1, 0xfd, 0xcc, 0xf9, 0x6e, 0x0c, 0xa6, 0x21, 0xc1, 0x7d, 0x6b,
|
||||
0x9d, 0x44, 0x42, 0xea, 0x73, 0x4e, 0x04, 0xb6, 0xac, 0x62, 0x50, 0xd0,
|
||||
0x33, 0xc2, 0xea, 0x10, 0x04, 0x20, 0xbf, 0xa6, 0xa8, 0x05, 0x1d, 0x09,
|
||||
0xac, 0x70, 0x39, 0xbb, 0x4d, 0xb2, 0x90, 0x8a, 0x15, 0x41, 0x14, 0x1d,
|
||||
0x11, 0x86, 0x9f, 0x13, 0xa2, 0x63, 0x1a, 0xda, 0x95, 0x22, 0x4d, 0x02,
|
||||
0x15, 0x0a, 0x04, 0x41, 0x04, 0xaf, 0x16, 0x71, 0xf9, 0xc4, 0xc8, 0x59,
|
||||
0x1d, 0xa3, 0x6f, 0xe7, 0xc3, 0x57, 0xa1, 0xfa, 0x9f, 0x49, 0x7c, 0x11,
|
||||
0x27, 0x05, 0xa0, 0x7f, 0xff, 0xf9, 0xe0, 0xe7, 0x92, 0xdd, 0x9c, 0x24,
|
||||
0x8e, 0xc7, 0xb9, 0x52, 0x71, 0x3f, 0xbc, 0x7f, 0x6a, 0x9f, 0x35, 0x70,
|
||||
0xe1, 0x27, 0xd5, 0x35, 0x8a, 0x13, 0xfa, 0xa8, 0x33, 0x3e, 0xd4, 0x73,
|
||||
0x1c, 0x14, 0x58, 0x9e, 0xc7, 0x0a, 0x87, 0x65, 0x8d, 0x02, 0x11, 0x04,
|
||||
0x5a, 0x75, 0xc0, 0xc1, 0x72, 0x28, 0xeb, 0xd9, 0xb1, 0x69, 0xa1, 0x0e,
|
||||
0x34, 0xa2, 0x21, 0x01
|
||||
};
|
||||
|
||||
/*-
|
||||
* Test two random 256-bit explicit parameters curves with absent cofactor.
|
||||
* The two curves are chosen to roughly straddle the bounds at which the lib
|
||||
* can compute the cofactor automatically, roughly 4*sqrt(p). So test that:
|
||||
*
|
||||
* - params_cf_pass: order is sufficiently close to p to compute cofactor
|
||||
* - params_cf_fail: order is too far away from p to compute cofactor
|
||||
*
|
||||
* For standards-compliant curves, cofactor is chosen as small as possible.
|
||||
* So you can see neither of these curves are fit for cryptographic use.
|
||||
*
|
||||
* Some standards even mandate an upper bound on the cofactor, e.g. SECG1 v2:
|
||||
* h <= 2**(t/8) where t is the security level of the curve, for which the lib
|
||||
* will always succeed in computing the cofactor. Neither of these curves
|
||||
* conform to that -- this is just robustness testing.
|
||||
*/
|
||||
static int cofactor_range_test(void)
|
||||
{
|
||||
EC_GROUP *group = NULL;
|
||||
BIGNUM *cf = NULL;
|
||||
int ret = 0;
|
||||
const unsigned char *b1 = (const unsigned char *)params_cf_fail;
|
||||
const unsigned char *b2 = (const unsigned char *)params_cf_pass;
|
||||
|
||||
if (!TEST_ptr(group = d2i_ECPKParameters(NULL, &b1, sizeof(params_cf_fail)))
|
||||
|| !TEST_BN_eq_zero(EC_GROUP_get0_cofactor(group))
|
||||
|| !TEST_ptr(group = d2i_ECPKParameters(&group, &b2,
|
||||
sizeof(params_cf_pass)))
|
||||
|| !TEST_int_gt(BN_hex2bn(&cf, "12bc94785251297abfafddf1565100da"), 0)
|
||||
|| !TEST_BN_eq(cf, EC_GROUP_get0_cofactor(group)))
|
||||
goto err;
|
||||
ret = 1;
|
||||
err:
|
||||
BN_free(cf);
|
||||
EC_GROUP_free(group);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*-
|
||||
* For named curves, test that:
|
||||
* - the lib correctly computes the cofactor if passed a NULL or zero cofactor
|
||||
* - a nonsensical cofactor throws an error (negative test)
|
||||
* - nonsensical orders throw errors (negative tests)
|
||||
*/
|
||||
static int cardinality_test(int n)
|
||||
{
|
||||
int ret = 0;
|
||||
int nid = curves[n].nid;
|
||||
BN_CTX *ctx = NULL;
|
||||
EC_GROUP *g1 = NULL, *g2 = NULL;
|
||||
EC_POINT *g2_gen = NULL;
|
||||
BIGNUM *g1_p = NULL, *g1_a = NULL, *g1_b = NULL, *g1_x = NULL, *g1_y = NULL,
|
||||
*g1_order = NULL, *g1_cf = NULL, *g2_cf = NULL;
|
||||
|
||||
TEST_info("Curve %s cardinality test", OBJ_nid2sn(nid));
|
||||
|
||||
if (!TEST_ptr(ctx = BN_CTX_new())
|
||||
|| !TEST_ptr(g1 = EC_GROUP_new_by_curve_name(nid))
|
||||
|| !TEST_ptr(g2 = EC_GROUP_new(EC_GROUP_method_of(g1)))) {
|
||||
EC_GROUP_free(g1);
|
||||
EC_GROUP_free(g2);
|
||||
BN_CTX_free(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
g1_p = BN_CTX_get(ctx);
|
||||
g1_a = BN_CTX_get(ctx);
|
||||
g1_b = BN_CTX_get(ctx);
|
||||
g1_x = BN_CTX_get(ctx);
|
||||
g1_y = BN_CTX_get(ctx);
|
||||
g1_order = BN_CTX_get(ctx);
|
||||
g1_cf = BN_CTX_get(ctx);
|
||||
|
||||
if (!TEST_ptr(g2_cf = BN_CTX_get(ctx))
|
||||
/* pull out the explicit curve parameters */
|
||||
|| !TEST_true(EC_GROUP_get_curve(g1, g1_p, g1_a, g1_b, ctx))
|
||||
|| !TEST_true(EC_POINT_get_affine_coordinates(g1,
|
||||
EC_GROUP_get0_generator(g1), g1_x, g1_y, ctx))
|
||||
|| !TEST_true(BN_copy(g1_order, EC_GROUP_get0_order(g1)))
|
||||
|| !TEST_true(EC_GROUP_get_cofactor(g1, g1_cf, ctx))
|
||||
/* construct g2 manually with g1 parameters */
|
||||
|| !TEST_true(EC_GROUP_set_curve(g2, g1_p, g1_a, g1_b, ctx))
|
||||
|| !TEST_ptr(g2_gen = EC_POINT_new(g2))
|
||||
|| !TEST_true(EC_POINT_set_affine_coordinates(g2, g2_gen, g1_x, g1_y, ctx))
|
||||
/* pass NULL cofactor: lib should compute it */
|
||||
|| !TEST_true(EC_GROUP_set_generator(g2, g2_gen, g1_order, NULL))
|
||||
|| !TEST_true(EC_GROUP_get_cofactor(g2, g2_cf, ctx))
|
||||
|| !TEST_BN_eq(g1_cf, g2_cf)
|
||||
/* pass zero cofactor: lib should compute it */
|
||||
|| !TEST_true(BN_set_word(g2_cf, 0))
|
||||
|| !TEST_true(EC_GROUP_set_generator(g2, g2_gen, g1_order, g2_cf))
|
||||
|| !TEST_true(EC_GROUP_get_cofactor(g2, g2_cf, ctx))
|
||||
|| !TEST_BN_eq(g1_cf, g2_cf)
|
||||
/* negative test for invalid cofactor */
|
||||
|| !TEST_true(BN_set_word(g2_cf, 0))
|
||||
|| !TEST_true(BN_sub(g2_cf, g2_cf, BN_value_one()))
|
||||
|| !TEST_false(EC_GROUP_set_generator(g2, g2_gen, g1_order, g2_cf))
|
||||
/* negative test for NULL order */
|
||||
|| !TEST_false(EC_GROUP_set_generator(g2, g2_gen, NULL, NULL))
|
||||
/* negative test for zero order */
|
||||
|| !TEST_true(BN_set_word(g1_order, 0))
|
||||
|| !TEST_false(EC_GROUP_set_generator(g2, g2_gen, g1_order, NULL))
|
||||
/* negative test for negative order */
|
||||
|| !TEST_true(BN_set_word(g2_cf, 0))
|
||||
|| !TEST_true(BN_sub(g2_cf, g2_cf, BN_value_one()))
|
||||
|| !TEST_false(EC_GROUP_set_generator(g2, g2_gen, g1_order, NULL))
|
||||
/* negative test for too large order */
|
||||
|| !TEST_true(BN_lshift(g1_order, g1_p, 2))
|
||||
|| !TEST_false(EC_GROUP_set_generator(g2, g2_gen, g1_order, NULL)))
|
||||
goto err;
|
||||
ret = 1;
|
||||
err:
|
||||
EC_POINT_free(g2_gen);
|
||||
EC_GROUP_free(g1);
|
||||
EC_GROUP_free(g2);
|
||||
BN_CTX_end(ctx);
|
||||
BN_CTX_free(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int check_ec_key_field_public_range_test(int id)
|
||||
{
|
||||
int ret = 0, type = 0;
|
||||
@@ -1866,17 +2304,17 @@ static int check_ec_key_field_public_range_test(int id)
|
||||
BIGNUM *x = NULL, *y = NULL;
|
||||
EC_KEY *key = NULL;
|
||||
|
||||
if (!(TEST_ptr(x = BN_new())
|
||||
&& TEST_ptr(y = BN_new())
|
||||
&& TEST_ptr(key = EC_KEY_new_by_curve_name(curves[id].nid))
|
||||
&& TEST_ptr(group = EC_KEY_get0_group(key))
|
||||
&& TEST_ptr(meth = EC_GROUP_method_of(group))
|
||||
&& TEST_ptr(field = EC_GROUP_get0_field(group))
|
||||
&& TEST_int_gt(EC_KEY_generate_key(key), 0)
|
||||
&& TEST_int_gt(EC_KEY_check_key(key), 0)
|
||||
&& TEST_ptr(pub = EC_KEY_get0_public_key(key))
|
||||
&& TEST_int_gt(EC_POINT_get_affine_coordinates(group, pub, x, y,
|
||||
NULL), 0)))
|
||||
if (!TEST_ptr(x = BN_new())
|
||||
|| !TEST_ptr(y = BN_new())
|
||||
|| !TEST_ptr(key = EC_KEY_new_by_curve_name(curves[id].nid))
|
||||
|| !TEST_ptr(group = EC_KEY_get0_group(key))
|
||||
|| !TEST_ptr(meth = EC_GROUP_method_of(group))
|
||||
|| !TEST_ptr(field = EC_GROUP_get0_field(group))
|
||||
|| !TEST_int_gt(EC_KEY_generate_key(key), 0)
|
||||
|| !TEST_int_gt(EC_KEY_check_key(key), 0)
|
||||
|| !TEST_ptr(pub = EC_KEY_get0_public_key(key))
|
||||
|| !TEST_int_gt(EC_POINT_get_affine_coordinates(group, pub, x, y,
|
||||
NULL), 0))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
@@ -1921,6 +2359,8 @@ int setup_tests(void)
|
||||
return 0;
|
||||
|
||||
ADD_TEST(parameter_test);
|
||||
ADD_TEST(cofactor_range_test);
|
||||
ADD_ALL_TESTS(cardinality_test, crv_len);
|
||||
ADD_TEST(prime_field_tests);
|
||||
# ifndef OPENSSL_NO_EC2M
|
||||
ADD_TEST(char2_field_tests);
|
||||
@@ -1936,6 +2376,7 @@ int setup_tests(void)
|
||||
ADD_ALL_TESTS(check_named_curve_test, crv_len);
|
||||
ADD_ALL_TESTS(check_named_curve_lookup_test, crv_len);
|
||||
ADD_ALL_TESTS(check_ec_key_field_public_range_test, crv_len);
|
||||
ADD_ALL_TESTS(check_named_curve_from_ecparameters, crv_len);
|
||||
#endif /* OPENSSL_NO_EC */
|
||||
return 1;
|
||||
}
|
||||
|
||||
+15
-2
@@ -121,8 +121,12 @@ static int test_engines(void)
|
||||
display_engine_list();
|
||||
|
||||
/*
|
||||
* Depending on whether there's any hardware support compiled in, this
|
||||
* remove may be destined to fail.
|
||||
* At this point, we should have an empty list, unless some hardware
|
||||
* support engine got added. However, since we don't allow the config
|
||||
* file to be loaded and don't otherwise load any built in engines,
|
||||
* that is unlikely. Still, we check, if for nothing else, then to
|
||||
* notify that something is a little off (and might mean that |new_h1|
|
||||
* wasn't unloaded when it should have)
|
||||
*/
|
||||
if ((ptr = ENGINE_get_first()) != NULL) {
|
||||
if (!ENGINE_remove(ptr))
|
||||
@@ -347,6 +351,15 @@ static int test_redirect(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
int global_init(void)
|
||||
{
|
||||
/*
|
||||
* If the config file gets loaded, the dynamic engine will be loaded,
|
||||
* and that interferes with our test above.
|
||||
*/
|
||||
return OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL);
|
||||
}
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
#ifdef OPENSSL_NO_ENGINE
|
||||
|
||||
+32
-1
@@ -40,13 +40,44 @@ static int vdata_appends(void)
|
||||
CRYPTOerr(0, ERR_R_MALLOC_FAILURE);
|
||||
ERR_add_error_data(1, "hello ");
|
||||
ERR_add_error_data(1, "world");
|
||||
ERR_get_error_line_data(NULL, NULL, &data, NULL);
|
||||
ERR_peek_error_data(&data, NULL);
|
||||
return TEST_str_eq(data, "hello world");
|
||||
}
|
||||
|
||||
static int raised_error(void)
|
||||
{
|
||||
const char *f, *data;
|
||||
int l;
|
||||
unsigned long e;
|
||||
|
||||
/*
|
||||
* When OPENSSL_NO_ERR or OPENSSL_NO_FILENAMES, no file name or line
|
||||
* number is saved, so no point checking them.
|
||||
*/
|
||||
#if !defined(OPENSSL_NO_FILENAMES) && !defined(OPENSSL_NO_ERR)
|
||||
const char *file;
|
||||
int line;
|
||||
|
||||
file = __FILE__;
|
||||
line = __LINE__ + 2; /* The error is generated on the ERR_raise_data line */
|
||||
#endif
|
||||
ERR_raise_data(ERR_LIB_SYS, ERR_R_INTERNAL_ERROR,
|
||||
"calling exit()");
|
||||
if (!TEST_ulong_ne(e = ERR_get_error_all(&f, &l, NULL, &data, NULL), 0)
|
||||
|| !TEST_int_eq(ERR_GET_REASON(e), ERR_R_INTERNAL_ERROR)
|
||||
#if !defined(OPENSSL_NO_FILENAMES) && !defined(OPENSSL_NO_ERR)
|
||||
|| !TEST_int_eq(l, line)
|
||||
|| !TEST_str_eq(f, file)
|
||||
#endif
|
||||
|| !TEST_str_eq(data, "calling exit()"))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
ADD_TEST(preserves_system_error);
|
||||
ADD_TEST(vdata_appends);
|
||||
ADD_TEST(raised_error);
|
||||
return 1;
|
||||
}
|
||||
+118
-163
@@ -11,6 +11,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/evp.h>
|
||||
@@ -19,6 +20,8 @@
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/kdf.h>
|
||||
#include <openssl/provider.h>
|
||||
#include <openssl/core_names.h>
|
||||
#include <openssl/dsa.h>
|
||||
#include "testutil.h"
|
||||
#include "internal/nelem.h"
|
||||
#include "internal/evp_int.h"
|
||||
@@ -1068,167 +1071,121 @@ done:
|
||||
X509_PUBKEY_free(xp);
|
||||
return ret;
|
||||
}
|
||||
#endif /* OPENSSL_NO_EC */
|
||||
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
/* Test getting and setting parameters on an EVP_PKEY_CTX */
|
||||
static int test_EVP_PKEY_CTX_get_set_params(void)
|
||||
{
|
||||
EVP_PKEY_CTX *ctx = NULL;
|
||||
EVP_SIGNATURE *dsaimpl = NULL;
|
||||
const OSSL_PARAM *params;
|
||||
OSSL_PARAM ourparams[2], *param = ourparams;
|
||||
DSA *dsa = NULL;
|
||||
BIGNUM *p = NULL, *q = NULL, *g = NULL;
|
||||
EVP_PKEY *pkey = NULL;
|
||||
int ret = 0;
|
||||
const EVP_MD *md;
|
||||
size_t mdsize = SHA512_DIGEST_LENGTH;
|
||||
|
||||
/*
|
||||
* Setup the parameters for our DSA object. For our purposes they don't have
|
||||
* to actually be *valid* parameters. We just need to set something. We
|
||||
* don't even need a pub_key/priv_key.
|
||||
*/
|
||||
dsa = DSA_new();
|
||||
p = BN_new();
|
||||
q = BN_new();
|
||||
g = BN_new();
|
||||
if (!TEST_ptr(dsa)
|
||||
|| !TEST_ptr(p)
|
||||
|| !TEST_ptr(q)
|
||||
|| !TEST_ptr(g)
|
||||
|| !DSA_set0_pqg(dsa, p, q, g))
|
||||
goto err;
|
||||
p = q = g = NULL;
|
||||
|
||||
pkey = EVP_PKEY_new();
|
||||
if (!TEST_ptr(pkey)
|
||||
|| !TEST_true(EVP_PKEY_assign_DSA(pkey, dsa)))
|
||||
goto err;
|
||||
|
||||
dsa = NULL;
|
||||
|
||||
/* Initialise a sign operation */
|
||||
ctx = EVP_PKEY_CTX_new(pkey, NULL);
|
||||
dsaimpl = EVP_SIGNATURE_fetch(NULL, "DSA", NULL);
|
||||
if (!TEST_ptr(ctx)
|
||||
|| !TEST_ptr(dsaimpl)
|
||||
|| !TEST_int_gt(EVP_PKEY_sign_init_ex(ctx, dsaimpl), 0))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* We should be able to query the parameters now. The default DSA
|
||||
* implementation supports exactly one parameter - so we expect to see that
|
||||
* returned and no more.
|
||||
*/
|
||||
params = EVP_PKEY_CTX_settable_params(ctx);
|
||||
if (!TEST_ptr(params)
|
||||
|| !TEST_int_eq(strcmp(params[0].key,
|
||||
OSSL_SIGNATURE_PARAM_DIGEST_SIZE), 0)
|
||||
|| !TEST_int_eq(strcmp(params[1].key, OSSL_SIGNATURE_PARAM_DIGEST),
|
||||
0)
|
||||
/* The final key should be NULL */
|
||||
|| !TEST_ptr_null(params[2].key))
|
||||
goto err;
|
||||
|
||||
/* Gettable params are the same as the settable ones */
|
||||
params = EVP_PKEY_CTX_gettable_params(ctx);
|
||||
if (!TEST_ptr(params)
|
||||
|| !TEST_int_eq(strcmp(params[0].key,
|
||||
OSSL_SIGNATURE_PARAM_DIGEST_SIZE), 0)
|
||||
|| !TEST_int_eq(strcmp(params[1].key, OSSL_SIGNATURE_PARAM_DIGEST),
|
||||
0)
|
||||
/* The final key should be NULL */
|
||||
|| !TEST_ptr_null(params[2].key))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* Test getting and setting params via EVP_PKEY_CTX_set_params() and
|
||||
* EVP_PKEY_CTX_get_params()
|
||||
*/
|
||||
*param++ = OSSL_PARAM_construct_size_t(OSSL_SIGNATURE_PARAM_DIGEST_SIZE,
|
||||
&mdsize);
|
||||
*param++ = OSSL_PARAM_construct_end();
|
||||
|
||||
if (!TEST_true(EVP_PKEY_CTX_set_params(ctx, ourparams)))
|
||||
goto err;
|
||||
|
||||
mdsize = 0;
|
||||
if (!TEST_true(EVP_PKEY_CTX_get_params(ctx, ourparams))
|
||||
|| !TEST_size_t_eq(mdsize, SHA512_DIGEST_LENGTH))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* Test the TEST_PKEY_CTX_set_signature_md() and
|
||||
* TEST_PKEY_CTX_get_signature_md() functions
|
||||
*/
|
||||
if (!TEST_int_gt(EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()), 0)
|
||||
|| !TEST_int_gt(EVP_PKEY_CTX_get_signature_md(ctx, &md), 0)
|
||||
|| !TEST_ptr_eq(md, EVP_sha256()))
|
||||
goto err;
|
||||
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
EVP_PKEY_CTX_free(ctx);
|
||||
EVP_SIGNATURE_free(dsaimpl);
|
||||
EVP_PKEY_free(pkey);
|
||||
DSA_free(dsa);
|
||||
BN_free(p);
|
||||
BN_free(q);
|
||||
BN_free(g);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int calculate_digest(const EVP_MD *md, const char *msg, size_t len,
|
||||
const unsigned char *exptd)
|
||||
{
|
||||
unsigned char out[SHA256_DIGEST_LENGTH];
|
||||
EVP_MD_CTX *ctx;
|
||||
int ret = 0;
|
||||
|
||||
if (!TEST_ptr(ctx = EVP_MD_CTX_new())
|
||||
|| !TEST_true(EVP_DigestInit_ex(ctx, md, NULL))
|
||||
|| !TEST_true(EVP_DigestUpdate(ctx, msg, len))
|
||||
|| !TEST_true(EVP_DigestFinal_ex(ctx, out, NULL))
|
||||
|| !TEST_mem_eq(out, SHA256_DIGEST_LENGTH, exptd,
|
||||
SHA256_DIGEST_LENGTH)
|
||||
|| !TEST_true(md == EVP_MD_CTX_md(ctx)))
|
||||
goto err;
|
||||
|
||||
ret = 1;
|
||||
err:
|
||||
EVP_MD_CTX_free(ctx);
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
* Test EVP_MD_fetch()
|
||||
*
|
||||
* Test 0: Test with the default OPENSSL_CTX
|
||||
* Test 1: Test with an explicit OPENSSL_CTX
|
||||
* Test 2: Explicit OPENSSL_CTX with explicit load of default provider
|
||||
* Test 3: Explicit OPENSSL_CTX with explicit load of default and fips provider
|
||||
* Test 4: Explicit OPENSSL_CTX with explicit load of fips provider
|
||||
*/
|
||||
static int test_EVP_MD_fetch(int tst)
|
||||
{
|
||||
OPENSSL_CTX *ctx = NULL;
|
||||
EVP_MD *md = NULL;
|
||||
OSSL_PROVIDER *defltprov = NULL, *fipsprov = NULL;
|
||||
int ret = 0;
|
||||
const char testmsg[] = "Hello world";
|
||||
const unsigned char exptd[] = {
|
||||
0x27, 0x51, 0x8b, 0xa9, 0x68, 0x30, 0x11, 0xf6, 0xb3, 0x96, 0x07, 0x2c,
|
||||
0x05, 0xf6, 0x65, 0x6d, 0x04, 0xf5, 0xfb, 0xc3, 0x78, 0x7c, 0xf9, 0x24,
|
||||
0x90, 0xec, 0x60, 0x6e, 0x50, 0x92, 0xe3, 0x26
|
||||
};
|
||||
|
||||
if (tst > 0) {
|
||||
ctx = OPENSSL_CTX_new();
|
||||
if (!TEST_ptr(ctx))
|
||||
goto err;
|
||||
|
||||
if (tst == 2 || tst == 3) {
|
||||
defltprov = OSSL_PROVIDER_load(ctx, "default");
|
||||
if (!TEST_ptr(defltprov))
|
||||
goto err;
|
||||
}
|
||||
if (tst == 3 || tst == 4) {
|
||||
fipsprov = OSSL_PROVIDER_load(ctx, "fips");
|
||||
if (!TEST_ptr(fipsprov))
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* Implicit fetching of the MD should produce the expected result */
|
||||
if (!TEST_true(calculate_digest(EVP_sha256(), testmsg, sizeof(testmsg),
|
||||
exptd))
|
||||
|| !TEST_int_eq(EVP_MD_size(EVP_sha256()), SHA256_DIGEST_LENGTH)
|
||||
|| !TEST_int_eq(EVP_MD_block_size(EVP_sha256()), SHA256_CBLOCK))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* Test that without specifying any properties we can get a sha256 md from a
|
||||
* provider.
|
||||
*/
|
||||
if (!TEST_ptr(md = EVP_MD_fetch(ctx, "SHA256", NULL))
|
||||
|| !TEST_ptr(md)
|
||||
|| !TEST_int_eq(EVP_MD_nid(md), NID_sha256)
|
||||
|| !TEST_true(calculate_digest(md, testmsg, sizeof(testmsg), exptd))
|
||||
|| !TEST_int_eq(EVP_MD_size(md), SHA256_DIGEST_LENGTH)
|
||||
|| !TEST_int_eq(EVP_MD_block_size(md), SHA256_CBLOCK))
|
||||
goto err;
|
||||
|
||||
/* Also test EVP_MD_up_ref() while we're doing this */
|
||||
if (!TEST_true(EVP_MD_up_ref(md)))
|
||||
goto err;
|
||||
/* Ref count should now be 2. Release both */
|
||||
EVP_MD_meth_free(md);
|
||||
EVP_MD_meth_free(md);
|
||||
md = NULL;
|
||||
|
||||
/*
|
||||
* In tests 0 - 2 we've only loaded the default provider so explicitly
|
||||
* asking for a non-default implementation should fail. In tests 3 and 4 we
|
||||
* have the FIPS provider loaded so we should succeed in that case.
|
||||
*/
|
||||
md = EVP_MD_fetch(ctx, "SHA256", "default=no");
|
||||
if (tst == 3 || tst == 4) {
|
||||
if (!TEST_ptr(md)
|
||||
|| !TEST_true(calculate_digest(md, testmsg, sizeof(testmsg),
|
||||
exptd)))
|
||||
goto err;
|
||||
} else {
|
||||
if (!TEST_ptr_null(md))
|
||||
goto err;
|
||||
}
|
||||
|
||||
EVP_MD_meth_free(md);
|
||||
md = NULL;
|
||||
|
||||
/*
|
||||
* Explicitly asking for the default implementation should succeed except
|
||||
* in test 4 where the default provider is not loaded.
|
||||
*/
|
||||
md = EVP_MD_fetch(ctx, "SHA256", "default=yes");
|
||||
if (tst != 4) {
|
||||
if (!TEST_ptr(md)
|
||||
|| !TEST_int_eq(EVP_MD_nid(md), NID_sha256)
|
||||
|| !TEST_true(calculate_digest(md, testmsg, sizeof(testmsg),
|
||||
exptd))
|
||||
|| !TEST_int_eq(EVP_MD_size(md), SHA256_DIGEST_LENGTH)
|
||||
|| !TEST_int_eq(EVP_MD_block_size(md), SHA256_CBLOCK))
|
||||
goto err;
|
||||
} else {
|
||||
if (!TEST_ptr_null(md))
|
||||
goto err;
|
||||
}
|
||||
|
||||
EVP_MD_meth_free(md);
|
||||
md = NULL;
|
||||
|
||||
/*
|
||||
* Explicitly asking for a fips implementation should succeed if we have
|
||||
* the FIPS provider loaded and fail otherwise
|
||||
*/
|
||||
md = EVP_MD_fetch(ctx, "SHA256", "fips=yes");
|
||||
if (tst == 3 || tst == 4) {
|
||||
if (!TEST_ptr(md)
|
||||
|| !TEST_true(calculate_digest(md, testmsg, sizeof(testmsg),
|
||||
exptd)))
|
||||
goto err;
|
||||
} else {
|
||||
if (!TEST_ptr_null(md))
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
EVP_MD_meth_free(md);
|
||||
OSSL_PROVIDER_unload(defltprov);
|
||||
OSSL_PROVIDER_unload(fipsprov);
|
||||
/* Not normally needed, but we would like to test that
|
||||
* OPENSSL_thread_stop_ex() behaves as expected.
|
||||
*/
|
||||
if (ctx != NULL)
|
||||
OPENSSL_thread_stop_ex(ctx);
|
||||
OPENSSL_CTX_free(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
ADD_TEST(test_EVP_DigestSignInit);
|
||||
@@ -1258,10 +1215,8 @@ int setup_tests(void)
|
||||
ADD_ALL_TESTS(test_invalide_ec_char2_pub_range_decode,
|
||||
OSSL_NELEM(ec_der_pub_keys));
|
||||
#endif
|
||||
#ifdef NO_FIPS_MODULE
|
||||
ADD_ALL_TESTS(test_EVP_MD_fetch, 3);
|
||||
#else
|
||||
ADD_ALL_TESTS(test_EVP_MD_fetch, 5);
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
ADD_TEST(test_EVP_PKEY_CTX_get_set_params);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/provider.h>
|
||||
#include "testutil.h"
|
||||
|
||||
static char *alg = "digest";
|
||||
static int use_default_ctx = 0;
|
||||
static char *fetch_property = NULL;
|
||||
static int expected_fetch_result = 1;
|
||||
|
||||
typedef enum OPTION_choice {
|
||||
OPT_ERR = -1,
|
||||
OPT_EOF = 0,
|
||||
OPT_ALG_FETCH_TYPE,
|
||||
OPT_FETCH_PROPERTY,
|
||||
OPT_FETCH_FAILURE,
|
||||
OPT_USE_DEFAULTCTX,
|
||||
OPT_TEST_ENUM
|
||||
} OPTION_CHOICE;
|
||||
|
||||
const OPTIONS *test_get_options(void)
|
||||
{
|
||||
static const OPTIONS test_options[] = {
|
||||
OPT_TEST_OPTIONS_WITH_EXTRA_USAGE("[provname...]\n"),
|
||||
{ "type", OPT_ALG_FETCH_TYPE, 's', "The fetch type to test" },
|
||||
{ "property", OPT_FETCH_PROPERTY, 's', "The fetch property e.g. fips=yes" },
|
||||
{ "fetchfail", OPT_FETCH_FAILURE, '-', "fetch is expected to fail" },
|
||||
{ "defaultctx", OPT_USE_DEFAULTCTX, '-',
|
||||
"Use the default context if this is set" },
|
||||
{ OPT_HELP_STR, 1, '-',
|
||||
"file\tProvider names to explicitly load\n" },
|
||||
{ NULL }
|
||||
};
|
||||
return test_options;
|
||||
}
|
||||
|
||||
static int calculate_digest(const EVP_MD *md, const char *msg, size_t len,
|
||||
const unsigned char *exptd)
|
||||
{
|
||||
unsigned char out[SHA256_DIGEST_LENGTH];
|
||||
EVP_MD_CTX *ctx;
|
||||
int ret = 0;
|
||||
|
||||
if (!TEST_ptr(ctx = EVP_MD_CTX_new())
|
||||
|| !TEST_true(EVP_DigestInit_ex(ctx, md, NULL))
|
||||
|| !TEST_true(EVP_DigestUpdate(ctx, msg, len))
|
||||
|| !TEST_true(EVP_DigestFinal_ex(ctx, out, NULL))
|
||||
|| !TEST_mem_eq(out, SHA256_DIGEST_LENGTH, exptd,
|
||||
SHA256_DIGEST_LENGTH)
|
||||
|| !TEST_true(md == EVP_MD_CTX_md(ctx)))
|
||||
goto err;
|
||||
|
||||
ret = 1;
|
||||
err:
|
||||
EVP_MD_CTX_free(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int load_providers(OPENSSL_CTX **libctx, OSSL_PROVIDER *prov[])
|
||||
{
|
||||
OPENSSL_CTX *ctx;
|
||||
int ret = 0;
|
||||
size_t i;
|
||||
|
||||
ctx = OPENSSL_CTX_new();
|
||||
if (!TEST_ptr(ctx))
|
||||
goto err;
|
||||
|
||||
if (test_get_argument_count() > 2)
|
||||
goto err;
|
||||
|
||||
for (i = 0; i < test_get_argument_count(); ++i) {
|
||||
char *provname = test_get_argument(i);
|
||||
prov[i] = OSSL_PROVIDER_load(ctx, provname);
|
||||
if (!TEST_ptr(prov[i]))
|
||||
goto err;
|
||||
}
|
||||
ret = 1;
|
||||
*libctx = ctx;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test EVP_MD_fetch()
|
||||
*/
|
||||
static int test_EVP_MD_fetch(void)
|
||||
{
|
||||
OPENSSL_CTX *ctx = NULL;
|
||||
EVP_MD *md = NULL;
|
||||
OSSL_PROVIDER *prov[2] = {NULL, NULL};
|
||||
int ret = 0;
|
||||
const char testmsg[] = "Hello world";
|
||||
const unsigned char exptd[] = {
|
||||
0x27, 0x51, 0x8b, 0xa9, 0x68, 0x30, 0x11, 0xf6, 0xb3, 0x96, 0x07, 0x2c,
|
||||
0x05, 0xf6, 0x65, 0x6d, 0x04, 0xf5, 0xfb, 0xc3, 0x78, 0x7c, 0xf9, 0x24,
|
||||
0x90, 0xec, 0x60, 0x6e, 0x50, 0x92, 0xe3, 0x26
|
||||
};
|
||||
|
||||
if (use_default_ctx == 0 && !load_providers(&ctx, prov))
|
||||
goto err;
|
||||
|
||||
/* Implicit fetching of the MD should produce the expected result */
|
||||
if (!TEST_true(calculate_digest(EVP_sha256(), testmsg, sizeof(testmsg),
|
||||
exptd))
|
||||
|| !TEST_int_eq(EVP_MD_size(EVP_sha256()), SHA256_DIGEST_LENGTH)
|
||||
|| !TEST_int_eq(EVP_MD_block_size(EVP_sha256()), SHA256_CBLOCK))
|
||||
goto err;
|
||||
|
||||
/* Fetch the digest from a provider using properties. */
|
||||
md = EVP_MD_fetch(ctx, "SHA256", fetch_property);
|
||||
if (expected_fetch_result != 0) {
|
||||
if (!TEST_ptr(md)
|
||||
|| !TEST_int_eq(EVP_MD_nid(md), NID_sha256)
|
||||
|| !TEST_true(calculate_digest(md, testmsg, sizeof(testmsg), exptd))
|
||||
|| !TEST_int_eq(EVP_MD_size(md), SHA256_DIGEST_LENGTH)
|
||||
|| !TEST_int_eq(EVP_MD_block_size(md), SHA256_CBLOCK))
|
||||
goto err;
|
||||
|
||||
/* Also test EVP_MD_up_ref() while we're doing this */
|
||||
if (!TEST_true(EVP_MD_up_ref(md)))
|
||||
goto err;
|
||||
/* Ref count should now be 2. Release first one here */
|
||||
EVP_MD_meth_free(md);
|
||||
} else {
|
||||
if (!TEST_ptr_null(md))
|
||||
goto err;
|
||||
}
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
EVP_MD_meth_free(md);
|
||||
OSSL_PROVIDER_unload(prov[0]);
|
||||
OSSL_PROVIDER_unload(prov[1]);
|
||||
/* Not normally needed, but we would like to test that
|
||||
* OPENSSL_thread_stop_ex() behaves as expected.
|
||||
*/
|
||||
if (ctx != NULL) {
|
||||
OPENSSL_thread_stop_ex(ctx);
|
||||
OPENSSL_CTX_free(ctx);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int encrypt_decrypt(const EVP_CIPHER *cipher, const unsigned char *msg,
|
||||
size_t len)
|
||||
{
|
||||
int ret = 0, ctlen, ptlen;
|
||||
EVP_CIPHER_CTX *ctx = NULL;
|
||||
unsigned char key[128 / 8];
|
||||
unsigned char ct[64], pt[64];
|
||||
|
||||
memset(key, 0, sizeof(key));
|
||||
if (!TEST_ptr(ctx = EVP_CIPHER_CTX_new())
|
||||
|| !TEST_true(EVP_CipherInit_ex(ctx, cipher, NULL, key, NULL, 1))
|
||||
|| !TEST_true(EVP_CipherUpdate(ctx, ct, &ctlen, msg, len))
|
||||
|| !TEST_true(EVP_CipherFinal_ex(ctx, ct, &ctlen))
|
||||
|| !TEST_true(EVP_CipherInit_ex(ctx, cipher, NULL, key, NULL, 0))
|
||||
|| !TEST_true(EVP_CipherUpdate(ctx, pt, &ptlen, ct, ctlen))
|
||||
|| !TEST_true(EVP_CipherFinal_ex(ctx, pt, &ptlen))
|
||||
|| !TEST_mem_eq(pt, ptlen, msg, len))
|
||||
goto err;
|
||||
|
||||
ret = 1;
|
||||
err:
|
||||
EVP_CIPHER_CTX_free(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test EVP_CIPHER_fetch()
|
||||
*/
|
||||
static int test_EVP_CIPHER_fetch(void)
|
||||
{
|
||||
OPENSSL_CTX *ctx = NULL;
|
||||
EVP_CIPHER *cipher = NULL;
|
||||
OSSL_PROVIDER *prov[2] = {NULL, NULL};
|
||||
int ret = 0;
|
||||
const unsigned char testmsg[] = "Hello world";
|
||||
|
||||
if (use_default_ctx == 0 && !load_providers(&ctx, prov))
|
||||
goto err;
|
||||
|
||||
/* Implicit fetching of the cipher should produce the expected result */
|
||||
if (!TEST_true(encrypt_decrypt(EVP_aes_128_cbc(), testmsg, sizeof(testmsg))))
|
||||
goto err;
|
||||
|
||||
/* Fetch the cipher from a provider using properties. */
|
||||
cipher = EVP_CIPHER_fetch(ctx, "AES-128-CBC", fetch_property);
|
||||
if (expected_fetch_result != 0) {
|
||||
if (!TEST_ptr(cipher)
|
||||
|| !TEST_true(encrypt_decrypt(cipher, testmsg, sizeof(testmsg)))) {
|
||||
if (!TEST_true(EVP_CIPHER_up_ref(cipher)))
|
||||
goto err;
|
||||
/* Ref count should now be 2. Release first one here */
|
||||
EVP_CIPHER_meth_free(cipher);
|
||||
}
|
||||
} else {
|
||||
if (!TEST_ptr_null(cipher))
|
||||
goto err;
|
||||
}
|
||||
ret = 1;
|
||||
err:
|
||||
EVP_CIPHER_meth_free(cipher);
|
||||
OSSL_PROVIDER_unload(prov[0]);
|
||||
OSSL_PROVIDER_unload(prov[1]);
|
||||
OPENSSL_CTX_free(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
OPTION_CHOICE o;
|
||||
|
||||
while ((o = opt_next()) != OPT_EOF) {
|
||||
switch (o) {
|
||||
case OPT_ALG_FETCH_TYPE:
|
||||
alg = opt_arg();
|
||||
break;
|
||||
case OPT_FETCH_PROPERTY:
|
||||
fetch_property = opt_arg();
|
||||
break;
|
||||
case OPT_FETCH_FAILURE:
|
||||
expected_fetch_result = 0;
|
||||
break;
|
||||
case OPT_USE_DEFAULTCTX:
|
||||
use_default_ctx = 1;
|
||||
break;
|
||||
case OPT_TEST_CASES:
|
||||
break;
|
||||
default:
|
||||
case OPT_ERR:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (strcmp(alg, "digest") == 0)
|
||||
ADD_TEST(test_EVP_MD_fetch);
|
||||
else
|
||||
ADD_TEST(test_EVP_CIPHER_fetch);
|
||||
return 1;
|
||||
}
|
||||
+218
-137
@@ -15,29 +15,42 @@
|
||||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/kdf.h>
|
||||
#include <openssl/core_names.h>
|
||||
#include "testutil.h"
|
||||
|
||||
static EVP_KDF_CTX *get_kdfbyname(const char *name)
|
||||
{
|
||||
EVP_KDF *kdf = EVP_KDF_fetch(NULL, name, NULL);
|
||||
EVP_KDF_CTX *kctx = EVP_KDF_CTX_new(kdf);
|
||||
|
||||
EVP_KDF_free(kdf);
|
||||
return kctx;
|
||||
}
|
||||
|
||||
static int test_kdf_tls1_prf(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx = NULL;
|
||||
const EVP_KDF *kdf;
|
||||
unsigned char out[16];
|
||||
OSSL_PARAM params[4], *p = params;
|
||||
static const unsigned char expected[sizeof(out)] = {
|
||||
0x8e, 0x4d, 0x93, 0x25, 0x30, 0xd7, 0x65, 0xa0,
|
||||
0xaa, 0xe9, 0x74, 0xc3, 0x04, 0x73, 0x5e, 0xcc
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
(char *)"sha256", sizeof("sha256"));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SECRET,
|
||||
(unsigned char *)"secret",
|
||||
(size_t)6);
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SEED,
|
||||
(unsigned char *)"seed",
|
||||
(size_t)4);
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kdf = EVP_get_kdfbyname(SN_tls1_prf))
|
||||
&& TEST_ptr(kctx = EVP_KDF_CTX_new(kdf))
|
||||
&& TEST_ptr_eq(EVP_KDF_CTX_kdf(kctx), kdf)
|
||||
&& TEST_str_eq(EVP_KDF_name(kdf), SN_tls1_prf)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha256()), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_TLS_SECRET,
|
||||
"secret", (size_t)6), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_ADD_TLS_SEED, "seed",
|
||||
(size_t)4), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
@@ -50,19 +63,24 @@ static int test_kdf_hkdf(void)
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx;
|
||||
unsigned char out[10];
|
||||
OSSL_PARAM params[5], *p = params;
|
||||
static const unsigned char expected[sizeof(out)] = {
|
||||
0x2a, 0xc4, 0x36, 0x9f, 0x52, 0x59, 0x96, 0xf8, 0xde, 0x13
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
(char *)"sha256", sizeof("sha256"));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT,
|
||||
(unsigned char *)"salt", 4);
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY,
|
||||
(unsigned char *)"secret", 6);
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO,
|
||||
(unsigned char *)"label", 5);
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_HKDF))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha256()), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT, "salt",
|
||||
(size_t)4), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, "secret",
|
||||
(size_t)6), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_ADD_HKDF_INFO, "label",
|
||||
(size_t)5), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
@@ -72,10 +90,13 @@ static int test_kdf_hkdf(void)
|
||||
|
||||
static int test_kdf_pbkdf2(void)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
EVP_KDF_CTX *kctx;
|
||||
unsigned char out[25];
|
||||
size_t len = 0;
|
||||
unsigned int iterations = 4096;
|
||||
int mode = 0;
|
||||
OSSL_PARAM params[6], *p = params;
|
||||
const unsigned char expected[sizeof(out)] = {
|
||||
0x34, 0x8c, 0x89, 0xdb, 0xcb, 0xd3, 0x2b, 0x2f,
|
||||
0x32, 0xd8, 0x14, 0xb8, 0x11, 0x6e, 0x84, 0xcf,
|
||||
@@ -86,46 +107,55 @@ static int test_kdf_pbkdf2(void)
|
||||
if (sizeof(len) > 32)
|
||||
len = SIZE_MAX;
|
||||
|
||||
ret = TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_PBKDF2))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_PASS,
|
||||
"passwordPASSWORDpassword",
|
||||
(size_t)24), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT,
|
||||
"saltSALTsaltSALTsaltSALTsaltSALTsalt",
|
||||
(size_t)36), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_ITER, 4096), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha256()),
|
||||
0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_PBKDF2_PKCS5_MODE,
|
||||
0), 0)
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected))
|
||||
/* A key length that is too small should fail */
|
||||
&& TEST_int_eq(EVP_KDF_derive(kctx, out, 112 / 8 - 1), 0)
|
||||
/* A key length that is too large should fail */
|
||||
&& (len == 0 || TEST_int_eq(EVP_KDF_derive(kctx, out, len), 0))
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_PASSWORD,
|
||||
(unsigned char *)
|
||||
"passwordPASSWORDpassword", 24);
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT,
|
||||
(unsigned char *)
|
||||
"saltSALTsaltSALTsaltSALTsaltSALTsalt",
|
||||
36);
|
||||
*p++ = OSSL_PARAM_construct_uint(OSSL_KDF_PARAM_ITER, &iterations);
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
(char *)"sha256", 7);
|
||||
*p++ = OSSL_PARAM_construct_int(OSSL_KDF_PARAM_PKCS5, &mode);
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
if (!TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2))
|
||||
|| !TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
|| !TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
|| !TEST_mem_eq(out, sizeof(out), expected, sizeof(expected))
|
||||
|| !TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
/* A key length that is too small should fail */
|
||||
|| !TEST_int_eq(EVP_KDF_derive(kctx, out, 112 / 8 - 1), 0)
|
||||
/* A key length that is too large should fail */
|
||||
|| (len != 0 && !TEST_int_eq(EVP_KDF_derive(kctx, out, len), 0)))
|
||||
goto err;
|
||||
#if 0
|
||||
/* TODO */
|
||||
/* Salt length less than 128 bits should fail */
|
||||
&& TEST_int_eq(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT,
|
||||
|| TEST_int_eq(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT,
|
||||
"123456781234567",
|
||||
(size_t)15), 0)
|
||||
/* A small iteration count should fail */
|
||||
&& TEST_int_eq(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_ITER, 1), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_PBKDF2_PKCS5_MODE,
|
||||
|| TEST_int_eq(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_ITER, 1), 0)
|
||||
|| TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_PBKDF2_PKCS5_MODE,
|
||||
1), 0)
|
||||
/* Small salts will pass if the "pkcs5" mode is enabled */
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT,
|
||||
|| TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT,
|
||||
"123456781234567",
|
||||
(size_t)15), 0)
|
||||
/* A small iteration count will pass if "pkcs5" mode is enabled */
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_ITER, 1), 0)
|
||||
|| TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_ITER, 1), 0)
|
||||
/*
|
||||
* If the "pkcs5" mode is disabled then the small salt and iter will
|
||||
* fail when the derive gets called.
|
||||
*/
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_PBKDF2_PKCS5_MODE,
|
||||
|| TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_PBKDF2_PKCS5_MODE,
|
||||
0), 0)
|
||||
&& TEST_int_eq(EVP_KDF_derive(kctx, out, sizeof(out)), 0);
|
||||
|
||||
|| TEST_int_eq(EVP_KDF_derive(kctx, out, sizeof(out)), 0);
|
||||
#endif
|
||||
ret = 1;
|
||||
err:
|
||||
EVP_KDF_CTX_free(kctx);
|
||||
return ret;
|
||||
}
|
||||
@@ -135,7 +165,9 @@ static int test_kdf_scrypt(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx;
|
||||
OSSL_PARAM params[7], *p = params;
|
||||
unsigned char out[64];
|
||||
unsigned int nu = 1024, ru = 8, pu = 16, maxmem = 16;
|
||||
static const unsigned char expected[sizeof(out)] = {
|
||||
0xfd, 0xba, 0xbe, 0x1c, 0x9d, 0x34, 0x72, 0x00,
|
||||
0x78, 0x56, 0xe7, 0x19, 0x0d, 0x01, 0xe9, 0xfe,
|
||||
@@ -147,24 +179,23 @@ static int test_kdf_scrypt(void)
|
||||
0x83, 0x60, 0xcb, 0xdf, 0xa2, 0xcc, 0x06, 0x40
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_PASSWORD,
|
||||
(char *)"password", 8);
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT,
|
||||
(char *)"NaCl", 4);
|
||||
*p++ = OSSL_PARAM_construct_uint(OSSL_KDF_PARAM_SCRYPT_N, &nu);
|
||||
*p++ = OSSL_PARAM_construct_uint(OSSL_KDF_PARAM_SCRYPT_R, &ru);
|
||||
*p++ = OSSL_PARAM_construct_uint(OSSL_KDF_PARAM_SCRYPT_P, &pu);
|
||||
*p++ = OSSL_PARAM_construct_uint(OSSL_KDF_PARAM_SCRYPT_MAXMEM, &maxmem);
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_SCRYPT))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_PASS, "password",
|
||||
(size_t)8), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT, "NaCl",
|
||||
(size_t)4), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SCRYPT_N,
|
||||
(uint64_t)1024), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SCRYPT_R,
|
||||
(uint32_t)8), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SCRYPT_P,
|
||||
(uint32_t)16), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAXMEM_BYTES,
|
||||
(uint64_t)16), 0)
|
||||
/* failure test */
|
||||
&& TEST_int_le(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAXMEM_BYTES,
|
||||
(uint64_t)(10 * 1024 * 1024)), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SCRYPT))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
/* failure test *//*
|
||||
&& TEST_int_le(EVP_KDF_derive(kctx, out, sizeof(out)), 0)*/
|
||||
&& TEST_true(OSSL_PARAM_set_uint(p - 1, 10 * 1024 * 1024))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, p - 1))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
@@ -176,15 +207,16 @@ static int test_kdf_scrypt(void)
|
||||
static int test_kdf_ss_hash(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx = NULL;
|
||||
EVP_KDF_CTX *kctx;
|
||||
OSSL_PARAM params[4], *p = params;
|
||||
unsigned char out[14];
|
||||
static const unsigned char z[] = {
|
||||
static unsigned char z[] = {
|
||||
0x6d,0xbd,0xc2,0x3f,0x04,0x54,0x88,0xe4,0x06,0x27,0x57,0xb0,0x6b,0x9e,
|
||||
0xba,0xe1,0x83,0xfc,0x5a,0x59,0x46,0xd8,0x0d,0xb9,0x3f,0xec,0x6f,0x62,
|
||||
0xec,0x07,0xe3,0x72,0x7f,0x01,0x26,0xae,0xd1,0x2c,0xe4,0xb2,0x62,0xf4,
|
||||
0x7d,0x48,0xd5,0x42,0x87,0xf8,0x1d,0x47,0x4c,0x7c,0x3b,0x18,0x50,0xe9
|
||||
};
|
||||
static const unsigned char other[] = {
|
||||
static unsigned char other[] = {
|
||||
0xa1,0xb2,0xc3,0xd4,0xe5,0x43,0x41,0x56,0x53,0x69,0x64,0x3c,0x83,0x2e,
|
||||
0x98,0x49,0xdc,0xdb,0xa7,0x1e,0x9a,0x31,0x39,0xe6,0x06,0xe0,0x95,0xde,
|
||||
0x3c,0x26,0x4a,0x66,0xe9,0x8a,0x16,0x58,0x54,0xcd,0x07,0x98,0x9b,0x1e,
|
||||
@@ -194,12 +226,16 @@ static int test_kdf_ss_hash(void)
|
||||
0xa4,0x62,0xde,0x16,0xa8,0x9d,0xe8,0x46,0x6e,0xf5,0x46,0x0b,0x47,0xb8
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
(char *)"sha224", sizeof("sha224"));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY, z, sizeof(z));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO, other,
|
||||
sizeof(other));
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_SS))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha224()), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, z, sizeof(z)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SSKDF_INFO, other,
|
||||
sizeof(other)), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SSKDF))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
@@ -210,14 +246,15 @@ static int test_kdf_ss_hash(void)
|
||||
static int test_kdf_x963(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx = NULL;
|
||||
EVP_KDF_CTX *kctx;
|
||||
OSSL_PARAM params[4], *p = params;
|
||||
unsigned char out[1024 / 8];
|
||||
/*
|
||||
* Test data from https://csrc.nist.gov/CSRC/media/Projects/
|
||||
* Cryptographic-Algorithm-Validation-Program/documents/components/
|
||||
* 800-135testvectors/ansx963_2001.zip
|
||||
*/
|
||||
static const unsigned char z[] = {
|
||||
static unsigned char z[] = {
|
||||
0x00, 0xaa, 0x5b, 0xb7, 0x9b, 0x33, 0xe3, 0x89, 0xfa, 0x58, 0xce, 0xad,
|
||||
0xc0, 0x47, 0x19, 0x7f, 0x14, 0xe7, 0x37, 0x12, 0xf4, 0x52, 0xca, 0xa9,
|
||||
0xfc, 0x4c, 0x9a, 0xdb, 0x36, 0x93, 0x48, 0xb8, 0x15, 0x07, 0x39, 0x2f,
|
||||
@@ -225,7 +262,7 @@ static int test_kdf_x963(void)
|
||||
0x44, 0xe4, 0x4a, 0x1b, 0x55, 0xb1, 0x40, 0x47, 0x47, 0xa9, 0xe2, 0xe7,
|
||||
0x53, 0xf5, 0x5e, 0xf0, 0x5a, 0x2d
|
||||
};
|
||||
static const unsigned char shared[] = {
|
||||
static unsigned char shared[] = {
|
||||
0xe3, 0xb5, 0xb4, 0xc1, 0xb0, 0xd5, 0xcf, 0x1d, 0x2b, 0x3a, 0x2f, 0x99,
|
||||
0x37, 0x89, 0x5d, 0x31
|
||||
};
|
||||
@@ -243,12 +280,16 @@ static int test_kdf_x963(void)
|
||||
0xab, 0x87, 0xf9, 0x66, 0x1c, 0x3e, 0x88, 0x16
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
(char *)"sha512", sizeof("sha512"));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY, z, sizeof(z));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO, shared,
|
||||
sizeof(shared));
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_X963))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha512()), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, z, sizeof(z)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SHARED_INFO, shared,
|
||||
sizeof(shared)), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_X963KDF))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
@@ -260,15 +301,15 @@ static int test_kdf_ss_hmac(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx;
|
||||
const EVP_MAC *mac;
|
||||
OSSL_PARAM params[6], *p = params;
|
||||
unsigned char out[16];
|
||||
static const unsigned char z[] = {
|
||||
static unsigned char z[] = {
|
||||
0xb7,0x4a,0x14,0x9a,0x16,0x15,0x46,0xf8,0xc2,0x0b,0x06,0xac,0x4e,0xd4
|
||||
};
|
||||
static const unsigned char other[] = {
|
||||
static unsigned char other[] = {
|
||||
0x34,0x8a,0x37,0xa2,0x7e,0xf1,0x28,0x2f,0x5f,0x02,0x0d,0xcc
|
||||
};
|
||||
static const unsigned char salt[] = {
|
||||
static unsigned char salt[] = {
|
||||
0x36,0x38,0x27,0x1c,0xcd,0x68,0xa2,0x5d,0xc2,0x4e,0xcd,0xdd,0x39,0xef,
|
||||
0x3f,0x89
|
||||
};
|
||||
@@ -277,16 +318,21 @@ static int test_kdf_ss_hmac(void)
|
||||
0x1c,0xa3
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_MAC,
|
||||
(char *)OSSL_MAC_NAME_HMAC,
|
||||
sizeof(OSSL_MAC_NAME_HMAC));
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
(char *)"sha256", sizeof("sha256"));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY, z, sizeof(z));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO, other,
|
||||
sizeof(other));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT, salt,
|
||||
sizeof(salt));
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_SS))
|
||||
&& TEST_ptr(mac = EVP_get_macbyname("HMAC"))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAC, mac), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha256()), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, z, sizeof(z)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SSKDF_INFO, other,
|
||||
sizeof(other)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT, salt,
|
||||
sizeof(salt)), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SSKDF))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
@@ -298,15 +344,16 @@ static int test_kdf_ss_kmac(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx;
|
||||
OSSL_PARAM params[6], *p = params;
|
||||
unsigned char out[64];
|
||||
const EVP_MAC *mac;
|
||||
static const unsigned char z[] = {
|
||||
size_t mac_size = 20;
|
||||
static unsigned char z[] = {
|
||||
0xb7,0x4a,0x14,0x9a,0x16,0x15,0x46,0xf8,0xc2,0x0b,0x06,0xac,0x4e,0xd4
|
||||
};
|
||||
static const unsigned char other[] = {
|
||||
static unsigned char other[] = {
|
||||
0x34,0x8a,0x37,0xa2,0x7e,0xf1,0x28,0x2f,0x5f,0x02,0x0d,0xcc
|
||||
};
|
||||
static const unsigned char salt[] = {
|
||||
static unsigned char salt[] = {
|
||||
0x36,0x38,0x27,0x1c,0xcd,0x68,0xa2,0x5d,0xc2,0x4e,0xcd,0xdd,0x39,0xef,
|
||||
0x3f,0x89
|
||||
};
|
||||
@@ -318,18 +365,20 @@ static int test_kdf_ss_kmac(void)
|
||||
0xae,0x15,0x7e,0x1d,0xe8,0x14,0x98,0x03
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_MAC,
|
||||
(char *)OSSL_MAC_NAME_KMAC128,
|
||||
sizeof(OSSL_MAC_NAME_KMAC128));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY, z, sizeof(z));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO, other,
|
||||
sizeof(other));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT, salt,
|
||||
sizeof(salt));
|
||||
*p++ = OSSL_PARAM_construct_size_t(OSSL_KDF_PARAM_MAC_SIZE, &mac_size);
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_SS))
|
||||
&& TEST_ptr(mac = EVP_get_macbyname("KMAC128"))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAC, mac), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, z,
|
||||
sizeof(z)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SSKDF_INFO, other,
|
||||
sizeof(other)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SALT, salt,
|
||||
sizeof(salt)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAC_SIZE,
|
||||
(size_t)20), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SSKDF))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
@@ -341,9 +390,11 @@ static int test_kdf_sshkdf(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx;
|
||||
OSSL_PARAM params[6], *p = params;
|
||||
char kdftype = EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV;
|
||||
unsigned char out[8];
|
||||
/* Test data from NIST CAVS 14.1 test vectors */
|
||||
static const unsigned char key[] = {
|
||||
static unsigned char key[] = {
|
||||
0x00, 0x00, 0x00, 0x81, 0x00, 0x87, 0x5c, 0x55, 0x1c, 0xef, 0x52, 0x6a,
|
||||
0x4a, 0x8b, 0xe1, 0xa7, 0xdf, 0x27, 0xe9, 0xed, 0x35, 0x4b, 0xac, 0x9a,
|
||||
0xfb, 0x71, 0xf5, 0x3d, 0xba, 0xe9, 0x05, 0x67, 0x9d, 0x14, 0xf9, 0xfa,
|
||||
@@ -357,12 +408,12 @@ static int test_kdf_sshkdf(void)
|
||||
0xaa, 0x22, 0x76, 0x93, 0xe1, 0x41, 0xad, 0x16, 0x30, 0xce, 0x13, 0x14,
|
||||
0x4e
|
||||
};
|
||||
static const unsigned char xcghash[] = {
|
||||
static unsigned char xcghash[] = {
|
||||
0x0e, 0x68, 0x3f, 0xc8, 0xa9, 0xed, 0x7c, 0x2f, 0xf0, 0x2d, 0xef, 0x23,
|
||||
0xb2, 0x74, 0x5e, 0xbc, 0x99, 0xb2, 0x67, 0xda, 0xa8, 0x6a, 0x4a, 0xa7,
|
||||
0x69, 0x72, 0x39, 0x08, 0x82, 0x53, 0xf6, 0x42
|
||||
};
|
||||
static const unsigned char sessid[] = {
|
||||
static unsigned char sessid[] = {
|
||||
0x0e, 0x68, 0x3f, 0xc8, 0xa9, 0xed, 0x7c, 0x2f, 0xf0, 0x2d, 0xef, 0x23,
|
||||
0xb2, 0x74, 0x5e, 0xbc, 0x99, 0xb2, 0x67, 0xda, 0xa8, 0x6a, 0x4a, 0xa7,
|
||||
0x69, 0x72, 0x39, 0x08, 0x82, 0x53, 0xf6, 0x42
|
||||
@@ -371,18 +422,21 @@ static int test_kdf_sshkdf(void)
|
||||
0x41, 0xff, 0x2e, 0xad, 0x16, 0x83, 0xf1, 0xe6
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
(char *)"sha256", sizeof("sha256"));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY, key,
|
||||
sizeof(key));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SSHKDF_XCGHASH,
|
||||
xcghash, sizeof(xcghash));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SSHKDF_SESSION_ID,
|
||||
sessid, sizeof(sessid));
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_SSHKDF_TYPE,
|
||||
&kdftype, sizeof(kdftype));
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_SSHKDF))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha256()), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, key,
|
||||
sizeof(key)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SSHKDF_XCGHASH,
|
||||
xcghash, sizeof(xcghash)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SSHKDF_SESSION_ID,
|
||||
sessid, sizeof(sessid)), 0)
|
||||
&& TEST_int_gt(
|
||||
EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SSHKDF_TYPE,
|
||||
(int)EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SSHKDF))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
@@ -392,19 +446,38 @@ static int test_kdf_sshkdf(void)
|
||||
|
||||
static int test_kdf_get_kdf(void)
|
||||
{
|
||||
const EVP_KDF *kdf1, *kdf2;
|
||||
EVP_KDF *kdf1 = NULL, *kdf2 = NULL;
|
||||
ASN1_OBJECT *obj;
|
||||
int ok = 1;
|
||||
|
||||
return
|
||||
TEST_ptr(obj = OBJ_nid2obj(NID_id_pbkdf2))
|
||||
&& TEST_ptr(kdf1 = EVP_get_kdfbyname(LN_id_pbkdf2))
|
||||
&& TEST_ptr(kdf2 = EVP_get_kdfbyobj(obj))
|
||||
&& TEST_ptr_eq(kdf1, kdf2)
|
||||
&& TEST_ptr(kdf1 = EVP_get_kdfbyname(SN_tls1_prf))
|
||||
&& TEST_ptr(kdf2 = EVP_get_kdfbyname(LN_tls1_prf))
|
||||
&& TEST_ptr_eq(kdf1, kdf2)
|
||||
&& TEST_ptr(kdf2 = EVP_get_kdfbynid(NID_tls1_prf))
|
||||
&& TEST_ptr_eq(kdf1, kdf2);
|
||||
if (!TEST_ptr(obj = OBJ_nid2obj(NID_id_pbkdf2))
|
||||
|| !TEST_ptr(kdf1 = EVP_KDF_fetch(NULL, OSSL_KDF_NAME_PBKDF2, NULL))
|
||||
|| !TEST_ptr(kdf2 = EVP_KDF_fetch(NULL, OBJ_nid2sn(OBJ_obj2nid(obj)),
|
||||
NULL))
|
||||
|| !TEST_ptr_eq(kdf1, kdf2))
|
||||
ok = 0;
|
||||
EVP_KDF_free(kdf1);
|
||||
kdf1 = NULL;
|
||||
EVP_KDF_free(kdf2);
|
||||
kdf2 = NULL;
|
||||
|
||||
if (!TEST_ptr(kdf1 = EVP_KDF_fetch(NULL, SN_tls1_prf, NULL))
|
||||
|| !TEST_ptr(kdf2 = EVP_KDF_fetch(NULL, LN_tls1_prf, NULL))
|
||||
|| !TEST_ptr_eq(kdf1, kdf2))
|
||||
ok = 0;
|
||||
/* kdf1 is re-used below, so don't free it here */
|
||||
EVP_KDF_free(kdf2);
|
||||
kdf2 = NULL;
|
||||
|
||||
if (!TEST_ptr(kdf2 = EVP_KDF_fetch(NULL, OBJ_nid2sn(NID_tls1_prf), NULL))
|
||||
|| !TEST_ptr_eq(kdf1, kdf2))
|
||||
ok = 0;
|
||||
EVP_KDF_free(kdf1);
|
||||
kdf1 = NULL;
|
||||
EVP_KDF_free(kdf2);
|
||||
kdf2 = NULL;
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_CMS
|
||||
@@ -412,9 +485,11 @@ static int test_kdf_x942_asn1(void)
|
||||
{
|
||||
int ret;
|
||||
EVP_KDF_CTX *kctx = NULL;
|
||||
OSSL_PARAM params[4], *p = params;
|
||||
const char *cek_alg = SN_id_smime_alg_CMS3DESwrap;
|
||||
unsigned char out[24];
|
||||
/* RFC2631 Section 2.1.6 Test data */
|
||||
static const unsigned char z[] = {
|
||||
static unsigned char z[] = {
|
||||
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,
|
||||
0x0e,0x0f,0x10,0x11,0x12,0x13
|
||||
};
|
||||
@@ -424,12 +499,18 @@ static int test_kdf_x942_asn1(void)
|
||||
0xb6,0x7f,0x5f,0x1e,0xf6,0x3e,0xb5,0xfb
|
||||
};
|
||||
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
(char *)"sha1", sizeof("sha1"));
|
||||
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY, z,
|
||||
sizeof(z));
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_CEK_ALG,
|
||||
(char *)cek_alg,
|
||||
strlen(cek_alg) + 1);
|
||||
*p = OSSL_PARAM_construct_end();
|
||||
|
||||
ret =
|
||||
TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_X942))
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha1()), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, z, sizeof(z)), 0)
|
||||
&& TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_CEK_ALG,
|
||||
SN_id_smime_alg_CMS3DESwrap), 0)
|
||||
TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_X942KDF))
|
||||
&& TEST_true(EVP_KDF_CTX_set_params(kctx, params))
|
||||
&& TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out)), 0)
|
||||
&& TEST_mem_eq(out, sizeof(out), expected, sizeof(expected));
|
||||
|
||||
|
||||
+230
-172
@@ -18,7 +18,10 @@
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/pkcs12.h>
|
||||
#include <openssl/kdf.h>
|
||||
#include <openssl/params.h>
|
||||
#include <openssl/core_names.h>
|
||||
#include "internal/numbers.h"
|
||||
#include "internal/nelem.h"
|
||||
#include "testutil.h"
|
||||
#include "evp_test.h"
|
||||
|
||||
@@ -36,7 +39,6 @@ typedef struct evp_test_st {
|
||||
const EVP_TEST_METHOD *meth; /* method for this test */
|
||||
const char *err, *aux_err; /* Error string for test */
|
||||
char *expected_err; /* Expected error value of test */
|
||||
char *func; /* Expected error function string */
|
||||
char *reason; /* Expected error reason string */
|
||||
void *data; /* test specific data */
|
||||
} EVP_TEST;
|
||||
@@ -76,9 +78,6 @@ static int find_key(EVP_PKEY **ppk, const char *name, KEY_LIST *lst);
|
||||
|
||||
static int parse_bin(const char *value, unsigned char **buf, size_t *buflen);
|
||||
|
||||
static OSSL_PROVIDER *defltprov = NULL;
|
||||
static OSSL_PROVIDER *legacyprov = NULL;
|
||||
|
||||
/*
|
||||
* Compare two memory regions for equality, returning zero if they differ.
|
||||
* However, if there is expected to be an error and the actual error
|
||||
@@ -326,6 +325,7 @@ static int parse_bin(const char *value, unsigned char **buf, size_t *buflen)
|
||||
typedef struct digest_data_st {
|
||||
/* Digest this test is for */
|
||||
const EVP_MD *digest;
|
||||
EVP_MD *fetched_digest;
|
||||
/* Input to digest */
|
||||
STACK_OF(EVP_TEST_BUFFER) *input;
|
||||
/* Expected output */
|
||||
@@ -337,8 +337,10 @@ static int digest_test_init(EVP_TEST *t, const char *alg)
|
||||
{
|
||||
DIGEST_DATA *mdat;
|
||||
const EVP_MD *digest;
|
||||
EVP_MD *fetched_digest;
|
||||
|
||||
if ((digest = EVP_get_digestbyname(alg)) == NULL) {
|
||||
if ((digest = fetched_digest = EVP_MD_fetch(NULL, alg, NULL)) == NULL
|
||||
&& (digest = EVP_get_digestbyname(alg)) == NULL) {
|
||||
/* If alg has an OID assume disabled algorithm */
|
||||
if (OBJ_sn2nid(alg) != NID_undef || OBJ_ln2nid(alg) != NID_undef) {
|
||||
t->skip = 1;
|
||||
@@ -350,6 +352,9 @@ static int digest_test_init(EVP_TEST *t, const char *alg)
|
||||
return 0;
|
||||
t->data = mdat;
|
||||
mdat->digest = digest;
|
||||
mdat->fetched_digest = fetched_digest;
|
||||
if (fetched_digest != NULL)
|
||||
TEST_info("%s is fetched", alg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -359,6 +364,7 @@ static void digest_test_cleanup(EVP_TEST *t)
|
||||
|
||||
sk_EVP_TEST_BUFFER_pop_free(mdat->input, evp_test_buffer_free);
|
||||
OPENSSL_free(mdat->output);
|
||||
EVP_MD_meth_free(mdat->fetched_digest);
|
||||
}
|
||||
|
||||
static int digest_test_parse(EVP_TEST *t,
|
||||
@@ -374,11 +380,6 @@ static int digest_test_parse(EVP_TEST *t,
|
||||
return evp_test_buffer_set_count(value, mdata->input);
|
||||
if (strcmp(keyword, "Ncopy") == 0)
|
||||
return evp_test_buffer_ncopy(value, mdata->input);
|
||||
if (strcmp(keyword, "Legacy") == 0) {
|
||||
if (legacyprov == NULL)
|
||||
t->skip = 1;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -413,6 +414,28 @@ static int digest_test_run(EVP_TEST *t)
|
||||
}
|
||||
|
||||
if (EVP_MD_flags(expected->digest) & EVP_MD_FLAG_XOF) {
|
||||
EVP_MD_CTX *mctx_cpy;
|
||||
char dont[] = "touch";
|
||||
|
||||
if (!TEST_ptr(mctx_cpy = EVP_MD_CTX_new())) {
|
||||
goto err;
|
||||
}
|
||||
if (!EVP_MD_CTX_copy(mctx_cpy, mctx)) {
|
||||
EVP_MD_CTX_free(mctx_cpy);
|
||||
goto err;
|
||||
}
|
||||
if (!EVP_DigestFinalXOF(mctx_cpy, (unsigned char *)dont, 0)) {
|
||||
EVP_MD_CTX_free(mctx_cpy);
|
||||
t->err = "DIGESTFINALXOF_ERROR";
|
||||
goto err;
|
||||
}
|
||||
if (!TEST_str_eq(dont, "touch")) {
|
||||
EVP_MD_CTX_free(mctx_cpy);
|
||||
t->err = "DIGESTFINALXOF_ERROR";
|
||||
goto err;
|
||||
}
|
||||
EVP_MD_CTX_free(mctx_cpy);
|
||||
|
||||
got_len = expected->output_len;
|
||||
if (!EVP_DigestFinalXOF(mctx, got, got_len)) {
|
||||
t->err = "DIGESTFINALXOF_ERROR";
|
||||
@@ -456,6 +479,7 @@ static const EVP_TEST_METHOD digest_test_method = {
|
||||
|
||||
typedef struct cipher_data_st {
|
||||
const EVP_CIPHER *cipher;
|
||||
EVP_CIPHER *fetched_cipher;
|
||||
int enc;
|
||||
/* EVP_CIPH_GCM_MODE, EVP_CIPH_CCM_MODE or EVP_CIPH_OCB_MODE if AEAD */
|
||||
int aead;
|
||||
@@ -478,10 +502,12 @@ typedef struct cipher_data_st {
|
||||
static int cipher_test_init(EVP_TEST *t, const char *alg)
|
||||
{
|
||||
const EVP_CIPHER *cipher;
|
||||
EVP_CIPHER *fetched_cipher;
|
||||
CIPHER_DATA *cdat;
|
||||
int m;
|
||||
|
||||
if ((cipher = EVP_get_cipherbyname(alg)) == NULL) {
|
||||
if ((cipher = fetched_cipher = EVP_CIPHER_fetch(NULL, alg, NULL)) == NULL
|
||||
&& (cipher = EVP_get_cipherbyname(alg)) == NULL) {
|
||||
/* If alg has an OID assume disabled algorithm */
|
||||
if (OBJ_sn2nid(alg) != NID_undef || OBJ_ln2nid(alg) != NID_undef) {
|
||||
t->skip = 1;
|
||||
@@ -491,6 +517,7 @@ static int cipher_test_init(EVP_TEST *t, const char *alg)
|
||||
}
|
||||
cdat = OPENSSL_zalloc(sizeof(*cdat));
|
||||
cdat->cipher = cipher;
|
||||
cdat->fetched_cipher = fetched_cipher;
|
||||
cdat->enc = -1;
|
||||
m = EVP_CIPHER_mode(cipher);
|
||||
if (m == EVP_CIPH_GCM_MODE
|
||||
@@ -504,6 +531,8 @@ static int cipher_test_init(EVP_TEST *t, const char *alg)
|
||||
cdat->aead = 0;
|
||||
|
||||
t->data = cdat;
|
||||
if (fetched_cipher != NULL)
|
||||
TEST_info("%s is fetched", alg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -519,6 +548,7 @@ static void cipher_test_cleanup(EVP_TEST *t)
|
||||
for (i = 0; i < AAD_NUM; i++)
|
||||
OPENSSL_free(cdat->aad[i]);
|
||||
OPENSSL_free(cdat->tag);
|
||||
EVP_CIPHER_meth_free(cdat->fetched_cipher);
|
||||
}
|
||||
|
||||
static int cipher_test_parse(EVP_TEST *t, const char *keyword,
|
||||
@@ -541,7 +571,7 @@ static int cipher_test_parse(EVP_TEST *t, const char *keyword,
|
||||
if (cdat->aad[i] == NULL)
|
||||
return parse_bin(value, &cdat->aad[i], &cdat->aad_len[i]);
|
||||
}
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
if (strcmp(keyword, "Tag") == 0)
|
||||
return parse_bin(value, &cdat->tag, &cdat->tag_len);
|
||||
@@ -551,7 +581,7 @@ static int cipher_test_parse(EVP_TEST *t, const char *keyword,
|
||||
else if (strcmp(value, "FALSE") == 0)
|
||||
cdat->tag_late = 0;
|
||||
else
|
||||
return 0;
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -562,7 +592,7 @@ static int cipher_test_parse(EVP_TEST *t, const char *keyword,
|
||||
else if (strcmp(value, "DECRYPT") == 0)
|
||||
cdat->enc = 0;
|
||||
else
|
||||
return 0;
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -874,7 +904,7 @@ static const EVP_TEST_METHOD cipher_test_method = {
|
||||
|
||||
typedef struct mac_data_st {
|
||||
/* MAC type in one form or another */
|
||||
const EVP_MAC *mac; /* for mac_test_run_mac */
|
||||
EVP_MAC *mac; /* for mac_test_run_mac */
|
||||
int type; /* for mac_test_run_pkey */
|
||||
/* Algorithm string for this MAC */
|
||||
char *alg;
|
||||
@@ -901,11 +931,11 @@ typedef struct mac_data_st {
|
||||
|
||||
static int mac_test_init(EVP_TEST *t, const char *alg)
|
||||
{
|
||||
const EVP_MAC *mac = NULL;
|
||||
EVP_MAC *mac = NULL;
|
||||
int type = NID_undef;
|
||||
MAC_DATA *mdat;
|
||||
|
||||
if ((mac = EVP_get_macbyname(alg)) == NULL) {
|
||||
if ((mac = EVP_MAC_fetch(NULL, alg, NULL)) == NULL) {
|
||||
/*
|
||||
* Since we didn't find an EVP_MAC, we check for known EVP_PKEY methods
|
||||
* For debugging purposes, we allow 'NNNN by EVP_PKEY' to force running
|
||||
@@ -973,6 +1003,7 @@ static void mac_test_cleanup(EVP_TEST *t)
|
||||
{
|
||||
MAC_DATA *mdat = t->data;
|
||||
|
||||
EVP_MAC_free(mdat->mac);
|
||||
sk_OPENSSL_STRING_pop_free(mdat->controls, openssl_free);
|
||||
OPENSSL_free(mdat->alg);
|
||||
OPENSSL_free(mdat->key);
|
||||
@@ -999,7 +1030,7 @@ static int mac_test_parse(EVP_TEST *t,
|
||||
if (strcmp(keyword, "Algorithm") == 0) {
|
||||
mdata->alg = OPENSSL_strdup(value);
|
||||
if (!mdata->alg)
|
||||
return 0;
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
if (strcmp(keyword, "Input") == 0)
|
||||
@@ -1123,11 +1154,14 @@ static int mac_test_run_mac(EVP_TEST *t)
|
||||
{
|
||||
MAC_DATA *expected = t->data;
|
||||
EVP_MAC_CTX *ctx = NULL;
|
||||
const void *algo = NULL;
|
||||
int algo_ctrl = 0;
|
||||
unsigned char *got = NULL;
|
||||
size_t got_len;
|
||||
int rv, i;
|
||||
int i;
|
||||
OSSL_PARAM params[21];
|
||||
size_t params_n = 0;
|
||||
size_t params_n_allocstart = 0;
|
||||
const OSSL_PARAM *defined_params =
|
||||
EVP_MAC_CTX_settable_params(expected->mac);
|
||||
|
||||
if (expected->alg == NULL)
|
||||
TEST_info("Trying the EVP_MAC %s test", EVP_MAC_name(expected->mac));
|
||||
@@ -1143,98 +1177,93 @@ static int mac_test_run_mac(EVP_TEST *t)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (expected->alg != NULL) {
|
||||
/*
|
||||
* The underlying algorithm may be a cipher or a digest.
|
||||
* We don't know which it is, but we can ask the MAC what it
|
||||
* should be and bet on that.
|
||||
*/
|
||||
if (OSSL_PARAM_locate_const(defined_params,
|
||||
OSSL_MAC_PARAM_CIPHER) != NULL) {
|
||||
params[params_n++] =
|
||||
OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_CIPHER,
|
||||
expected->alg, 0);
|
||||
} else if (OSSL_PARAM_locate_const(defined_params,
|
||||
OSSL_MAC_PARAM_DIGEST) != NULL) {
|
||||
params[params_n++] =
|
||||
OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST,
|
||||
expected->alg, 0);
|
||||
} else {
|
||||
t->err = "MAC_BAD_PARAMS";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if (expected->key != NULL)
|
||||
params[params_n++] =
|
||||
OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_KEY,
|
||||
expected->key,
|
||||
expected->key_len);
|
||||
if (expected->custom != NULL)
|
||||
params[params_n++] =
|
||||
OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_CUSTOM,
|
||||
expected->custom,
|
||||
expected->custom_len);
|
||||
if (expected->salt != NULL)
|
||||
params[params_n++] =
|
||||
OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_SALT,
|
||||
expected->salt,
|
||||
expected->salt_len);
|
||||
if (expected->iv != NULL)
|
||||
params[params_n++] =
|
||||
OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_IV,
|
||||
expected->iv,
|
||||
expected->iv_len);
|
||||
|
||||
/*
|
||||
* Unknown controls. They must match parameters that the MAC recognises
|
||||
*/
|
||||
if (params_n + sk_OPENSSL_STRING_num(expected->controls)
|
||||
>= OSSL_NELEM(params)) {
|
||||
t->err = "MAC_TOO_MANY_PARAMETERS";
|
||||
goto err;
|
||||
}
|
||||
params_n_allocstart = params_n;
|
||||
for (i = 0; i < sk_OPENSSL_STRING_num(expected->controls); i++) {
|
||||
char *tmpkey, *tmpval;
|
||||
char *value = sk_OPENSSL_STRING_value(expected->controls, i);
|
||||
|
||||
if (!TEST_ptr(tmpkey = OPENSSL_strdup(value))) {
|
||||
t->err = "MAC_PARAM_ERROR";
|
||||
goto err;
|
||||
}
|
||||
tmpval = strchr(tmpkey, ':');
|
||||
if (tmpval != NULL)
|
||||
*tmpval++ = '\0';
|
||||
|
||||
if (tmpval == NULL
|
||||
|| !OSSL_PARAM_allocate_from_text(¶ms[params_n],
|
||||
defined_params,
|
||||
tmpkey, tmpval,
|
||||
strlen(tmpval))) {
|
||||
OPENSSL_free(tmpkey);
|
||||
t->err = "MAC_PARAM_ERROR";
|
||||
goto err;
|
||||
}
|
||||
params_n++;
|
||||
|
||||
OPENSSL_free(tmpkey);
|
||||
}
|
||||
params[params_n] = OSSL_PARAM_construct_end();
|
||||
|
||||
if ((ctx = EVP_MAC_CTX_new(expected->mac)) == NULL) {
|
||||
t->err = "MAC_CREATE_ERROR";
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (expected->alg != NULL
|
||||
&& ((algo_ctrl = EVP_MAC_CTRL_SET_CIPHER,
|
||||
algo = EVP_get_cipherbyname(expected->alg)) == NULL
|
||||
&& (algo_ctrl = EVP_MAC_CTRL_SET_MD,
|
||||
algo = EVP_get_digestbyname(expected->alg)) == NULL)) {
|
||||
t->err = "MAC_BAD_ALGORITHM";
|
||||
if (!EVP_MAC_CTX_set_params(ctx, params)) {
|
||||
t->err = "MAC_BAD_PARAMS";
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
if (algo_ctrl != 0) {
|
||||
rv = EVP_MAC_ctrl(ctx, algo_ctrl, algo);
|
||||
if (rv == -2) {
|
||||
t->err = "MAC_CTRL_INVALID";
|
||||
goto err;
|
||||
} else if (rv <= 0) {
|
||||
t->err = "MAC_CTRL_ERROR";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
rv = EVP_MAC_ctrl(ctx, EVP_MAC_CTRL_SET_KEY,
|
||||
expected->key, expected->key_len);
|
||||
if (rv == -2) {
|
||||
t->err = "MAC_CTRL_INVALID";
|
||||
goto err;
|
||||
} else if (rv <= 0) {
|
||||
t->err = "MAC_CTRL_ERROR";
|
||||
goto err;
|
||||
}
|
||||
if (expected->custom != NULL) {
|
||||
rv = EVP_MAC_ctrl(ctx, EVP_MAC_CTRL_SET_CUSTOM,
|
||||
expected->custom, expected->custom_len);
|
||||
if (rv == -2) {
|
||||
t->err = "MAC_CTRL_INVALID";
|
||||
goto err;
|
||||
} else if (rv <= 0) {
|
||||
t->err = "MAC_CTRL_ERROR";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
if (expected->salt != NULL) {
|
||||
rv = EVP_MAC_ctrl(ctx, EVP_MAC_CTRL_SET_SALT,
|
||||
expected->salt, expected->salt_len);
|
||||
if (rv == -2) {
|
||||
t->err = "MAC_CTRL_INVALID";
|
||||
goto err;
|
||||
} else if (rv <= 0) {
|
||||
t->err = "MAC_CTRL_ERROR";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
if (expected->iv != NULL) {
|
||||
rv = EVP_MAC_ctrl(ctx, EVP_MAC_CTRL_SET_IV,
|
||||
expected->iv, expected->iv_len);
|
||||
if (rv == -2) {
|
||||
t->err = "MAC_CTRL_INVALID";
|
||||
goto err;
|
||||
} else if (rv <= 0) {
|
||||
t->err = "MAC_CTRL_ERROR";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < sk_OPENSSL_STRING_num(expected->controls); i++) {
|
||||
char *p, *tmpval;
|
||||
char *value = sk_OPENSSL_STRING_value(expected->controls, i);
|
||||
|
||||
if (!TEST_ptr(tmpval = OPENSSL_strdup(value))) {
|
||||
t->err = "MAC_CTRL_ERROR";
|
||||
goto err;
|
||||
}
|
||||
p = strchr(tmpval, ':');
|
||||
if (p != NULL)
|
||||
*p++ = '\0';
|
||||
rv = EVP_MAC_ctrl_str(ctx, tmpval, p);
|
||||
OPENSSL_free(tmpval);
|
||||
if (rv == -2) {
|
||||
t->err = "MAC_CTRL_INVALID";
|
||||
goto err;
|
||||
} else if (rv <= 0) {
|
||||
t->err = "MAC_CTRL_ERROR";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if (!EVP_MAC_init(ctx)) {
|
||||
t->err = "MAC_INIT_ERROR";
|
||||
goto err;
|
||||
@@ -1243,7 +1272,7 @@ static int mac_test_run_mac(EVP_TEST *t)
|
||||
t->err = "MAC_UPDATE_ERROR";
|
||||
goto err;
|
||||
}
|
||||
if (!EVP_MAC_final(ctx, NULL, &got_len)) {
|
||||
if (!EVP_MAC_final(ctx, NULL, &got_len, 0)) {
|
||||
t->err = "MAC_FINAL_LENGTH_ERROR";
|
||||
goto err;
|
||||
}
|
||||
@@ -1251,7 +1280,7 @@ static int mac_test_run_mac(EVP_TEST *t)
|
||||
t->err = "TEST_FAILURE";
|
||||
goto err;
|
||||
}
|
||||
if (!EVP_MAC_final(ctx, got, &got_len)
|
||||
if (!EVP_MAC_final(ctx, got, &got_len, got_len)
|
||||
|| !memory_err_compare(t, "TEST_MAC_ERR",
|
||||
expected->output, expected->output_len,
|
||||
got, got_len)) {
|
||||
@@ -1260,6 +1289,9 @@ static int mac_test_run_mac(EVP_TEST *t)
|
||||
}
|
||||
t->err = NULL;
|
||||
err:
|
||||
while (params_n-- > params_n_allocstart) {
|
||||
OPENSSL_free(params[params_n].data);
|
||||
}
|
||||
EVP_MAC_CTX_free(ctx);
|
||||
OPENSSL_free(got);
|
||||
return 1;
|
||||
@@ -1533,9 +1565,9 @@ static int pderive_test_parse(EVP_TEST *t,
|
||||
if (strcmp(keyword, "PeerKey") == 0) {
|
||||
EVP_PKEY *peer;
|
||||
if (find_key(&peer, value, public_keys) == 0)
|
||||
return 0;
|
||||
return -1;
|
||||
if (EVP_PKEY_derive_set_peer(kdata->ctx, peer) <= 0)
|
||||
return 0;
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
if (strcmp(keyword, "SharedSecret") == 0)
|
||||
@@ -1957,6 +1989,8 @@ typedef struct kdf_data_st {
|
||||
/* Expected output */
|
||||
unsigned char *output;
|
||||
size_t output_len;
|
||||
OSSL_PARAM params[20];
|
||||
OSSL_PARAM *p;
|
||||
} KDF_DATA;
|
||||
|
||||
/*
|
||||
@@ -1966,10 +2000,11 @@ typedef struct kdf_data_st {
|
||||
static int kdf_test_init(EVP_TEST *t, const char *name)
|
||||
{
|
||||
KDF_DATA *kdata;
|
||||
const EVP_KDF *kdf;
|
||||
EVP_KDF *kdf;
|
||||
|
||||
#ifdef OPENSSL_NO_SCRYPT
|
||||
if (strcmp(name, "scrypt") == 0) {
|
||||
/* TODO(3.0) Replace with "scrypt" once aliases are supported */
|
||||
if (strcmp(name, "id-scrypt") == 0) {
|
||||
t->skip = 1;
|
||||
return 1;
|
||||
}
|
||||
@@ -1982,13 +2017,18 @@ static int kdf_test_init(EVP_TEST *t, const char *name)
|
||||
}
|
||||
#endif /* OPENSSL_NO_CMS */
|
||||
|
||||
kdf = EVP_get_kdfbyname(name);
|
||||
if (kdf == NULL)
|
||||
return 0;
|
||||
|
||||
if (!TEST_ptr(kdata = OPENSSL_zalloc(sizeof(*kdata))))
|
||||
return 0;
|
||||
kdata->p = kdata->params;
|
||||
*kdata->p = OSSL_PARAM_construct_end();
|
||||
|
||||
kdf = EVP_KDF_fetch(NULL, name, NULL);
|
||||
if (kdf == NULL) {
|
||||
OPENSSL_free(kdata);
|
||||
return 0;
|
||||
}
|
||||
kdata->ctx = EVP_KDF_CTX_new(kdf);
|
||||
EVP_KDF_free(kdf);
|
||||
if (kdata->ctx == NULL) {
|
||||
OPENSSL_free(kdata);
|
||||
return 0;
|
||||
@@ -2000,6 +2040,10 @@ static int kdf_test_init(EVP_TEST *t, const char *name)
|
||||
static void kdf_test_cleanup(EVP_TEST *t)
|
||||
{
|
||||
KDF_DATA *kdata = t->data;
|
||||
OSSL_PARAM *p;
|
||||
|
||||
for (p = kdata->params; p->key != NULL; p++)
|
||||
OPENSSL_free(p->data);
|
||||
OPENSSL_free(kdata->output);
|
||||
EVP_KDF_CTX_free(kdata->ctx);
|
||||
}
|
||||
@@ -2007,36 +2051,36 @@ static void kdf_test_cleanup(EVP_TEST *t)
|
||||
static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
|
||||
const char *value)
|
||||
{
|
||||
KDF_DATA *kdata = t->data;
|
||||
int rv;
|
||||
char *p, *tmpval;
|
||||
char *p, *name;
|
||||
const OSSL_PARAM *defs = EVP_KDF_CTX_settable_params(EVP_KDF_CTX_kdf(kctx));
|
||||
|
||||
if (!TEST_ptr(tmpval = OPENSSL_strdup(value)))
|
||||
if (!TEST_ptr(name = OPENSSL_strdup(value)))
|
||||
return 0;
|
||||
p = strchr(tmpval, ':');
|
||||
p = strchr(name, ':');
|
||||
if (p != NULL)
|
||||
*p++ = '\0';
|
||||
rv = EVP_KDF_ctrl_str(kctx, tmpval, p);
|
||||
if (rv == -2) {
|
||||
t->err = "KDF_CTRL_INVALID";
|
||||
rv = 1;
|
||||
} else if (p != NULL && rv <= 0) {
|
||||
|
||||
rv = OSSL_PARAM_allocate_from_text(kdata->p, defs, name, p,
|
||||
p != NULL ? strlen(p) : 0);
|
||||
*++kdata->p = OSSL_PARAM_construct_end();
|
||||
if (!rv) {
|
||||
t->err = "KDF_PARAM_ERROR";
|
||||
OPENSSL_free(name);
|
||||
return 0;
|
||||
}
|
||||
if (p != NULL && strcmp(name, "digest") == 0) {
|
||||
/* If p has an OID and lookup fails assume disabled algorithm */
|
||||
int nid = OBJ_sn2nid(p);
|
||||
|
||||
if (nid == NID_undef)
|
||||
nid = OBJ_ln2nid(p);
|
||||
if (nid != NID_undef
|
||||
&& EVP_get_digestbynid(nid) == NULL
|
||||
&& EVP_get_cipherbynid(nid) == NULL) {
|
||||
if (nid != NID_undef && EVP_get_digestbynid(nid) == NULL)
|
||||
t->skip = 1;
|
||||
rv = 1;
|
||||
} else {
|
||||
t->err = "KDF_CTRL_ERROR";
|
||||
rv = 1;
|
||||
}
|
||||
}
|
||||
OPENSSL_free(tmpval);
|
||||
return rv > 0;
|
||||
OPENSSL_free(name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int kdf_test_parse(EVP_TEST *t,
|
||||
@@ -2057,6 +2101,10 @@ static int kdf_test_run(EVP_TEST *t)
|
||||
unsigned char *got = NULL;
|
||||
size_t got_len = expected->output_len;
|
||||
|
||||
if (!EVP_KDF_CTX_set_params(expected->ctx, expected->params)) {
|
||||
t->err = "KDF_CTRL_ERROR";
|
||||
return 1;
|
||||
}
|
||||
if (!TEST_ptr(got = OPENSSL_malloc(got_len))) {
|
||||
t->err = "INTERNAL_ERROR";
|
||||
goto err;
|
||||
@@ -2143,6 +2191,7 @@ static int pkey_kdf_test_init(EVP_TEST *t, const char *name)
|
||||
static void pkey_kdf_test_cleanup(EVP_TEST *t)
|
||||
{
|
||||
PKEY_KDF_DATA *kdata = t->data;
|
||||
|
||||
OPENSSL_free(kdata->output);
|
||||
EVP_PKEY_CTX_free(kdata->ctx);
|
||||
}
|
||||
@@ -2529,7 +2578,7 @@ static int digestsigver_test_parse(EVP_TEST *t,
|
||||
}
|
||||
if (strcmp(keyword, "Ctrl") == 0) {
|
||||
if (mdata->pctx == NULL)
|
||||
return 0;
|
||||
return -1;
|
||||
return pkey_test_ctrl(t, mdata->pctx, value);
|
||||
}
|
||||
return 0;
|
||||
@@ -2735,8 +2784,6 @@ static void clear_test(EVP_TEST *t)
|
||||
}
|
||||
OPENSSL_free(t->expected_err);
|
||||
t->expected_err = NULL;
|
||||
OPENSSL_free(t->func);
|
||||
t->func = NULL;
|
||||
OPENSSL_free(t->reason);
|
||||
t->reason = NULL;
|
||||
|
||||
@@ -2752,7 +2799,6 @@ static void clear_test(EVP_TEST *t)
|
||||
static int check_test_error(EVP_TEST *t)
|
||||
{
|
||||
unsigned long err;
|
||||
const char *func;
|
||||
const char *reason;
|
||||
|
||||
if (t->err == NULL && t->expected_err == NULL)
|
||||
@@ -2779,10 +2825,10 @@ static int check_test_error(EVP_TEST *t)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (t->func == NULL && t->reason == NULL)
|
||||
if (t->reason == NULL)
|
||||
return 1;
|
||||
|
||||
if (t->func == NULL || t->reason == NULL) {
|
||||
if (t->reason == NULL) {
|
||||
TEST_info("%s:%d: Test is missing function or reason code",
|
||||
t->s.test_file, t->s.start);
|
||||
return 0;
|
||||
@@ -2790,25 +2836,24 @@ static int check_test_error(EVP_TEST *t)
|
||||
|
||||
err = ERR_peek_error();
|
||||
if (err == 0) {
|
||||
TEST_info("%s:%d: Expected error \"%s:%s\" not set",
|
||||
t->s.test_file, t->s.start, t->func, t->reason);
|
||||
TEST_info("%s:%d: Expected error \"%s\" not set",
|
||||
t->s.test_file, t->s.start, t->reason);
|
||||
return 0;
|
||||
}
|
||||
|
||||
func = ERR_func_error_string(err);
|
||||
reason = ERR_reason_error_string(err);
|
||||
if (func == NULL && reason == NULL) {
|
||||
TEST_info("%s:%d: Expected error \"%s:%s\", no strings available."
|
||||
if (reason == NULL) {
|
||||
TEST_info("%s:%d: Expected error \"%s\", no strings available."
|
||||
" Assuming ok.",
|
||||
t->s.test_file, t->s.start, t->func, t->reason);
|
||||
t->s.test_file, t->s.start, t->reason);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(func, t->func) == 0 && strcmp(reason, t->reason) == 0)
|
||||
if (strcmp(reason, t->reason) == 0)
|
||||
return 1;
|
||||
|
||||
TEST_info("%s:%d: Expected error \"%s:%s\", got \"%s:%s\"",
|
||||
t->s.test_file, t->s.start, t->func, t->reason, func, reason);
|
||||
TEST_info("%s:%d: Expected error \"%s\", got \"%s\"",
|
||||
t->s.test_file, t->s.start, t->reason, reason);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2902,6 +2947,33 @@ static char *take_value(PAIR *pp)
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 if one of the providers named in the string is available.
|
||||
* The provider names are separated with whitespace.
|
||||
* NOTE: destructive function, it inserts '\0' after each provider name.
|
||||
*/
|
||||
static int prov_available(char *providers)
|
||||
{
|
||||
char *p;
|
||||
int more = 1;
|
||||
|
||||
while (more) {
|
||||
for (; isspace(*providers); providers++)
|
||||
continue;
|
||||
if (*providers == '\0')
|
||||
break; /* End of the road */
|
||||
for (p = providers; *p != '\0' && !isspace(*p); p++)
|
||||
continue;
|
||||
if (*p == '\0')
|
||||
more = 0;
|
||||
else
|
||||
*p = '\0';
|
||||
if (OSSL_PROVIDER_available(NULL, providers))
|
||||
return 1; /* Found one */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read and parse one test. Return 0 if failure, 1 if okay.
|
||||
*/
|
||||
@@ -3032,18 +3104,21 @@ top:
|
||||
}
|
||||
|
||||
for (pp++, i = 1; i < t->s.numpairs; pp++, i++) {
|
||||
if (strcmp(pp->key, "Result") == 0) {
|
||||
if (strcmp(pp->key, "Availablein") == 0) {
|
||||
if (!prov_available(pp->value)) {
|
||||
TEST_info("skipping, providers not available: %s:%d",
|
||||
t->s.test_file, t->s.start);
|
||||
t->skip = 1;
|
||||
return 0;
|
||||
}
|
||||
} else if (strcmp(pp->key, "Result") == 0) {
|
||||
if (t->expected_err != NULL) {
|
||||
TEST_info("Line %d: multiple result lines", t->s.curr);
|
||||
return 0;
|
||||
}
|
||||
t->expected_err = take_value(pp);
|
||||
} else if (strcmp(pp->key, "Function") == 0) {
|
||||
if (t->func != NULL) {
|
||||
TEST_info("Line %d: multiple function lines\n", t->s.curr);
|
||||
return 0;
|
||||
}
|
||||
t->func = take_value(pp);
|
||||
/* Ignore old line. */
|
||||
} else if (strcmp(pp->key, "Reason") == 0) {
|
||||
if (t->reason != NULL) {
|
||||
TEST_info("Line %d: multiple reason lines", t->s.curr);
|
||||
@@ -3113,23 +3188,6 @@ int setup_tests(void)
|
||||
if (n == 0)
|
||||
return 0;
|
||||
|
||||
defltprov = OSSL_PROVIDER_load(NULL, "default");
|
||||
if (!TEST_ptr(defltprov))
|
||||
return 0;
|
||||
#ifndef NO_LEGACY_MODULE
|
||||
legacyprov = OSSL_PROVIDER_load(NULL, "legacy");
|
||||
if (!TEST_ptr(legacyprov)) {
|
||||
OSSL_PROVIDER_unload(defltprov);
|
||||
return 0;
|
||||
}
|
||||
#endif /* NO_LEGACY_MODULE */
|
||||
|
||||
ADD_ALL_TESTS(run_file_tests, n);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void cleanup_tests(void)
|
||||
{
|
||||
OSSL_PROVIDER_unload(legacyprov);
|
||||
OSSL_PROVIDER_unload(defltprov);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
openssl_conf = openssl_init
|
||||
|
||||
.include fipsinstall.conf
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
fips = fips_sect
|
||||
@@ -22,10 +22,12 @@ BEGIN {
|
||||
OpenSSL::Test::setup("no_test_here");
|
||||
}
|
||||
|
||||
use lib srctop_dir("util", "perl"); # for with_fallback
|
||||
use lib srctop_dir("test", "ssl-tests"); # for ssltests_base
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/../util/perl";
|
||||
use OpenSSL::fallback "$FindBin::Bin/../external/perl/MODULES.txt";
|
||||
use Text::Template 1.46;
|
||||
|
||||
use with_fallback qw(Text::Template);
|
||||
use lib "$FindBin::Bin/ssl-tests";
|
||||
|
||||
use vars qw/@ISA/;
|
||||
push (@ISA, qw/Text::Template/);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
openssl_conf = openssl_init
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
legacy = legacy_sect
|
||||
|
||||
[legacy_sect]
|
||||
activate = 1
|
||||
+4
-3
@@ -39,7 +39,8 @@ static unsigned char pad2[16] = {
|
||||
|
||||
static int test_mdc2(void)
|
||||
{
|
||||
int testresult = 0, pad_type = 2;
|
||||
int testresult = 0;
|
||||
unsigned int pad_type = 2;
|
||||
unsigned char md[MDC2_DIGEST_LENGTH];
|
||||
EVP_MD_CTX *c;
|
||||
static char text[] = "Now is the time for all ";
|
||||
@@ -47,8 +48,8 @@ static int test_mdc2(void)
|
||||
OSSL_PROVIDER *prov = NULL;
|
||||
OSSL_PARAM params[2];
|
||||
|
||||
params[i++] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_PAD_TYPE,
|
||||
&pad_type),
|
||||
params[i++] = OSSL_PARAM_construct_uint(OSSL_DIGEST_PARAM_PAD_TYPE,
|
||||
&pad_type),
|
||||
params[i++] = OSSL_PARAM_construct_end();
|
||||
|
||||
prov = OSSL_PROVIDER_load(NULL, "legacy");
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include <openssl/aes.h>
|
||||
#include <openssl/modes.h>
|
||||
#include "../crypto/modes/modes_lcl.h"
|
||||
#include "testutil.h"
|
||||
#include "internal/modes_int.h"
|
||||
#include "internal/nelem.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
+9
-9
@@ -29,20 +29,20 @@
|
||||
#include <openssl/core.h>
|
||||
#include <openssl/core_numbers.h>
|
||||
|
||||
static OSSL_core_get_param_types_fn *c_get_param_types = NULL;
|
||||
static OSSL_core_gettable_params_fn *c_gettable_params = NULL;
|
||||
static OSSL_core_get_params_fn *c_get_params = NULL;
|
||||
|
||||
/* Tell the core what params we provide and what type they are */
|
||||
static const OSSL_ITEM p_param_types[] = {
|
||||
{ OSSL_PARAM_UTF8_STRING, "greeting" },
|
||||
{ 0, NULL }
|
||||
static const OSSL_PARAM p_param_types[] = {
|
||||
{ "greeting", OSSL_PARAM_UTF8_STRING, NULL, 0, 0 },
|
||||
{ NULL, 0, NULL, 0, 0 }
|
||||
};
|
||||
|
||||
/* This is a trick to ensure we define the provider functions correctly */
|
||||
static OSSL_provider_get_param_types_fn p_get_param_types;
|
||||
static OSSL_provider_gettable_params_fn p_gettable_params;
|
||||
static OSSL_provider_get_params_fn p_get_params;
|
||||
|
||||
static const OSSL_ITEM *p_get_param_types(void *_)
|
||||
static const OSSL_PARAM *p_gettable_params(void *_)
|
||||
{
|
||||
return p_param_types;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ static int p_get_params(void *vprov, OSSL_PARAM params[])
|
||||
}
|
||||
|
||||
static const OSSL_DISPATCH p_test_table[] = {
|
||||
{ OSSL_FUNC_PROVIDER_GET_PARAM_TYPES, (void (*)(void))p_get_param_types },
|
||||
{ OSSL_FUNC_PROVIDER_GETTABLE_PARAMS, (void (*)(void))p_gettable_params },
|
||||
{ OSSL_FUNC_PROVIDER_GET_PARAMS, (void (*)(void))p_get_params },
|
||||
{ 0, NULL }
|
||||
};
|
||||
@@ -113,8 +113,8 @@ int OSSL_provider_init(const OSSL_PROVIDER *provider,
|
||||
{
|
||||
for (; in->function_id != 0; in++) {
|
||||
switch (in->function_id) {
|
||||
case OSSL_FUNC_CORE_GET_PARAM_TYPES:
|
||||
c_get_param_types = OSSL_get_core_get_param_types(in);
|
||||
case OSSL_FUNC_CORE_GETTABLE_PARAMS:
|
||||
c_gettable_params = OSSL_get_core_gettable_params(in);
|
||||
break;
|
||||
case OSSL_FUNC_CORE_GET_PARAMS:
|
||||
c_get_params = OSSL_get_core_get_params(in);
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "../ssl/packet_locl.h"
|
||||
#include "internal/packet.h"
|
||||
#include "testutil.h"
|
||||
|
||||
#define BUF_LEN 255
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <openssl/params.h>
|
||||
#include "internal/param_build.h"
|
||||
#include "internal/nelem.h"
|
||||
#include "testutil.h"
|
||||
|
||||
static int template_public_test(void)
|
||||
{
|
||||
OSSL_PARAM_BLD bld;
|
||||
OSSL_PARAM *params = NULL, *p;
|
||||
BIGNUM *bn = NULL, *bn_res = NULL;
|
||||
int i;
|
||||
long int l;
|
||||
int32_t i32;
|
||||
int64_t i64;
|
||||
double d;
|
||||
char *utf = NULL;
|
||||
const char *cutf;
|
||||
int res = 0;
|
||||
|
||||
ossl_param_bld_init(&bld);
|
||||
if (!TEST_true(ossl_param_bld_push_int(&bld, "i", -6))
|
||||
|| !TEST_true(ossl_param_bld_push_long(&bld, "l", 42))
|
||||
|| !TEST_true(ossl_param_bld_push_int32(&bld, "i32", 1532))
|
||||
|| !TEST_true(ossl_param_bld_push_int64(&bld, "i64", -9999999))
|
||||
|| !TEST_true(ossl_param_bld_push_double(&bld, "d", 1.61803398875))
|
||||
|| !TEST_ptr(bn = BN_new())
|
||||
|| !TEST_true(BN_set_word(bn, 1729))
|
||||
|| !TEST_true(ossl_param_bld_push_BN(&bld, "bignumber", bn))
|
||||
|| !TEST_true(ossl_param_bld_push_utf8_string(&bld, "utf8_s", "foo",
|
||||
sizeof("foo")))
|
||||
|| !TEST_true(ossl_param_bld_push_utf8_ptr(&bld, "utf8_p", "bar-boom",
|
||||
0))
|
||||
|| !TEST_ptr(params = ossl_param_bld_to_param(&bld))
|
||||
/* Check int */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "i"))
|
||||
|| !TEST_true(OSSL_PARAM_get_int(p, &i))
|
||||
|| !TEST_str_eq(p->key, "i")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(int))
|
||||
|| !TEST_int_eq(i, -6)
|
||||
/* Check int32 */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "i32"))
|
||||
|| !TEST_true(OSSL_PARAM_get_int32(p, &i32))
|
||||
|| !TEST_str_eq(p->key, "i32")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(int32_t))
|
||||
|| !TEST_int_eq((int)i32, 1532)
|
||||
/* Check int64 */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "i64"))
|
||||
|| !TEST_str_eq(p->key, "i64")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(int64_t))
|
||||
|| !TEST_true(OSSL_PARAM_get_int64(p, &i64))
|
||||
|| !TEST_long_eq((long)i64, -9999999)
|
||||
/* Check long */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "l"))
|
||||
|| !TEST_str_eq(p->key, "l")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(long int))
|
||||
|| !TEST_true(OSSL_PARAM_get_long(p, &l))
|
||||
|| !TEST_long_eq(l, 42)
|
||||
/* Check double */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "d"))
|
||||
|| !TEST_true(OSSL_PARAM_get_double(p, &d))
|
||||
|| !TEST_str_eq(p->key, "d")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_REAL)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(double))
|
||||
|| !TEST_double_eq(d, 1.61803398875)
|
||||
/* Check UTF8 string */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "utf8_s"))
|
||||
|| !TEST_str_eq(p->data, "foo")
|
||||
|| !TEST_true(OSSL_PARAM_get_utf8_string(p, &utf, 0))
|
||||
|| !TEST_str_eq(utf, "foo")
|
||||
/* Check UTF8 pointer */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "utf8_p"))
|
||||
|| !TEST_true(OSSL_PARAM_get_utf8_ptr(p, &cutf))
|
||||
|| !TEST_str_eq(cutf, "bar-boom")
|
||||
/* Check BN */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "bignumber"))
|
||||
|| !TEST_str_eq(p->key, "bignumber")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_true(OSSL_PARAM_get_BN(p, &bn_res))
|
||||
|| !TEST_int_eq(BN_cmp(bn_res, bn), 0))
|
||||
goto err;
|
||||
res = 1;
|
||||
err:
|
||||
ossl_param_bld_free(params);
|
||||
OPENSSL_free(utf);
|
||||
BN_free(bn);
|
||||
BN_free(bn_res);
|
||||
return res;
|
||||
}
|
||||
|
||||
static int template_private_test(void)
|
||||
{
|
||||
static int data1[] = { 2, 3, 5, 7, 11, 15, 17 };
|
||||
static unsigned char data2[] = { 2, 4, 6, 8, 10 };
|
||||
OSSL_PARAM_BLD bld;
|
||||
OSSL_PARAM *params = NULL, *p;
|
||||
unsigned int i;
|
||||
unsigned long int l;
|
||||
uint32_t i32;
|
||||
uint64_t i64;
|
||||
size_t st;
|
||||
BIGNUM *bn = NULL, *bn_res = NULL;
|
||||
int res = 0;
|
||||
|
||||
ossl_param_bld_init(&bld);
|
||||
if (!TEST_true(ossl_param_bld_push_uint(&bld, "i", 6))
|
||||
|| !TEST_true(ossl_param_bld_push_ulong(&bld, "l", 42))
|
||||
|| !TEST_true(ossl_param_bld_push_uint32(&bld, "i32", 1532))
|
||||
|| !TEST_true(ossl_param_bld_push_uint64(&bld, "i64", 9999999))
|
||||
|| !TEST_true(ossl_param_bld_push_size_t(&bld, "st", 65537))
|
||||
|| !TEST_ptr(bn = BN_secure_new())
|
||||
|| !TEST_true(BN_set_word(bn, 1729))
|
||||
|| !TEST_true(ossl_param_bld_push_BN(&bld, "bignumber", bn))
|
||||
|| !TEST_true(ossl_param_bld_push_octet_string(&bld, "oct_s", data1,
|
||||
sizeof(data1)))
|
||||
|| !TEST_true(ossl_param_bld_push_octet_ptr(&bld, "oct_p", data2,
|
||||
sizeof(data2)))
|
||||
|| !TEST_ptr(params = ossl_param_bld_to_param(&bld))
|
||||
/* Check unsigned int */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "i"))
|
||||
|| !TEST_true(OSSL_PARAM_get_uint(p, &i))
|
||||
|| !TEST_str_eq(p->key, "i")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(int))
|
||||
|| !TEST_uint_eq(i, 6)
|
||||
/* Check unsigned int32 */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "i32"))
|
||||
|| !TEST_true(OSSL_PARAM_get_uint32(p, &i32))
|
||||
|| !TEST_str_eq(p->key, "i32")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(int32_t))
|
||||
|| !TEST_uint_eq((unsigned int)i32, 1532)
|
||||
/* Check unsigned int64 */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "i64"))
|
||||
|| !TEST_str_eq(p->key, "i64")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(int64_t))
|
||||
|| !TEST_true(OSSL_PARAM_get_uint64(p, &i64))
|
||||
|| !TEST_ulong_eq((unsigned long)i64, 9999999)
|
||||
/* Check unsigned long int */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "l"))
|
||||
|| !TEST_str_eq(p->key, "l")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(unsigned long int))
|
||||
|| !TEST_true(OSSL_PARAM_get_ulong(p, &l))
|
||||
|| !TEST_ulong_eq(l, 42)
|
||||
/* Check size_t */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "st"))
|
||||
|| !TEST_str_eq(p->key, "st")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(size_t))
|
||||
|| !TEST_true(OSSL_PARAM_get_size_t(p, &st))
|
||||
|| !TEST_size_t_eq(st, 65537)
|
||||
/* Check octet string */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "oct_s"))
|
||||
|| !TEST_str_eq(p->key, "oct_s")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_OCTET_STRING)
|
||||
|| !TEST_mem_eq(p->data, p->data_size, data1, sizeof(data1))
|
||||
/* Check octet pointer */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "oct_p"))
|
||||
|| !TEST_str_eq(p->key, "oct_p")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_OCTET_PTR)
|
||||
|| !TEST_mem_eq(*(void **)p->data, p->data_size, data2, sizeof(data2))
|
||||
/* Check BN */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "bignumber"))
|
||||
|| !TEST_str_eq(p->key, "bignumber")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_true(OSSL_PARAM_get_BN(p, &bn_res))
|
||||
|| !TEST_int_eq(BN_cmp(bn_res, bn), 0))
|
||||
goto err;
|
||||
res = 1;
|
||||
err:
|
||||
ossl_param_bld_free(params);
|
||||
BN_free(bn);
|
||||
BN_free(bn_res);
|
||||
return res;
|
||||
}
|
||||
|
||||
static int template_static_params_test(int n)
|
||||
{
|
||||
unsigned char data[1000], secure[500];
|
||||
OSSL_PARAM_BLD bld;
|
||||
OSSL_PARAM params[20], *p;
|
||||
BIGNUM *bn = NULL, *bn_r = NULL;
|
||||
unsigned int i;
|
||||
char *utf = NULL;
|
||||
int res = 0;
|
||||
|
||||
ossl_param_bld_init(&bld);
|
||||
if (!TEST_true(ossl_param_bld_push_uint(&bld, "i", 6))
|
||||
|| !TEST_ptr(bn = (n & 1) == 0 ? BN_new() : BN_secure_new())
|
||||
|| !TEST_true(BN_set_word(bn, 1337))
|
||||
|| !TEST_true(ossl_param_bld_push_BN(&bld, "bn", bn))
|
||||
|| !TEST_true(ossl_param_bld_push_utf8_string(&bld, "utf8_s", "bar",
|
||||
0))
|
||||
|| !TEST_ptr(ossl_param_bld_to_param_ex(&bld, params,
|
||||
OSSL_NELEM(params),
|
||||
data, sizeof(data),
|
||||
secure, sizeof(secure)))
|
||||
/* Check unsigned int */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "i"))
|
||||
|| !TEST_true(OSSL_PARAM_get_uint(p, &i))
|
||||
|| !TEST_str_eq(p->key, "i")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_size_t_eq(p->data_size, sizeof(int))
|
||||
|| !TEST_uint_eq(i, 6)
|
||||
/* Check BIGNUM */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "bn"))
|
||||
|| !TEST_true(OSSL_PARAM_get_BN(p, &bn_r))
|
||||
|| !TEST_str_eq(p->key, "bn")
|
||||
|| !TEST_uint_eq(p->data_type, OSSL_PARAM_UNSIGNED_INTEGER)
|
||||
|| !TEST_size_t_le(p->data_size, sizeof(BN_ULONG))
|
||||
|| !TEST_uint_eq((unsigned int)BN_get_word(bn_r), 1337)
|
||||
/* Check UTF8 string */
|
||||
|| !TEST_ptr(p = OSSL_PARAM_locate(params, "utf8_s"))
|
||||
|| !TEST_str_eq(p->data, "bar")
|
||||
|| !TEST_true(OSSL_PARAM_get_utf8_string(p, &utf, 0))
|
||||
|| !TEST_str_eq(utf, "bar"))
|
||||
goto err;
|
||||
res = 1;
|
||||
err:
|
||||
OPENSSL_free(utf);
|
||||
BN_free(bn);
|
||||
BN_free(bn_r);
|
||||
return res;
|
||||
}
|
||||
|
||||
static int template_static_fail_test(int n)
|
||||
{
|
||||
unsigned char data[10000], secure[500];
|
||||
OSSL_PARAM_BLD bld;
|
||||
OSSL_PARAM prms[20];
|
||||
BIGNUM *bn = NULL;
|
||||
int res = 0;
|
||||
|
||||
ossl_param_bld_init(&bld);
|
||||
if (!TEST_true(ossl_param_bld_push_uint(&bld, "i", 6))
|
||||
|| !TEST_ptr(bn = (n & 1) == 0 ? BN_new() : BN_secure_new())
|
||||
|| !TEST_true(BN_hex2bn(&bn, "ABCDEF78901234567890ABCDEF0987987654321"))
|
||||
|| !TEST_true(ossl_param_bld_push_BN(&bld, "bn", bn))
|
||||
|| !TEST_true(ossl_param_bld_push_utf8_string(&bld, "utf8_s", "abc",
|
||||
1000))
|
||||
/* No OSSL_PARAMS */
|
||||
|| !TEST_ptr_null(ossl_param_bld_to_param_ex(&bld, NULL, 0, data,
|
||||
sizeof(data), secure,
|
||||
sizeof(secure)))
|
||||
/* Short OSSL_PARAMS */
|
||||
|| !TEST_ptr_null(ossl_param_bld_to_param_ex(&bld, prms, 2,
|
||||
data, sizeof(data),
|
||||
secure, sizeof(secure)))
|
||||
/* No normal data */
|
||||
|| !TEST_ptr_null(ossl_param_bld_to_param_ex(&bld, prms,
|
||||
OSSL_NELEM(prms),
|
||||
NULL, 0, secure,
|
||||
sizeof(secure)))
|
||||
/* Not enough normal data */
|
||||
|| !TEST_ptr_null(ossl_param_bld_to_param_ex(&bld, prms,
|
||||
OSSL_NELEM(prms),
|
||||
data, 50, secure,
|
||||
sizeof(secure))))
|
||||
goto err;
|
||||
if ((n & 1) == 1) {
|
||||
/* No secure data */
|
||||
if (!TEST_ptr_null(ossl_param_bld_to_param_ex(&bld, prms,
|
||||
OSSL_NELEM(prms),
|
||||
data, sizeof(data),
|
||||
NULL, 0))
|
||||
/* Not enough secure data */
|
||||
|| !TEST_ptr_null(ossl_param_bld_to_param_ex(&bld, prms,
|
||||
OSSL_NELEM(prms),
|
||||
data, sizeof(data),
|
||||
secure, 4)))
|
||||
goto err;
|
||||
}
|
||||
res = 1;
|
||||
err:
|
||||
BN_free(bn);
|
||||
return res;
|
||||
}
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
ADD_TEST(template_public_test);
|
||||
ADD_TEST(template_private_test);
|
||||
ADD_ALL_TESTS(template_static_params_test, 2);
|
||||
ADD_ALL_TESTS(template_static_fail_test, 2);
|
||||
return 1;
|
||||
}
|
||||
@@ -240,8 +240,9 @@ static int test_register_deregister(void)
|
||||
goto err;
|
||||
|
||||
for (i = 0; i < OSSL_NELEM(impls); i++)
|
||||
if (!TEST_true(ossl_method_store_add(store, impls[i].nid, impls[i].prop,
|
||||
impls[i].impl, NULL))) {
|
||||
if (!TEST_true(ossl_method_store_add(store, NULL, impls[i].nid,
|
||||
impls[i].prop, impls[i].impl,
|
||||
NULL, NULL))) {
|
||||
TEST_note("iteration %zd", i + 1);
|
||||
goto err;
|
||||
}
|
||||
@@ -307,8 +308,9 @@ static int test_property(void)
|
||||
goto err;
|
||||
|
||||
for (i = 0; i < OSSL_NELEM(impls); i++)
|
||||
if (!TEST_true(ossl_method_store_add(store, impls[i].nid, impls[i].prop,
|
||||
impls[i].impl, NULL))) {
|
||||
if (!TEST_true(ossl_method_store_add(store, NULL, impls[i].nid,
|
||||
impls[i].prop, impls[i].impl,
|
||||
NULL, NULL))) {
|
||||
TEST_note("iteration %zd", i + 1);
|
||||
goto err;
|
||||
}
|
||||
@@ -347,7 +349,8 @@ static int test_query_cache_stochastic(void)
|
||||
for (i = 1; i <= max; i++) {
|
||||
v[i] = 2 * i;
|
||||
BIO_snprintf(buf, sizeof(buf), "n=%d\n", i);
|
||||
if (!TEST_true(ossl_method_store_add(store, i, buf, "abc", NULL))
|
||||
if (!TEST_true(ossl_method_store_add(store, NULL, i, buf, "abc",
|
||||
NULL, NULL))
|
||||
|| !TEST_true(ossl_method_store_cache_set(store, i, buf, v + i))
|
||||
|| !TEST_true(ossl_method_store_cache_set(store, i, "n=1234",
|
||||
"miss"))) {
|
||||
|
||||
@@ -55,7 +55,7 @@ static int test_builtin_provider(void)
|
||||
|
||||
return
|
||||
TEST_ptr(prov =
|
||||
ossl_provider_new(NULL, name, PROVIDER_INIT_FUNCTION_NAME))
|
||||
ossl_provider_new(NULL, name, PROVIDER_INIT_FUNCTION_NAME, 0))
|
||||
&& test_provider(prov, expected_greeting1(name));
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ static int test_loaded_provider(void)
|
||||
OSSL_PROVIDER *prov = NULL;
|
||||
|
||||
return
|
||||
TEST_ptr(prov = ossl_provider_new(NULL, name, NULL))
|
||||
TEST_ptr(prov = ossl_provider_new(NULL, name, NULL, 0))
|
||||
&& test_provider(prov, expected_greeting1(name));
|
||||
}
|
||||
|
||||
@@ -79,8 +79,7 @@ static int test_configured_provider(void)
|
||||
"Hello OpenSSL, greetings from Test Provider";
|
||||
|
||||
return
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL)
|
||||
&& TEST_ptr(prov = ossl_provider_find(NULL, name))
|
||||
TEST_ptr(prov = ossl_provider_find(NULL, name, 0))
|
||||
&& test_provider(prov, expected_greeting);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "testutil.h"
|
||||
#include <openssl/opensslconf.h>
|
||||
#include "internal/cryptlib.h"
|
||||
|
||||
#if (defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
|
||||
defined(__x86_64) || defined(__x86_64__) || \
|
||||
@@ -20,10 +20,6 @@
|
||||
size_t OPENSSL_ia32_rdrand_bytes(unsigned char *buf, size_t len);
|
||||
size_t OPENSSL_ia32_rdseed_bytes(unsigned char *buf, size_t len);
|
||||
|
||||
void OPENSSL_cpuid_setup(void);
|
||||
|
||||
extern unsigned int OPENSSL_ia32cap_P[4];
|
||||
|
||||
static int sanity_check_bytes(size_t (*rng)(unsigned char *, size_t),
|
||||
int rounds, int min_failures, int max_retries, int max_zero_words)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use File::Spec;
|
||||
use File::Copy;
|
||||
use OpenSSL::Glob;
|
||||
use OpenSSL::Test qw/:DEFAULT srctop_dir bldtop_dir bldtop_file/;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
BEGIN {
|
||||
setup("test_fipsinstall");
|
||||
}
|
||||
use lib srctop_dir('Configurations');
|
||||
use lib bldtop_dir('.');
|
||||
use platform;
|
||||
|
||||
plan skip_all => "Test only supported in a fips build" if disabled("fips");
|
||||
|
||||
plan tests => 6;
|
||||
|
||||
my $infile = bldtop_file('providers', platform->dso('fips'));
|
||||
$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
|
||||
|
||||
#fail if no module name
|
||||
ok(!run(app(['openssl', 'fipsinstall', '-out', 'fips.conf', '-module',
|
||||
'-provider_name', 'fips',
|
||||
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
|
||||
'-section_name', 'fips_install'])),
|
||||
"fipinstall fail");
|
||||
|
||||
# fail to Verify if the configuration file is missing
|
||||
ok(!run(app(['openssl', 'fipsinstall', '-in', 'dummy.tmp', '-module', $infile,
|
||||
'-provider_name', 'fips', '-mac_name', 'HMAC',
|
||||
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
|
||||
'-section_name', 'fips_install', '-verify'])),
|
||||
"fipinstall verify fail");
|
||||
|
||||
|
||||
# output a fips.conf file containing mac data
|
||||
ok(run(app(['openssl', 'fipsinstall', '-out', 'fips.conf', '-module', $infile,
|
||||
'-provider_name', 'fips', '-mac_name', 'HMAC',
|
||||
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
|
||||
'-section_name', 'fips_install'])),
|
||||
"fipinstall");
|
||||
|
||||
# Verify the fips.conf file
|
||||
ok(run(app(['openssl', 'fipsinstall', '-in', 'fips.conf', '-module', $infile,
|
||||
'-provider_name', 'fips', '-mac_name', 'HMAC',
|
||||
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
|
||||
'-section_name', 'fips_install', '-verify'])),
|
||||
"fipinstall verify");
|
||||
|
||||
# Fail to Verify the fips.conf file if a different key is used
|
||||
ok(!run(app(['openssl', 'fipsinstall', '-in', 'fips.conf', '-module', $infile,
|
||||
'-provider_name', 'fips', '-mac_name', 'HMAC',
|
||||
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:01',
|
||||
'-section_name', 'fips_install', '-verify'])),
|
||||
"fipinstall verify fail bad key");
|
||||
|
||||
# Fail to Verify the fips.conf file if a different mac digest is used
|
||||
ok(!run(app(['openssl', 'fipsinstall', '-in', 'fips.conf', '-module', $infile,
|
||||
'-provider_name', 'fips', '-mac_name', 'HMAC',
|
||||
'-macopt', 'digest:SHA512', '-macopt', 'hexkey:00',
|
||||
'-section_name', 'fips_install', '-verify'])),
|
||||
"fipinstall verify fail incorrect digest");
|
||||
@@ -0,0 +1,16 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
use strict;
|
||||
use OpenSSL::Test; # get 'plan'
|
||||
use OpenSSL::Test::Simple;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
setup("test_internal_asn1_dsa");
|
||||
|
||||
simple_test("test_internal_asn1_dsa", "asn1_dsa_internal_test");
|
||||
@@ -0,0 +1,15 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
use strict;
|
||||
use OpenSSL::Test;
|
||||
use OpenSSL::Test::Simple;
|
||||
|
||||
setup("test_param_build");
|
||||
|
||||
simple_test("test_param_build", "param_build_test");
|
||||
@@ -12,6 +12,4 @@ use OpenSSL::Test qw/:DEFAULT bldtop_dir/;
|
||||
|
||||
setup("test_md2");
|
||||
|
||||
$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
|
||||
|
||||
simple_test("test_md2", "md2test", "md2");
|
||||
@@ -21,6 +21,4 @@ if (disabled("mdc2") || disabled("legacy")) {
|
||||
|
||||
plan tests => 1;
|
||||
|
||||
$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
|
||||
|
||||
ok(run(test(["mdc2test"])), "running mdc2test");
|
||||
@@ -43,7 +43,7 @@ my @kdf_tests = (
|
||||
);
|
||||
|
||||
my @scrypt_tests = (
|
||||
{ cmd => [qw{openssl kdf -keylen 64 -kdfopt pass:password -kdfopt salt:NaCl -kdfopt N:1024 -kdfopt r:8 -kdfopt p:16 -kdfopt maxmem_bytes:10485760 id-scrypt}],
|
||||
{ cmd => [qw{openssl kdf -keylen 64 -kdfopt pass:password -kdfopt salt:NaCl -kdfopt n:1024 -kdfopt r:8 -kdfopt p:16 -kdfopt maxmem_bytes:10485760 id-scrypt}],
|
||||
expected => 'fd:ba:be:1c:9d:34:72:00:78:56:e7:19:0d:01:e9:fe:7c:6a:d7:cb:c8:23:78:30:e7:73:76:63:4b:37:31:62:2e:af:30:d9:2e:22:a3:88:6f:f1:09:27:9d:98:30:da:c7:27:af:b9:4a:83:ee:6d:83:60:cb:df:a2:cc:06:40',
|
||||
desc => 'SCRYPT' },
|
||||
);
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use OpenSSL::Test;
|
||||
|
||||
setup("test_provider");
|
||||
|
||||
plan tests => 7;
|
||||
|
||||
SKIP: {
|
||||
skip "No default provider?", 6
|
||||
unless ok(run(app([qw(openssl provider default)])),
|
||||
"try running 'openssl provider default'");
|
||||
|
||||
my $prev = 2; # The amount of lines from -v
|
||||
my @checks = qw( -v -vv -vvv );
|
||||
my %op = ( -v => '==',
|
||||
-vv => '>',
|
||||
-vvv => '>' );
|
||||
my $i = 0;
|
||||
|
||||
foreach (@checks) {
|
||||
my @cmd = ('openssl', 'provider', $_, 'default');
|
||||
my @lines = ( map { (my $x = $_) =~ s|\R$||; $x }
|
||||
run(app([@cmd]), capture => 1) );
|
||||
|
||||
my $curr = scalar @lines;
|
||||
my $cmp = "$curr $op{$_} $prev";
|
||||
|
||||
ok(eval $cmp,
|
||||
"'openssl provider $_ default' line count $op{$_} $prev");
|
||||
ok($lines[0] eq '[ default ]',
|
||||
"'openssl provider -v default' first line is '[ default ]'");
|
||||
|
||||
$prev = $curr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ subtest "generating certificate requests" => sub {
|
||||
};
|
||||
|
||||
subtest "generating SM2 certificate requests" => sub {
|
||||
plan tests => 2;
|
||||
plan tests => 4;
|
||||
|
||||
SKIP: {
|
||||
skip "SM2 is not supported by this OpenSSL build", 2
|
||||
skip "SM2 is not supported by this OpenSSL build", 4
|
||||
if disabled("sm2");
|
||||
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
|
||||
"-new", "-key", srctop_file("test", "certs", "sm2.key"),
|
||||
@@ -74,6 +74,17 @@ subtest "generating SM2 certificate requests" => sub {
|
||||
"-verify", "-in", "testreq.pem", "-noout",
|
||||
"-sm2-id", "1234567812345678", "-sm3"])),
|
||||
"Verifying signature on SM2 certificate request");
|
||||
|
||||
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
|
||||
"-new", "-key", srctop_file("test", "certs", "sm2.key"),
|
||||
"-sigopt", "sm2_hex_id:DEADBEEF",
|
||||
"-out", "testreq.pem", "-sm3"])),
|
||||
"Generating SM2 certificate request with hex id");
|
||||
|
||||
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
|
||||
"-verify", "-in", "testreq.pem", "-noout",
|
||||
"-sm2-hex-id", "DEADBEEF", "-sm3"])),
|
||||
"Verifying signature on SM2 certificate request");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -10,19 +10,67 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir);
|
||||
use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir srctop_file srctop_dir bldtop_file);
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
BEGIN {
|
||||
setup("test_evp");
|
||||
}
|
||||
|
||||
my @files = ( "evpciph.txt", "evpdigest.txt", "evpencod.txt", "evpkdf.txt",
|
||||
"evppkey_kdf.txt", "evpmac.txt", "evppbe.txt", "evppkey.txt",
|
||||
"evppkey_ecc.txt", "evpcase.txt", "evpaessiv.txt", "evpccmcavs.txt" );
|
||||
use lib srctop_dir('Configurations');
|
||||
use lib bldtop_dir('.');
|
||||
use platform;
|
||||
|
||||
plan tests => scalar(@files);
|
||||
# Default config depends on if the legacy module is built or not
|
||||
my $defaultcnf = disabled('legacy') ? 'default.cnf' : 'default-and-legacy.cnf';
|
||||
|
||||
my @configs = ( $defaultcnf );
|
||||
# Only add the FIPS config if the FIPS module has been built
|
||||
push @configs, 'fips.cnf' unless disabled('fips');
|
||||
|
||||
my @files = qw( evpciph.txt evpdigest.txt );
|
||||
my @defltfiles = qw( evpencod.txt evpkdf.txt evppkey_kdf.txt evpmac.txt
|
||||
evppbe.txt evppkey.txt evppkey_ecc.txt evpcase.txt evpaessiv.txt
|
||||
evpccmcavs.txt );
|
||||
my @ideafiles = qw( evpciph_idea.txt );
|
||||
push @defltfiles, @ideafiles unless disabled("idea");
|
||||
|
||||
my @castfiles = qw( evpciph_cast5.txt );
|
||||
push @defltfiles, @castfiles unless disabled("cast");
|
||||
|
||||
my @seedfiles = qw( evpciph_seed.txt );
|
||||
push @defltfiles, @seedfiles unless disabled("seed");
|
||||
|
||||
my @sm4files = qw( evpciph_sm4.txt );
|
||||
push @defltfiles, @sm4files unless disabled("sm4");
|
||||
|
||||
plan tests => (scalar(@configs) * scalar(@files)) + scalar(@defltfiles) + 1;
|
||||
|
||||
my $infile = bldtop_file('providers', platform->dso('fips'));
|
||||
$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
|
||||
$ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
|
||||
|
||||
foreach my $f ( @files ) {
|
||||
ok(run(app(['openssl', 'fipsinstall', '-out', bldtop_file('providers', 'fipsinstall.conf'),
|
||||
'-module', $infile,
|
||||
'-provider_name', 'fips', '-mac_name', 'HMAC',
|
||||
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
|
||||
'-section_name', 'fips_sect'])), "fipinstall");
|
||||
|
||||
foreach (@configs) {
|
||||
$ENV{OPENSSL_CONF} = srctop_file("test", $_);
|
||||
|
||||
foreach my $f ( @files ) {
|
||||
ok(run(test(["evp_test", data_file("$f")])),
|
||||
"running evp_test $f");
|
||||
}
|
||||
}
|
||||
|
||||
#TODO(3.0): As more operations are converted to providers we can move more of
|
||||
# these tests to the loop above
|
||||
|
||||
$ENV{OPENSSL_CONF} = srctop_file("test", $defaultcnf);
|
||||
|
||||
foreach my $f ( @defltfiles ) {
|
||||
ok(run(test(["evp_test", data_file("$f")])),
|
||||
"running evp_test $f");
|
||||
}
|
||||
@@ -22,12 +22,14 @@
|
||||
Title = DES Tests (various sources)
|
||||
|
||||
Cipher = DES-EDE3-CFB1
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F1011121314151617
|
||||
IV = 0001020304050607
|
||||
Plaintext = "Hello World"
|
||||
Ciphertext = 3CF55D656E9C0664513358
|
||||
|
||||
Cipher = DES-EDE3-CFB1
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F1011121314151617
|
||||
IV = 0001020304050607
|
||||
Operation = DECRYPT
|
||||
@@ -35,6 +37,7 @@ Plaintext = "Hello World"
|
||||
Ciphertext = 3CF55D656E9C0664513358
|
||||
|
||||
Cipher = DESX-CBC
|
||||
Availablein = default
|
||||
Key = 0123456789abcdeff1e0d3c2b5a49786fedcba9876543210
|
||||
IV = fedcba9876543210
|
||||
Plaintext = 37363534333231204E6F77206973207468652074696D6520666F722000000000
|
||||
@@ -50,36 +53,43 @@ Ciphertext = 3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675
|
||||
# DES ECB tests (from destest)
|
||||
|
||||
Cipher = DES-ECB
|
||||
Availablein = default
|
||||
Key = 0000000000000000
|
||||
Plaintext = 0000000000000000
|
||||
Ciphertext = 8CA64DE9C1B123A7
|
||||
|
||||
Cipher = DES-ECB
|
||||
Availablein = default
|
||||
Key = FFFFFFFFFFFFFFFF
|
||||
Plaintext = FFFFFFFFFFFFFFFF
|
||||
Ciphertext = 7359B2163E4EDC58
|
||||
|
||||
Cipher = DES-ECB
|
||||
Availablein = default
|
||||
Key = 3000000000000000
|
||||
Plaintext = 1000000000000001
|
||||
Ciphertext = 958E6E627A05557B
|
||||
|
||||
Cipher = DES-ECB
|
||||
Availablein = default
|
||||
Key = 1111111111111111
|
||||
Plaintext = 1111111111111111
|
||||
Ciphertext = F40379AB9E0EC533
|
||||
|
||||
Cipher = DES-ECB
|
||||
Availablein = default
|
||||
Key = 0123456789ABCDEF
|
||||
Plaintext = 1111111111111111
|
||||
Ciphertext = 17668DFC7292532D
|
||||
|
||||
Cipher = DES-ECB
|
||||
Availablein = default
|
||||
Key = 1111111111111111
|
||||
Plaintext = 0123456789ABCDEF
|
||||
Ciphertext = 8A5AE1F81AB8F2DD
|
||||
|
||||
Cipher = DES-ECB
|
||||
Availablein = default
|
||||
Key = FEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEF
|
||||
Ciphertext = ED39D950FA74BCC4
|
||||
@@ -293,6 +303,7 @@ Ciphertext = B2EB05E2C39BE9FCDA6C19078C6A9D1B
|
||||
# AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec
|
||||
# CFB128-AES128.Encrypt
|
||||
Cipher = AES-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -300,6 +311,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 3B3FD92EB72DAD20333449F8E83CFB4A
|
||||
|
||||
Cipher = AES-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 3B3FD92EB72DAD20333449F8E83CFB4A
|
||||
Operation = ENCRYPT
|
||||
@@ -307,6 +319,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = C8A64537A0B3A93FCDE3CDAD9F1CE58B
|
||||
|
||||
Cipher = AES-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = C8A64537A0B3A93FCDE3CDAD9F1CE58B
|
||||
Operation = ENCRYPT
|
||||
@@ -314,6 +327,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 26751F67A3CBB140B1808CF187A4F4DF
|
||||
|
||||
Cipher = AES-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 26751F67A3CBB140B1808CF187A4F4DF
|
||||
Operation = ENCRYPT
|
||||
@@ -322,6 +336,7 @@ Ciphertext = C04B05357C5D1C0EEAC4C66F9FF7F2E6
|
||||
|
||||
# CFB128-AES128.Decrypt
|
||||
Cipher = AES-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -329,6 +344,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 3B3FD92EB72DAD20333449F8E83CFB4A
|
||||
|
||||
Cipher = AES-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 3B3FD92EB72DAD20333449F8E83CFB4A
|
||||
Operation = DECRYPT
|
||||
@@ -336,6 +352,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = C8A64537A0B3A93FCDE3CDAD9F1CE58B
|
||||
|
||||
Cipher = AES-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = C8A64537A0B3A93FCDE3CDAD9F1CE58B
|
||||
Operation = DECRYPT
|
||||
@@ -343,6 +360,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 26751F67A3CBB140B1808CF187A4F4DF
|
||||
|
||||
Cipher = AES-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 26751F67A3CBB140B1808CF187A4F4DF
|
||||
Operation = DECRYPT
|
||||
@@ -351,6 +369,7 @@ Ciphertext = C04B05357C5D1C0EEAC4C66F9FF7F2E6
|
||||
|
||||
# CFB128-AES192.Encrypt
|
||||
Cipher = AES-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -358,6 +377,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CDC80D6FDDF18CAB34C25909C99A4174
|
||||
|
||||
Cipher = AES-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = CDC80D6FDDF18CAB34C25909C99A4174
|
||||
Operation = ENCRYPT
|
||||
@@ -365,6 +385,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 67CE7F7F81173621961A2B70171D3D7A
|
||||
|
||||
Cipher = AES-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 67CE7F7F81173621961A2B70171D3D7A
|
||||
Operation = ENCRYPT
|
||||
@@ -372,6 +393,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 2E1E8A1DD59B88B1C8E60FED1EFAC4C9
|
||||
|
||||
Cipher = AES-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 2E1E8A1DD59B88B1C8E60FED1EFAC4C9
|
||||
Operation = ENCRYPT
|
||||
@@ -380,6 +402,7 @@ Ciphertext = C05F9F9CA9834FA042AE8FBA584B09FF
|
||||
|
||||
# CFB128-AES192.Decrypt
|
||||
Cipher = AES-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -387,6 +410,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CDC80D6FDDF18CAB34C25909C99A4174
|
||||
|
||||
Cipher = AES-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = CDC80D6FDDF18CAB34C25909C99A4174
|
||||
Operation = DECRYPT
|
||||
@@ -394,6 +418,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 67CE7F7F81173621961A2B70171D3D7A
|
||||
|
||||
Cipher = AES-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 67CE7F7F81173621961A2B70171D3D7A
|
||||
Operation = DECRYPT
|
||||
@@ -401,6 +426,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 2E1E8A1DD59B88B1C8E60FED1EFAC4C9
|
||||
|
||||
Cipher = AES-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 2E1E8A1DD59B88B1C8E60FED1EFAC4C9
|
||||
Operation = DECRYPT
|
||||
@@ -409,6 +435,7 @@ Ciphertext = C05F9F9CA9834FA042AE8FBA584B09FF
|
||||
|
||||
# CFB128-AES256.Encrypt
|
||||
Cipher = AES-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -416,6 +443,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = DC7E84BFDA79164B7ECD8486985D3860
|
||||
|
||||
Cipher = AES-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = DC7E84BFDA79164B7ECD8486985D3860
|
||||
Operation = ENCRYPT
|
||||
@@ -423,6 +451,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 39FFED143B28B1C832113C6331E5407B
|
||||
|
||||
Cipher = AES-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 39FFED143B28B1C832113C6331E5407B
|
||||
Operation = ENCRYPT
|
||||
@@ -430,6 +459,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = DF10132415E54B92A13ED0A8267AE2F9
|
||||
|
||||
Cipher = AES-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = DF10132415E54B92A13ED0A8267AE2F9
|
||||
Operation = ENCRYPT
|
||||
@@ -438,6 +468,7 @@ Ciphertext = 75A385741AB9CEF82031623D55B1E471
|
||||
|
||||
# CFB128-AES256.Decrypt
|
||||
Cipher = AES-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -445,6 +476,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = DC7E84BFDA79164B7ECD8486985D3860
|
||||
|
||||
Cipher = AES-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = DC7E84BFDA79164B7ECD8486985D3860
|
||||
Operation = DECRYPT
|
||||
@@ -452,6 +484,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 39FFED143B28B1C832113C6331E5407B
|
||||
|
||||
Cipher = AES-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 39FFED143B28B1C832113C6331E5407B
|
||||
Operation = DECRYPT
|
||||
@@ -459,6 +492,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = DF10132415E54B92A13ED0A8267AE2F9
|
||||
|
||||
Cipher = AES-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = DF10132415E54B92A13ED0A8267AE2F9
|
||||
Operation = DECRYPT
|
||||
@@ -469,6 +503,7 @@ Ciphertext = 75A385741AB9CEF82031623D55B1E471
|
||||
# AES-bits-CFB:key:IV/output':plaintext:ciphertext:encdec
|
||||
# OFB-AES128.Encrypt
|
||||
Cipher = AES-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -476,6 +511,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 3B3FD92EB72DAD20333449F8E83CFB4A
|
||||
|
||||
Cipher = AES-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 50FE67CC996D32B6DA0937E99BAFEC60
|
||||
Operation = ENCRYPT
|
||||
@@ -483,6 +519,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 7789508D16918F03F53C52DAC54ED825
|
||||
|
||||
Cipher = AES-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = D9A4DADA0892239F6B8B3D7680E15674
|
||||
Operation = ENCRYPT
|
||||
@@ -490,6 +527,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 9740051E9C5FECF64344F7A82260EDCC
|
||||
|
||||
Cipher = AES-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = A78819583F0308E7A6BF36B1386ABF23
|
||||
Operation = ENCRYPT
|
||||
@@ -498,6 +536,7 @@ Ciphertext = 304C6528F659C77866A510D9C1D6AE5E
|
||||
|
||||
# OFB-AES128.Decrypt
|
||||
Cipher = AES-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -505,6 +544,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 3B3FD92EB72DAD20333449F8E83CFB4A
|
||||
|
||||
Cipher = AES-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 50FE67CC996D32B6DA0937E99BAFEC60
|
||||
Operation = DECRYPT
|
||||
@@ -512,6 +552,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 7789508D16918F03F53C52DAC54ED825
|
||||
|
||||
Cipher = AES-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = D9A4DADA0892239F6B8B3D7680E15674
|
||||
Operation = DECRYPT
|
||||
@@ -519,6 +560,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 9740051E9C5FECF64344F7A82260EDCC
|
||||
|
||||
Cipher = AES-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = A78819583F0308E7A6BF36B1386ABF23
|
||||
Operation = DECRYPT
|
||||
@@ -527,6 +569,7 @@ Ciphertext = 304C6528F659C77866A510D9C1D6AE5E
|
||||
|
||||
# OFB-AES192.Encrypt
|
||||
Cipher = AES-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -534,6 +577,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CDC80D6FDDF18CAB34C25909C99A4174
|
||||
|
||||
Cipher = AES-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = A609B38DF3B1133DDDFF2718BA09565E
|
||||
Operation = ENCRYPT
|
||||
@@ -541,6 +585,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = FCC28B8D4C63837C09E81700C1100401
|
||||
|
||||
Cipher = AES-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 52EF01DA52602FE0975F78AC84BF8A50
|
||||
Operation = ENCRYPT
|
||||
@@ -548,6 +593,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 8D9A9AEAC0F6596F559C6D4DAF59A5F2
|
||||
|
||||
Cipher = AES-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = BD5286AC63AABD7EB067AC54B553F71D
|
||||
Operation = ENCRYPT
|
||||
@@ -556,6 +602,7 @@ Ciphertext = 6D9F200857CA6C3E9CAC524BD9ACC92A
|
||||
|
||||
# OFB-AES192.Decrypt
|
||||
Cipher = AES-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -563,6 +610,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CDC80D6FDDF18CAB34C25909C99A4174
|
||||
|
||||
Cipher = AES-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = A609B38DF3B1133DDDFF2718BA09565E
|
||||
Operation = ENCRYPT
|
||||
@@ -570,6 +618,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = FCC28B8D4C63837C09E81700C1100401
|
||||
|
||||
Cipher = AES-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 52EF01DA52602FE0975F78AC84BF8A50
|
||||
Operation = ENCRYPT
|
||||
@@ -577,6 +626,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 8D9A9AEAC0F6596F559C6D4DAF59A5F2
|
||||
|
||||
Cipher = AES-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = BD5286AC63AABD7EB067AC54B553F71D
|
||||
Operation = ENCRYPT
|
||||
@@ -585,6 +635,7 @@ Ciphertext = 6D9F200857CA6C3E9CAC524BD9ACC92A
|
||||
|
||||
# OFB-AES256.Encrypt
|
||||
Cipher = AES-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -592,6 +643,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = DC7E84BFDA79164B7ECD8486985D3860
|
||||
|
||||
Cipher = AES-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = B7BF3A5DF43989DD97F0FA97EBCE2F4A
|
||||
Operation = ENCRYPT
|
||||
@@ -599,6 +651,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 4FEBDC6740D20B3AC88F6AD82A4FB08D
|
||||
|
||||
Cipher = AES-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = E1C656305ED1A7A6563805746FE03EDC
|
||||
Operation = ENCRYPT
|
||||
@@ -606,6 +659,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 71AB47A086E86EEDF39D1C5BBA97C408
|
||||
|
||||
Cipher = AES-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 41635BE625B48AFC1666DD42A09D96E7
|
||||
Operation = ENCRYPT
|
||||
@@ -614,6 +668,7 @@ Ciphertext = 0126141D67F37BE8538F5A8BE740E484
|
||||
|
||||
# OFB-AES256.Decrypt
|
||||
Cipher = AES-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -621,6 +676,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = DC7E84BFDA79164B7ECD8486985D3860
|
||||
|
||||
Cipher = AES-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = B7BF3A5DF43989DD97F0FA97EBCE2F4A
|
||||
Operation = DECRYPT
|
||||
@@ -628,6 +684,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 4FEBDC6740D20B3AC88F6AD82A4FB08D
|
||||
|
||||
Cipher = AES-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = E1C656305ED1A7A6563805746FE03EDC
|
||||
Operation = DECRYPT
|
||||
@@ -635,6 +692,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 71AB47A086E86EEDF39D1C5BBA97C408
|
||||
|
||||
Cipher = AES-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 41635BE625B48AFC1666DD42A09D96E7
|
||||
Operation = DECRYPT
|
||||
@@ -994,6 +1052,7 @@ Ciphertext = 6268c6fa2a80b2d137467f092f657ac04d89be2beaa623d61b5a868c8f03ff95d3d
|
||||
|
||||
#AES OCB Test vectors
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD =
|
||||
@@ -1002,6 +1061,7 @@ Plaintext =
|
||||
Ciphertext =
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 0001020304050607
|
||||
@@ -1010,6 +1070,7 @@ Plaintext = 0001020304050607
|
||||
Ciphertext = 92B657130A74B85A
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 0001020304050607
|
||||
@@ -1018,6 +1079,7 @@ Plaintext =
|
||||
Ciphertext =
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD =
|
||||
@@ -1026,6 +1088,7 @@ Plaintext = 0001020304050607
|
||||
Ciphertext = 92B657130A74B85A
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F
|
||||
@@ -1034,6 +1097,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F
|
||||
Ciphertext = BEA5E8798DBE7110031C144DA0B26122
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F
|
||||
@@ -1042,6 +1106,7 @@ Plaintext =
|
||||
Ciphertext =
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD =
|
||||
@@ -1050,6 +1115,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F
|
||||
Ciphertext = BEA5E8798DBE7110031C144DA0B26122
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F1011121314151617
|
||||
@@ -1058,6 +1124,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F1011121314151617
|
||||
Ciphertext = BEA5E8798DBE7110031C144DA0B26122FCFCEE7A2A8D4D48
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F1011121314151617
|
||||
@@ -1066,6 +1133,7 @@ Plaintext =
|
||||
Ciphertext =
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD =
|
||||
@@ -1074,6 +1142,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F1011121314151617
|
||||
Ciphertext = BEA5E8798DBE7110031C144DA0B26122FCFCEE7A2A8D4D48
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
|
||||
@@ -1082,6 +1151,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
|
||||
Ciphertext = BEA5E8798DBE7110031C144DA0B26122CEAAB9B05DF771A657149D53773463CB
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
|
||||
@@ -1090,6 +1160,7 @@ Plaintext =
|
||||
Ciphertext =
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD =
|
||||
@@ -1098,6 +1169,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
|
||||
Ciphertext = BEA5E8798DBE7110031C144DA0B26122CEAAB9B05DF771A657149D53773463CB
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1106,6 +1178,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = BEA5E8798DBE7110031C144DA0B26122CEAAB9B05DF771A657149D53773463CB68C65778B058A635
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1114,6 +1187,7 @@ Plaintext =
|
||||
Ciphertext =
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD =
|
||||
@@ -1123,6 +1197,7 @@ Ciphertext = BEA5E8798DBE7110031C144DA0B26122CEAAB9B05DF771A657149D53773463CB68C
|
||||
|
||||
#AES OCB Non standard test vectors - generated from reference implementation
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1131,6 +1206,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = 09a4fd29de949d9a9aa9924248422097ad4883b4713e6c214ff6567ada08a96766fc4e2ee3e3a5a1
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B0C0D0E
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1139,6 +1215,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = 5e2fa7367ffbdb3938845cfd415fcc71ec79634eb31451609d27505f5e2978f43c44213d8fa441ee
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1147,6 +1224,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C822D6
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1155,6 +1233,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F714FF
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1163,6 +1242,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F77C528A1DE6406B519BCEE8FCB8294170634D
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1171,6 +1251,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F77C528A1DE6406B519BCEE8FCB829417001E54E15A7576C4DF32366E0F439C7050FAA
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1179,6 +1260,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F77C528A1DE6406B519BCEE8FCB829417001E54E15A7576C4DF32366E0F439C7051CB4824B8114E9A720CBC1CE0185B156B486
|
||||
|
||||
Cipher = aes-128-ocb
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
IV = 000102030405060708090A0B
|
||||
AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
|
||||
@@ -1200,18 +1282,18 @@ Ciphertext = 917cf69ebd68b2ec9b9fe9a3eadda692cd43d2f59598ed858c02c2652fbf922e
|
||||
Result = KEY_SET_ERROR
|
||||
|
||||
# Using the same key twice for decryption is banned in FIPS mode.
|
||||
#Cipher = aes-128-xts
|
||||
#FIPS = YES
|
||||
#Operation = DECRYPT
|
||||
#Key = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
#IV = 00000000000000000000000000000000
|
||||
#Plaintext = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
#Ciphertext = 917cf69ebd68b2ec9b9fe9a3eadda692cd43d2f59598ed858c02c2652fbf922e
|
||||
#Result = KEY_SET_ERROR
|
||||
Cipher = aes-128-xts
|
||||
Availablein = fips
|
||||
Operation = DECRYPT
|
||||
Key = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 00000000000000000000000000000000
|
||||
Plaintext = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
Ciphertext = 917cf69ebd68b2ec9b9fe9a3eadda692cd43d2f59598ed858c02c2652fbf922e
|
||||
Result = KEY_SET_ERROR
|
||||
|
||||
# Using the same key twice for decryption is allowed outside of FIPS mode.
|
||||
Cipher = aes-128-xts
|
||||
#FIPS = NO
|
||||
Availablein = default
|
||||
Operation = DECRYPT
|
||||
Key = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 00000000000000000000000000000000
|
||||
@@ -1502,34 +1584,40 @@ Title = Camellia tests from RFC3713
|
||||
# For all ECB encrypts and decrypts, the transformed sequence is
|
||||
# CAMELLIA-bits-ECB:key::plaintext:ciphertext:encdec
|
||||
Cipher = CAMELLIA-128-ECB
|
||||
Availablein = default
|
||||
Key = 0123456789abcdeffedcba9876543210
|
||||
Plaintext = 0123456789abcdeffedcba9876543210
|
||||
Ciphertext = 67673138549669730857065648eabe43
|
||||
|
||||
Cipher = CAMELLIA-192-ECB
|
||||
Availablein = default
|
||||
Key = 0123456789abcdeffedcba98765432100011223344556677
|
||||
Plaintext = 0123456789abcdeffedcba9876543210
|
||||
Ciphertext = b4993401b3e996f84ee5cee7d79b09b9
|
||||
|
||||
Cipher = CAMELLIA-256-ECB
|
||||
Availablein = default
|
||||
Key = 0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff
|
||||
Plaintext = 0123456789abcdeffedcba9876543210
|
||||
Ciphertext = 9acc237dff16d76c20ef7c919e3a7509
|
||||
|
||||
# ECB-CAMELLIA128.Encrypt
|
||||
Cipher = CAMELLIA-128-ECB
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 00112233445566778899AABBCCDDEEFF
|
||||
Ciphertext = 77CF412067AF8270613529149919546F
|
||||
|
||||
Cipher = CAMELLIA-192-ECB
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F1011121314151617
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 00112233445566778899AABBCCDDEEFF
|
||||
Ciphertext = B22F3C36B72D31329EEE8ADDC2906C68
|
||||
|
||||
Cipher = CAMELLIA-256-ECB
|
||||
Availablein = default
|
||||
Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 00112233445566778899AABBCCDDEEFF
|
||||
@@ -1538,21 +1626,25 @@ Ciphertext = 2EDF1F3418D53B88841FC8985FB1ECF2
|
||||
|
||||
# ECB-CAMELLIA128.Encrypt and ECB-CAMELLIA128.Decrypt
|
||||
Cipher = CAMELLIA-128-ECB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 432FC5DCD628115B7C388D770B270C96
|
||||
|
||||
Cipher = CAMELLIA-128-ECB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 0BE1F14023782A22E8384C5ABB7FAB2B
|
||||
|
||||
Cipher = CAMELLIA-128-ECB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = A0A1ABCD1893AB6FE0FE5B65DF5F8636
|
||||
|
||||
Cipher = CAMELLIA-128-ECB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
|
||||
Ciphertext = E61925E0D5DFAA9BB29F815B3076E51A
|
||||
@@ -1560,21 +1652,25 @@ Ciphertext = E61925E0D5DFAA9BB29F815B3076E51A
|
||||
|
||||
# ECB-CAMELLIA192.Encrypt and ECB-CAMELLIA192.Decrypt
|
||||
Cipher = CAMELLIA-192-ECB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CCCC6C4E138B45848514D48D0D3439D3
|
||||
|
||||
Cipher = CAMELLIA-192-ECB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 5713C62C14B2EC0F8393B6AFD6F5785A
|
||||
|
||||
Cipher = CAMELLIA-192-ECB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = B40ED2B60EB54D09D030CF511FEEF366
|
||||
|
||||
Cipher = CAMELLIA-192-ECB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
|
||||
Ciphertext = 909DBD95799096748CB27357E73E1D26
|
||||
@@ -1582,21 +1678,25 @@ Ciphertext = 909DBD95799096748CB27357E73E1D26
|
||||
|
||||
# ECB-CAMELLIA256.Encrypt and ECB-CAMELLIA256.Decrypt
|
||||
Cipher = CAMELLIA-256-ECB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = BEFD219B112FA00098919CD101C9CCFA
|
||||
|
||||
Cipher = CAMELLIA-256-ECB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = C91D3A8F1AEA08A9386CF4B66C0169EA
|
||||
|
||||
Cipher = CAMELLIA-256-ECB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = A623D711DC5F25A51BB8A80D56397D28
|
||||
|
||||
Cipher = CAMELLIA-256-ECB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
|
||||
Ciphertext = 7960109FB6DC42947FCFE59EA3C5EB6B
|
||||
@@ -1606,24 +1706,28 @@ Ciphertext = 7960109FB6DC42947FCFE59EA3C5EB6B
|
||||
# CAMELLIA-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec
|
||||
# CBC-CAMELLIA128.Encrypt and CBC-CAMELLIA128.Decrypt
|
||||
Cipher = CAMELLIA-128-CBC
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 1607CF494B36BBF00DAEB0B503C831AB
|
||||
|
||||
Cipher = CAMELLIA-128-CBC
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 1607CF494B36BBF00DAEB0B503C831AB
|
||||
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = A2F2CF671629EF7840C5A5DFB5074887
|
||||
|
||||
Cipher = CAMELLIA-128-CBC
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = A2F2CF671629EF7840C5A5DFB5074887
|
||||
Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 0F06165008CF8B8B5A63586362543E54
|
||||
|
||||
Cipher = CAMELLIA-128-CBC
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 36A84CDAFD5F9A85ADA0F0A993D6D577
|
||||
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
|
||||
@@ -1632,24 +1736,28 @@ Ciphertext = 74C64268CDB8B8FAF5B34E8AF3732980
|
||||
|
||||
# CBC-CAMELLIA192.Encrypt and CBC-CAMELLIA192.Decrypt
|
||||
Cipher = CAMELLIA-192-CBC
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 2A4830AB5AC4A1A2405955FD2195CF93
|
||||
|
||||
Cipher = CAMELLIA-192-CBC
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 2A4830AB5AC4A1A2405955FD2195CF93
|
||||
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 5D5A869BD14CE54264F892A6DD2EC3D5
|
||||
|
||||
Cipher = CAMELLIA-192-CBC
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 5D5A869BD14CE54264F892A6DD2EC3D5
|
||||
Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 37D359C3349836D884E310ADDF68C449
|
||||
|
||||
Cipher = CAMELLIA-192-CBC
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 37D359C3349836D884E310ADDF68C449
|
||||
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
|
||||
@@ -1658,24 +1766,28 @@ Ciphertext = 01FAAA930B4AB9916E9668E1428C6B08
|
||||
|
||||
# CBC-CAMELLIA256.Encrypt and CBC-CAMELLIA256.Decrypt
|
||||
Cipher = CAMELLIA-256-CBC
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = E6CFA35FC02B134A4D2C0B6737AC3EDA
|
||||
|
||||
Cipher = CAMELLIA-256-CBC
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = E6CFA35FC02B134A4D2C0B6737AC3EDA
|
||||
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 36CBEB73BD504B4070B1B7DE2B21EB50
|
||||
|
||||
Cipher = CAMELLIA-256-CBC
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 36CBEB73BD504B4070B1B7DE2B21EB50
|
||||
Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = E31A6055297D96CA3330CDF1B1860A83
|
||||
|
||||
Cipher = CAMELLIA-256-CBC
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = E31A6055297D96CA3330CDF1B1860A83
|
||||
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
|
||||
@@ -1687,6 +1799,7 @@ Ciphertext = 5D563F6D1CCCF236051C0C5C1C58F28F
|
||||
# CAMELLIA-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec
|
||||
# CFB128-CAMELLIA128.Encrypt
|
||||
Cipher = CAMELLIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -1694,6 +1807,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 14F7646187817EB586599146B82BD719
|
||||
|
||||
Cipher = CAMELLIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 14F7646187817EB586599146B82BD719
|
||||
Operation = ENCRYPT
|
||||
@@ -1701,6 +1815,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = A53D28BB82DF741103EA4F921A44880B
|
||||
|
||||
Cipher = CAMELLIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = A53D28BB82DF741103EA4F921A44880B
|
||||
Operation = ENCRYPT
|
||||
@@ -1708,6 +1823,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 9C2157A664626D1DEF9EA420FDE69B96
|
||||
|
||||
Cipher = CAMELLIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 9C2157A664626D1DEF9EA420FDE69B96
|
||||
Operation = ENCRYPT
|
||||
@@ -1717,6 +1833,7 @@ Ciphertext = 742A25F0542340C7BAEF24CA8482BB09
|
||||
|
||||
# CFB128-CAMELLIA128.Decrypt
|
||||
Cipher = CAMELLIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -1724,6 +1841,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 14F7646187817EB586599146B82BD719
|
||||
|
||||
Cipher = CAMELLIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 14F7646187817EB586599146B82BD719
|
||||
Operation = DECRYPT
|
||||
@@ -1731,6 +1849,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = A53D28BB82DF741103EA4F921A44880B
|
||||
|
||||
Cipher = CAMELLIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = A53D28BB82DF741103EA4F921A44880B
|
||||
Operation = DECRYPT
|
||||
@@ -1738,6 +1857,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 9C2157A664626D1DEF9EA420FDE69B96
|
||||
|
||||
Cipher = CAMELLIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 9C2157A664626D1DEF9EA420FDE69B96
|
||||
Operation = DECRYPT
|
||||
@@ -1747,6 +1867,7 @@ Ciphertext = 742A25F0542340C7BAEF24CA8482BB09
|
||||
|
||||
# CFB128-CAMELLIA192.Encrypt
|
||||
Cipher = CAMELLIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -1754,6 +1875,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = C832BB9780677DAA82D9B6860DCD565E
|
||||
|
||||
Cipher = CAMELLIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = C832BB9780677DAA82D9B6860DCD565E
|
||||
Operation = ENCRYPT
|
||||
@@ -1761,6 +1883,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 86F8491627906D780C7A6D46EA331F98
|
||||
|
||||
Cipher = CAMELLIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 86F8491627906D780C7A6D46EA331F98
|
||||
Operation = ENCRYPT
|
||||
@@ -1768,6 +1891,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 69511CCE594CF710CB98BB63D7221F01
|
||||
|
||||
Cipher = CAMELLIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 69511CCE594CF710CB98BB63D7221F01
|
||||
Operation = ENCRYPT
|
||||
@@ -1777,6 +1901,7 @@ Ciphertext = D5B5378A3ABED55803F25565D8907B84
|
||||
|
||||
# CFB128-CAMELLIA192.Decrypt
|
||||
Cipher = CAMELLIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -1784,6 +1909,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = C832BB9780677DAA82D9B6860DCD565E
|
||||
|
||||
Cipher = CAMELLIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = C832BB9780677DAA82D9B6860DCD565E
|
||||
Operation = DECRYPT
|
||||
@@ -1791,6 +1917,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 86F8491627906D780C7A6D46EA331F98
|
||||
|
||||
Cipher = CAMELLIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 86F8491627906D780C7A6D46EA331F98
|
||||
Operation = DECRYPT
|
||||
@@ -1798,6 +1925,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 69511CCE594CF710CB98BB63D7221F01
|
||||
|
||||
Cipher = CAMELLIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 69511CCE594CF710CB98BB63D7221F01
|
||||
Operation = DECRYPT
|
||||
@@ -1807,6 +1935,7 @@ Ciphertext = D5B5378A3ABED55803F25565D8907B84
|
||||
|
||||
# CFB128-CAMELLIA256.Encrypt
|
||||
Cipher = CAMELLIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -1814,6 +1943,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CF6107BB0CEA7D7FB1BD31F5E7B06C93
|
||||
|
||||
Cipher = CAMELLIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = CF6107BB0CEA7D7FB1BD31F5E7B06C93
|
||||
Operation = ENCRYPT
|
||||
@@ -1821,6 +1951,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 89BEDB4CCDD864EA11BA4CBE849B5E2B
|
||||
|
||||
Cipher = CAMELLIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 89BEDB4CCDD864EA11BA4CBE849B5E2B
|
||||
Operation = ENCRYPT
|
||||
@@ -1828,6 +1959,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 555FC3F34BDD2D54C62D9E3BF338C1C4
|
||||
|
||||
Cipher = CAMELLIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 555FC3F34BDD2D54C62D9E3BF338C1C4
|
||||
Operation = ENCRYPT
|
||||
@@ -1837,6 +1969,7 @@ Ciphertext = 5953ADCE14DB8C7F39F1BD39F359BFFA
|
||||
|
||||
# CFB128-CAMELLIA256.Decrypt
|
||||
Cipher = CAMELLIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -1844,6 +1977,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CF6107BB0CEA7D7FB1BD31F5E7B06C93
|
||||
|
||||
Cipher = CAMELLIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = CF6107BB0CEA7D7FB1BD31F5E7B06C93
|
||||
Operation = DECRYPT
|
||||
@@ -1851,6 +1985,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 89BEDB4CCDD864EA11BA4CBE849B5E2B
|
||||
|
||||
Cipher = CAMELLIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 89BEDB4CCDD864EA11BA4CBE849B5E2B
|
||||
Operation = DECRYPT
|
||||
@@ -1858,6 +1993,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 555FC3F34BDD2D54C62D9E3BF338C1C4
|
||||
|
||||
Cipher = CAMELLIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 555FC3F34BDD2D54C62D9E3BF338C1C4
|
||||
Operation = DECRYPT
|
||||
@@ -1869,6 +2005,7 @@ Ciphertext = 5953ADCE14DB8C7F39F1BD39F359BFFA
|
||||
# CAMELLIA-bits-OFB:key:IV/output':plaintext:ciphertext:encdec
|
||||
# OFB-CAMELLIA128.Encrypt
|
||||
Cipher = CAMELLIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -1876,6 +2013,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 14F7646187817EB586599146B82BD719
|
||||
|
||||
Cipher = CAMELLIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 50FE67CC996D32B6DA0937E99BAFEC60
|
||||
Operation = ENCRYPT
|
||||
@@ -1883,6 +2021,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 25623DB569CA51E01482649977E28D84
|
||||
|
||||
Cipher = CAMELLIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = D9A4DADA0892239F6B8B3D7680E15674
|
||||
Operation = ENCRYPT
|
||||
@@ -1890,6 +2029,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = C776634A60729DC657D12B9FCA801E98
|
||||
|
||||
Cipher = CAMELLIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = A78819583F0308E7A6BF36B1386ABF23
|
||||
Operation = ENCRYPT
|
||||
@@ -1899,6 +2039,7 @@ Ciphertext = D776379BE0E50825E681DA1A4C980E8E
|
||||
|
||||
# OFB-CAMELLIA128.Decrypt
|
||||
Cipher = CAMELLIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -1906,6 +2047,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = 14F7646187817EB586599146B82BD719
|
||||
|
||||
Cipher = CAMELLIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = 50FE67CC996D32B6DA0937E99BAFEC60
|
||||
Operation = DECRYPT
|
||||
@@ -1913,6 +2055,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 25623DB569CA51E01482649977E28D84
|
||||
|
||||
Cipher = CAMELLIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = D9A4DADA0892239F6B8B3D7680E15674
|
||||
Operation = DECRYPT
|
||||
@@ -1920,6 +2063,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = C776634A60729DC657D12B9FCA801E98
|
||||
|
||||
Cipher = CAMELLIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 2B7E151628AED2A6ABF7158809CF4F3C
|
||||
IV = A78819583F0308E7A6BF36B1386ABF23
|
||||
Operation = DECRYPT
|
||||
@@ -1929,6 +2073,7 @@ Ciphertext = D776379BE0E50825E681DA1A4C980E8E
|
||||
|
||||
# OFB-CAMELLIA192.Encrypt
|
||||
Cipher = CAMELLIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -1936,6 +2081,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = C832BB9780677DAA82D9B6860DCD565E
|
||||
|
||||
Cipher = CAMELLIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = A609B38DF3B1133DDDFF2718BA09565E
|
||||
Operation = ENCRYPT
|
||||
@@ -1943,6 +2089,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 8ECEB7D0350D72C7F78562AEBDF99339
|
||||
|
||||
Cipher = CAMELLIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 52EF01DA52602FE0975F78AC84BF8A50
|
||||
Operation = ENCRYPT
|
||||
@@ -1950,6 +2097,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = BDD62DBBB9700846C53B507F544696F0
|
||||
|
||||
Cipher = CAMELLIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = BD5286AC63AABD7EB067AC54B553F71D
|
||||
Operation = ENCRYPT
|
||||
@@ -1959,6 +2107,7 @@ Ciphertext = E28014E046B802F385C4C2E13EAD4A72
|
||||
|
||||
# OFB-CAMELLIA192.Decrypt
|
||||
Cipher = CAMELLIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -1966,6 +2115,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = C832BB9780677DAA82D9B6860DCD565E
|
||||
|
||||
Cipher = CAMELLIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = A609B38DF3B1133DDDFF2718BA09565E
|
||||
Operation = DECRYPT
|
||||
@@ -1973,6 +2123,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 8ECEB7D0350D72C7F78562AEBDF99339
|
||||
|
||||
Cipher = CAMELLIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = 52EF01DA52602FE0975F78AC84BF8A50
|
||||
Operation = DECRYPT
|
||||
@@ -1980,6 +2131,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = BDD62DBBB9700846C53B507F544696F0
|
||||
|
||||
Cipher = CAMELLIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
|
||||
IV = BD5286AC63AABD7EB067AC54B553F71D
|
||||
Operation = DECRYPT
|
||||
@@ -1989,6 +2141,7 @@ Ciphertext = E28014E046B802F385C4C2E13EAD4A72
|
||||
|
||||
# OFB-CAMELLIA256.Encrypt
|
||||
Cipher = CAMELLIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
@@ -1996,6 +2149,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CF6107BB0CEA7D7FB1BD31F5E7B06C93
|
||||
|
||||
Cipher = CAMELLIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = B7BF3A5DF43989DD97F0FA97EBCE2F4A
|
||||
Operation = ENCRYPT
|
||||
@@ -2003,6 +2157,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 127AD97E8E3994E4820027D7BA109368
|
||||
|
||||
Cipher = CAMELLIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = E1C656305ED1A7A6563805746FE03EDC
|
||||
Operation = ENCRYPT
|
||||
@@ -2010,6 +2165,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 6BFF6265A6A6B7A535BC65A80B17214E
|
||||
|
||||
Cipher = CAMELLIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 41635BE625B48AFC1666DD42A09D96E7
|
||||
Operation = ENCRYPT
|
||||
@@ -2019,6 +2175,7 @@ Ciphertext = 0A4A0404E26AA78A27CB271E8BF3CF20
|
||||
|
||||
# OFB-CAMELLIA256.Decrypt
|
||||
Cipher = CAMELLIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
@@ -2026,6 +2183,7 @@ Plaintext = 6BC1BEE22E409F96E93D7E117393172A
|
||||
Ciphertext = CF6107BB0CEA7D7FB1BD31F5E7B06C93
|
||||
|
||||
Cipher = CAMELLIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = B7BF3A5DF43989DD97F0FA97EBCE2F4A
|
||||
Operation = DECRYPT
|
||||
@@ -2033,6 +2191,7 @@ Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51
|
||||
Ciphertext = 127AD97E8E3994E4820027D7BA109368
|
||||
|
||||
Cipher = CAMELLIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = E1C656305ED1A7A6563805746FE03EDC
|
||||
Operation = DECRYPT
|
||||
@@ -2040,6 +2199,7 @@ Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF
|
||||
Ciphertext = 6BFF6265A6A6B7A535BC65A80B17214E
|
||||
|
||||
Cipher = CAMELLIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
|
||||
IV = 41635BE625B48AFC1666DD42A09D96E7
|
||||
Operation = DECRYPT
|
||||
@@ -2049,6 +2209,7 @@ Ciphertext = 0A4A0404E26AA78A27CB271E8BF3CF20
|
||||
|
||||
# Camellia test vectors from RFC5528
|
||||
Cipher = CAMELLIA-128-CTR
|
||||
Availablein = default
|
||||
Key = AE6852F8121067CC4BF7A5765577F39E
|
||||
IV = 00000030000000000000000000000001
|
||||
Operation = ENCRYPT
|
||||
@@ -2056,6 +2217,7 @@ Plaintext = 53696E676C6520626C6F636B206D7367
|
||||
Ciphertext = D09DC29A8214619A20877C76DB1F0B3F
|
||||
|
||||
Cipher = CAMELLIA-128-CTR
|
||||
Availablein = default
|
||||
Key = 7E24067817FAE0D743D6CE1F32539163
|
||||
IV = 006CB6DBC0543B59DA48D90B00000001
|
||||
Operation = ENCRYPT
|
||||
@@ -2063,6 +2225,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
|
||||
Ciphertext = DBF3C78DC08396D4DA7C907765BBCB442B8E8E0F31F0DCA72C7417E35360E048
|
||||
|
||||
Cipher = CAMELLIA-128-CTR
|
||||
Availablein = default
|
||||
Key = 7691BE035E5020A8AC6E618529F9A0DC
|
||||
IV = 00E0017B27777F3F4A1786F000000001
|
||||
Operation = ENCRYPT
|
||||
@@ -2070,6 +2233,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = B19D1FCDCB75EB882F849CE24D85CF739CE64B2B5C9D73F14F2D5D9DCE9889CDDF508696
|
||||
|
||||
Cipher = CAMELLIA-192-CTR
|
||||
Availablein = default
|
||||
Key = 16AF5B145FC9F579C175F93E3BFB0EED863D06CCFDB78515
|
||||
IV = 0000004836733C147D6D93CB00000001
|
||||
Operation = ENCRYPT
|
||||
@@ -2077,6 +2241,7 @@ Plaintext = 53696E676C6520626C6F636B206D7367
|
||||
Ciphertext = 2379399E8A8D2B2B16702FC78B9E9696
|
||||
|
||||
Cipher = CAMELLIA-192-CTR
|
||||
Availablein = default
|
||||
Key = 7C5CB2401B3DC33C19E7340819E0F69C678C3DB8E6F6A91A
|
||||
IV = 0096B03B020C6EADC2CB500D00000001
|
||||
Operation = ENCRYPT
|
||||
@@ -2084,6 +2249,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
|
||||
Ciphertext = 7DEF34F7A5D0E415674B7FFCAE67C75DD018B86FF23051E056392A99F35A4CED
|
||||
|
||||
Cipher = CAMELLIA-192-CTR
|
||||
Availablein = default
|
||||
Key = 02BF391EE8ECB159B959617B0965279BF59B60A786D3E0FE
|
||||
IV = 0007BDFD5CBD60278DCC091200000001
|
||||
Operation = ENCRYPT
|
||||
@@ -2091,6 +2257,7 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021
|
||||
Ciphertext = 5710E556E1487A20B5AC0E73F19E4E7876F37FDC91B1EF4D4DADE8E666A64D0ED557AB57
|
||||
|
||||
Cipher = CAMELLIA-256-CTR
|
||||
Availablein = default
|
||||
Key = 776BEFF2851DB06F4C8A0542C8696F6C6A81AF1EEC96B4D37FC1D689E6C1C104
|
||||
IV = 00000060DB5672C97AA8F0B200000001
|
||||
Operation = ENCRYPT
|
||||
@@ -2098,6 +2265,7 @@ Plaintext = 53696E676C6520626C6F636B206D7367
|
||||
Ciphertext = 3401F9C8247EFFCEBD6994714C1BBB11
|
||||
|
||||
Cipher = CAMELLIA-256-CTR
|
||||
Availablein = default
|
||||
Key = F6D66D6BD52D59BB0796365879EFF886C66DD51A5B6A99744B50590C87A23884
|
||||
IV = 00FAAC24C1585EF15A43D87500000001
|
||||
Operation = ENCRYPT
|
||||
@@ -2105,161 +2273,152 @@ Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
|
||||
Ciphertext = D6C30392246F7808A83C2B22A8839E45E51CD48A1CDF406EBC9CC2D3AB834108
|
||||
|
||||
Cipher = CAMELLIA-256-CTR
|
||||
Availablein = default
|
||||
Key = FF7A617CE69148E4F1726E2F43581DE2AA62D9F805532EDFF1EED687FB54153D
|
||||
IV = 001CC5B751A51D70A1C1114800000001
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20212223
|
||||
Ciphertext = A4DA23FCE6A5FFAA6D64AE9A0652A42CD161A34B65F9679F75C01F101F71276F15EF0D8D
|
||||
|
||||
Title = SM4 test vectors from IETF draft-ribose-cfrg-sm4
|
||||
|
||||
Cipher = SM4-ECB
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEFFEDCBA9876543210
|
||||
Ciphertext = 681EDF34D206965E86B3E94F536E4246
|
||||
|
||||
Cipher = SM4-CBC
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
IV = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
|
||||
Ciphertext = 2677F46B09C122CC975533105BD4A22AF6125F7275CE552C3A2BBCF533DE8A3B
|
||||
|
||||
Cipher = SM4-OFB
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
IV = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
|
||||
Ciphertext = 693D9A535BAD5BB1786F53D7253A7056F2075D28B5235F58D50027E4177D2BCE
|
||||
|
||||
Cipher = SM4-CFB
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
IV = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
|
||||
Ciphertext = 693D9A535BAD5BB1786F53D7253A70569ED258A85A0467CC92AAB393DD978995
|
||||
|
||||
Cipher = SM4-CTR
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
IV = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAA
|
||||
Ciphertext = C2B4759E78AC3CF43D0852F4E8D5F9FD7256E8A5FCB65A350EE00630912E44492A0B17E1B85B060D0FBA612D8A95831638B361FD5FFACD942F081485A83CA35D
|
||||
|
||||
Title = ARIA test vectors from RFC5794 (and others)
|
||||
|
||||
Cipher = ARIA-128-ECB
|
||||
Availablein = default
|
||||
Key = 000102030405060708090a0b0c0d0e0f
|
||||
Plaintext = 00112233445566778899aabbccddeeff
|
||||
Ciphertext = d718fbd6ab644c739da95f3be6451778
|
||||
|
||||
Cipher = ARIA-192-ECB
|
||||
Availablein = default
|
||||
Key = 000102030405060708090a0b0c0d0e0f1011121314151617
|
||||
Plaintext = 00112233445566778899aabbccddeeff
|
||||
Ciphertext = 26449c1805dbe7aa25a468ce263a9e79
|
||||
|
||||
Cipher = ARIA-256-ECB
|
||||
Availablein = default
|
||||
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
|
||||
Plaintext = 00112233445566778899aabbccddeeff
|
||||
Ciphertext = f92bd7c79fb72e2f2b8f80c1972d24fc
|
||||
|
||||
# Additional ARIA mode vectors from http://210.104.33.10/ARIA/doc/ARIA-testvector-e.pdf
|
||||
Cipher = ARIA-128-ECB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = c6ecd08e22c30abdb215cf74e2075e6e29ccaac63448708d331b2f816c51b17d9e133d1528dbf0af5787c7f3a3f5c2bf6b6f345907a3055612ce072ff54de7d788424da6e8ccfe8172b391be499354165665ba7864917000a6eeb2ecb4a698edfc7887e7f556377614ab0a282293e6d884dbb84206cdb16ed1754e77a1f243fd086953f752cc1e46c7c794ae85537dcaec8dd721f55c93b6edfe2adea43873e8
|
||||
|
||||
Cipher = ARIA-128-CBC
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 49d61860b14909109cef0d22a9268134fadf9fb23151e9645fba75018bdb1538b53334634bbf7d4cd4b5377033060c155fe3948ca75de1031e1d85619e0ad61eb419a866b3c2dbfd10a4ed18b22149f75897f0b8668b0c1c542c687778835fb7cd46e45f85eaa7072437dd9fa6793d6f8d4ccefc4eb1ac641ac1bd30b18c6d64c49bca137eb21c2e04da62712ca2b4f540c57112c38791852cfac7a5d19ed83a
|
||||
|
||||
Cipher = ARIA-128-CFB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 3720e53ba7d615383406b09f0a05a200c07c21e6370f413a5d132500a68285017c61b434c7b7ca9685a51071861e4d4bb873b599b479e2d573dddeafba89f812ac6a9e44d554078eb3be94839db4b33da3f59c063123a7ef6f20e10579fa4fd239100ca73b52d4fcafeadee73f139f78f9b7614c2b3b9dbe010f87db06a89a9435f79ce8121431371f4e87b984e0230c22a6dacb32fc42dcc6accef33285bf11
|
||||
|
||||
Cipher = ARIA-128-CFB8
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 373c8f6a965599ec785cc8f8149f6c81b632ccb8e0c6eb6a9707ae52c59257a41f94701c1096933127a90195ed0c8e98690547572423bb45c3d70e4a18ee56b967c10e000ba4df5fba7c404134a343d8375d04b151d161ef83417fe1748447d30a6723c406733df7d18aa39a20752d2381942e244811bb97f72eae446b1815aa690cd1b1adcbd007c0088ecdc91cb2e2caf0e11e72459878137eea64ac62a9a1
|
||||
|
||||
Cipher = ARIA-128-OFB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 3720e53ba7d615383406b09f0a05a2000063063f0560083483faeb041c8adecef30cf80cefb002a0d280759168ec01db3d49f61aced260bd43eec0a2731730eec6fa4f2304319cf8ccac2d7be7833e4f8ae6ce967012c1c6badc5d28e7e4144f6bf5cebe01253ee202afce4bc61f28dec069a6f16f6c8a7dd2afae44148f6ff4d0029d5c607b5fa6b8c8a6301cde5c7033565cd0b8f0974ab490b236197ba04a
|
||||
|
||||
Cipher = ARIA-128-CTR
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff
|
||||
IV = 00000000000000000000000000000000
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = ac5d7de805a0bf1c57c854501af60fa11497e2a34519dea1569e91e5b5ccae2ff3bfa1bf975f4571f48be191613546c3911163c085f871f0e7ae5f2a085b81851c2a3ddf20ecb8fa51901aec8ee4ba32a35dab67bb72cd9140ad188a967ac0fbbdfa94ea6cce47dcf8525ab5a814cfeb2bb60ee2b126e2d9d847c1a9e96f9019e3e6a7fe40d3829afb73db1cc245646addb62d9b907baaafbe46a73dbc131d3d
|
||||
|
||||
Cipher = ARIA-192-ECB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff0011223344556677
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 8d1470625f59ebacb0e55b534b3e462b5f23d33bff78f46c3c15911f4a21809aaccad80b4bda915aa9dae6bcebe06a6c83f77fd5391acfe61de2f646b5d447edbfd5bb49b12fbb9145b227895a757b2af1f7188734863d7b8b6ede5a5b2f06a0a233c8523d2db778fb31b0e311f32700152f33861e9d040c83b5eb40cd88ea49975709dc629365a189f78a3ec40345fc6a5a307a8f9a4413091e007eca5645a0
|
||||
|
||||
Cipher = ARIA-192-CBC
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff0011223344556677
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = afe6cf23974b533c672a826264ea785f4e4f7f780dc7f3f1e0962b80902386d514e9c3e77259de92dd1102ffab086c1ea52a71260db5920a83295c25320e421147ca45d532f327b856ea947cd2196ae2e040826548b4c891b0ed0ca6e714dbc4631998d548110d666b3d54c2a091955c6f05beb4f62309368696c9791fc4c551564a2637f194346ec45fbca6c72a5b4612e208d531d6c34cc5c64eac6bd0cf8c
|
||||
|
||||
Cipher = ARIA-192-CFB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff0011223344556677
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 4171f7192bf4495494d2736129640f5c4d87a9a213664c9448477c6ecc2013598d9766952dd8c3868f17e36ef66fd84bfa45d1593d2d6ee3ea2115047d710d4fb66187caa3a315b3c8ea2d313962edcfe5a3e2028d5ba9a09fd5c65c19d3440e477f0cab0628ec6902c73ee02f1afee9f80115be7b9df82d1e28228e28581a20560e195cbb9e2b327bf56fd2d0ae5502e42c13e9b4015d4da42dc859252e7da4
|
||||
|
||||
Cipher = ARIA-192-CFB8
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff0011223344556677
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 411d3b4f57f705aa4d13c46e2cf426af7c8c916ed7923d889f0047bbf11471b6d54f8757ef519339105be3cb69babb976a57d5631fc23cc3051fe9d36e8b8e27a2b2c0c4d31928ccbf30ea8239b46ba1b77f6198e7ecd2ce27b35958148e826f06aaf385bd30362ff141583e7c1d8924d44d36a1133094074631e18adafa9d2e55de98f6895c89d4266ebd33f3d4be5153a96fa12132ece2e81e66e55baa7ade
|
||||
|
||||
Cipher = ARIA-192-OFB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff0011223344556677
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 4171f7192bf4495494d2736129640f5cc224d26d364b5a06ddde13d0f1e74faa846de354c63cda77469d1a2d425c47ff41734c71b3fa1fcdc11e0b2de22bfeed54898e233df652c75ae136e61de6524e62b3f806fb2e8e616eb410a1b9500537e327ffb04f19f7f82fde2b122100261f81b82723bf936be7beaaf3067d1c036001f1ade71422268d274d7dc6c6ae1970b27a5f2c2f39c1d241fe8cac5ccd74e9
|
||||
|
||||
Cipher = ARIA-192-CTR
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff0011223344556677
|
||||
IV = 00000000000000000000000000000000
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 08625ca8fe569c19ba7af3760a6ed1cef4d199263e999dde14082dbba7560b79a4c6b456b8707dce751f9854f18893dfdb3f4e5afa539733e6f1e70b98ba37891f8f81e95df8efc26c7ce043504cb18958b865e4e316cd2aa1c97f31bf23dc046ef326b95a692a191ba0f2a41c5fe9ae070f236ff7078e703b42666caafbdd20bad74ac4c20c0f46c7ca24c151716575c947da16c90cfe1bf217a41cfebe7531
|
||||
|
||||
Cipher = ARIA-256-ECB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 58a875e6044ad7fffa4f58420f7f442d8e191016f28e79aefc01e204773280d7018e5f7a938ec30711719953bae86542cd7ebc752474c1a5f6eaaace2a7e29462ee7dfa5afdb84177ead95ccd4b4bb6e1ed17b9534cff0a5fc2941429cfee2ee49c7adbeb7e9d1b0d2a8531d942079596a27ed79f5b1dd13ecd604b07a48885a3afa0627a0e4e60a3c703af292f1baa77b702f16c54aa74bc727ea95c7468b00
|
||||
|
||||
Cipher = ARIA-256-CBC
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 523a8a806ae621f155fdd28dbc34e1ab7b9b42432ad8b2efb96e23b13f0a6e52f36185d50ad002c5f601bee5493f118b243ee2e313642bffc3902e7b2efd9a12fa682edd2d23c8b9c5f043c18b17c1ec4b5867918270fbec1027c19ed6af833da5d620994668ca22f599791d292dd6273b2959082aafb7a996167cce1eec5f0cfd15f610d87e2dda9ba68ce1260ca54b222491418374294e7909b1e8551cd8de
|
||||
|
||||
Cipher = ARIA-256-CFB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 26834705b0f2c0e2588d4a7f09009635f28bb93d8c31f870ec1e0bdb082b66fa402dd9c202be300c4517d196b14d4ce11dce97f7aaba54341b0d872cc9b63753a3e8556a14be6f7b3e27e3cfc39caf80f2a355aa50dc83c09c7b11828694f8e4aa726c528976b53f2c877f4991a3a8d28adb63bd751846ffb2350265e179d4990753ae8485ff9b4133ddad5875b84a90cbcfa62a045d726df71b6bda0eeca0be
|
||||
|
||||
Cipher = ARIA-256-CFB8
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 26baa33651e1f66434fec88ef27fd2b9a79e246dd89a3ffa00e8bdb37155433e6c24bd0b87d9a85baa9f485ccb984f5ec24d6a3ef5e3c81396177f039cf580dfdb55d6e1c47a28921dfe369e12fd357b289ad3a5544e1c1bd616d454db9c5f91f603373f29d5b2ed1b4b51de80f28537bbd43d5e3b5dd071dc91153cbbe732dfc325821b06ed8acaae656dcf2da9f13e4f29db671476f1e644ff06d9b67d6bd4
|
||||
|
||||
Cipher = ARIA-256-OFB
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
|
||||
IV = 0f1e2d3c4b5a69788796a5b4c3d2e1f0
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
Ciphertext = 26834705b0f2c0e2588d4a7f0900963584c256815c4292b59f8d3f966a75b52345b4f5f98c785d3f368a8d5ff89b7f950ceab3cd63773c2621d652b8ef98b4196afb2c2b30496bc5b7d9e7f9084f9d855f63a511751c8909e7a6deadbe0a67a4fb89383ca5d209c6f66f793fc471195c476fb9c1eab2ac91e680e454b4f3ed9a67fb52f09c29b965b23cfa6f3f6bbb2a86c6cdbaa2857bf2486f543231892a52
|
||||
|
||||
Cipher = ARIA-256-CTR
|
||||
Availablein = default
|
||||
Key = 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
|
||||
IV = 00000000000000000000000000000000
|
||||
Plaintext = 11111111aaaaaaaa11111111bbbbbbbb11111111cccccccc11111111dddddddd22222222aaaaaaaa22222222bbbbbbbb22222222cccccccc22222222dddddddd33333333aaaaaaaa33333333bbbbbbbb33333333cccccccc33333333dddddddd44444444aaaaaaaa44444444bbbbbbbb44444444cccccccc44444444dddddddd55555555aaaaaaaa55555555bbbbbbbb55555555cccccccc55555555dddddddd
|
||||
@@ -2268,6 +2427,7 @@ Ciphertext = 30026c329666141721178b99c0a1f1b2f06940253f7b3089e2a30ea86aa3c88f594
|
||||
Title = ARIA GCM test vectors from RFC8269
|
||||
|
||||
Cipher = ARIA-128-GCM
|
||||
Availablein = default
|
||||
Key = e91e5e75da65554a48181f3846349562
|
||||
IV = 000020e8f5eb00000000315e
|
||||
AAD = 8008315ebf2e6fe020e8f5eb
|
||||
@@ -2276,6 +2436,7 @@ Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9
|
||||
Ciphertext = 4d8a9a0675550c704b17d8c9ddc81a5cd6f7da34f2fe1b3db7cb3dfb9697102ea0f3c1fc2dbc873d44bceeae8e4442974ba21ff6789d3272613fb9631a7cf3f14bacbeb421633a90ffbe58c2fa6bdca534f10d0de0502ce1d531b6336e58878278531e5c22bc6c85bbd784d78d9e680aa19031aaf89101d669d7a3965c1f7e16229d7463e0535f4e253f5d18187d40b8ae0f564bd970b5e7e2adfb211e89a953
|
||||
|
||||
Cipher = ARIA-256-GCM
|
||||
Availablein = default
|
||||
Key = 0c5ffd37a11edc42c325287fc0604f2e3e8cd5671a00fe3216aa5eb105783b54
|
||||
IV = 000020e8f5eb00000000315e
|
||||
AAD = 8008315ebf2e6fe020e8f5eb
|
||||
@@ -2286,6 +2447,7 @@ Ciphertext = 6f9e4bcbc8c85fc0128fb1e4a0a20cb9932ff74581f54fc013dd054b19f99371425
|
||||
Title = ARIA GCM self-generated test vectors
|
||||
|
||||
Cipher = ARIA-128-GCM
|
||||
Availablein = default
|
||||
Key = e91e5e75da65554a48181f3846349562
|
||||
# Shorter than default IV
|
||||
IV = 0001020304
|
||||
@@ -2295,6 +2457,7 @@ Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9
|
||||
Ciphertext = 1723ccfc0ed44a12520473cfeb63bc933cd450a943f5f1cba78e19d72f80cc102acc51f2459a06cf6435182b8ddd451f83e13479efe5ec7dfbf16229f4017920fb41457a9b6fe1a401b30b2f332d827ae2f86e962326927c1ed8bfedac1f7a00ddde63bd392a8f28a488ba5974689f8d15b9b1739fb50aae0ff244026ec72064003c621b33ffc8086b0a97eefb70604a2826f6499f6eb12d67a0da03fc8e1482
|
||||
|
||||
Cipher = ARIA-128-GCM
|
||||
Availablein = default
|
||||
Key = e91e5e75da65554a48181f3846349562
|
||||
# Longer than default IV
|
||||
IV = 000102030405060708090a0b0c0d0e0f
|
||||
@@ -2304,6 +2467,7 @@ Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9
|
||||
Ciphertext = 0d3e98fcaf7a2c4fe9198d66add90d113e5e0ff47598c40a4bf501960d935a4156c9a4d46c9358a608e10a16479a4247c9ab9bb4a02809e3eac3571b832590fe2ca3e2d545741e36282d96c041fc7d39a46ed60214c2c0ec70f27768dfea4f9563b5d5c2ac33b1368a78f2908f5daf942433fec6ab588f09e908e95cc8dfa85d1a0dfd5835dc14e148323230c63eedc99a9ce942214cb3768b97b821d613629f
|
||||
|
||||
Cipher = ARIA-128-GCM
|
||||
Availablein = default
|
||||
Key = e91e5e75da65554a48181f3846349562
|
||||
# Extra long IV
|
||||
IV = 000102030405060708090a0b0c0d0e0f1011
|
||||
@@ -2318,6 +2482,7 @@ Title = ARIA CCM test vectors from IETF draft-ietf-avtcore-aria-srtp-02
|
||||
# 16-byte Tag
|
||||
|
||||
Cipher = ARIA-128-CCM
|
||||
Availablein = default
|
||||
Key = 974bee725d44fc3992267b284c3c6750
|
||||
IV = 000020e8f5eb00000000315e
|
||||
AAD = 8008315ebf2e6fe020e8f5eb
|
||||
@@ -2326,6 +2491,7 @@ Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9
|
||||
Ciphertext = 621e408a2e455505b39f704dcbac4307daabbd6d670abc4e42f2fd2fca263f094f4683e6fb0b10c5093d42b69dce0ba546520e7c4400975713f3bde93ef131160b9cbcd6df78a1502be7c6ea8d395b9ed0078819c3105c0ab92cb67b16ba51bb1f53508738bf7a37c9a905439b88b7af9d51a407916fdfea8d43bf253721846dc1671391225fc58d9d0693c8ade6a4ffb034ee6543dd4e651b7a084eae60f855
|
||||
|
||||
Cipher = ARIA-256-CCM
|
||||
Availablein = default
|
||||
Key = 0c5ffd37a11edc42c325287fc0604f2e3e8cd5671a00fe3216aa5eb105783b54
|
||||
IV = 000020e8f5eb00000000315e
|
||||
AAD = 8008315ebf2e6fe020e8f5eb
|
||||
@@ -2336,6 +2502,7 @@ Ciphertext = ff78128ee18ee3cb9fb0d20726a017ff67fbd09d3a4c38aa32f6d306d3fdda378e4
|
||||
# 8-byte Tag
|
||||
|
||||
Cipher = ARIA-128-CCM
|
||||
Availablein = default
|
||||
Key = 974bee725d44fc3992267b284c3c6750
|
||||
IV = 000020e8f5eb00000000315e
|
||||
AAD = 8008315ebf2e6fe020e8f5eb
|
||||
@@ -2344,6 +2511,7 @@ Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9
|
||||
Ciphertext = 621e408a2e455505b39f704dcbac4307daabbd6d670abc4e42f2fd2fca263f094f4683e6fb0b10c5093d42b69dce0ba546520e7c4400975713f3bde93ef131160b9cbcd6df78a1502be7c6ea8d395b9ed0078819c3105c0ab92cb67b16ba51bb1f53508738bf7a37c9a905439b88b7af9d51a407916fdfea8d43bf253721846dc1671391225fc58d9d0693c8ade6a4ffb034ee6543dd4e651b7a084eae60f855
|
||||
|
||||
Cipher = ARIA-256-CCM
|
||||
Availablein = default
|
||||
Key = 0c5ffd37a11edc42c325287fc0604f2e3e8cd5671a00fe3216aa5eb105783b54
|
||||
IV = 000020e8f5eb00000000315e
|
||||
AAD = 8008315ebf2e6fe020e8f5eb
|
||||
@@ -2354,6 +2522,7 @@ Ciphertext = ff78128ee18ee3cb9fb0d20726a017ff67fbd09d3a4c38aa32f6d306d3fdda378e4
|
||||
# 12-byte Tag
|
||||
|
||||
Cipher = ARIA-128-CCM
|
||||
Availablein = default
|
||||
Key = 974bee725d44fc3992267b284c3c6750
|
||||
IV = 000020e8f5eb00000000315e
|
||||
AAD = 8008315ebf2e6fe020e8f5eb
|
||||
@@ -2362,6 +2531,7 @@ Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9
|
||||
Ciphertext = 621e408a2e455505b39f704dcbac4307daabbd6d670abc4e42f2fd2fca263f094f4683e6fb0b10c5093d42b69dce0ba546520e7c4400975713f3bde93ef131160b9cbcd6df78a1502be7c6ea8d395b9ed0078819c3105c0ab92cb67b16ba51bb1f53508738bf7a37c9a905439b88b7af9d51a407916fdfea8d43bf253721846dc1671391225fc58d9d0693c8ade6a4ffb034ee6543dd4e651b7a084eae60f855
|
||||
|
||||
Cipher = ARIA-256-CCM
|
||||
Availablein = default
|
||||
Key = 0c5ffd37a11edc42c325287fc0604f2e3e8cd5671a00fe3216aa5eb105783b54
|
||||
IV = 000020e8f5eb00000000315e
|
||||
AAD = 8008315ebf2e6fe020e8f5eb
|
||||
@@ -2370,56 +2540,6 @@ Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9
|
||||
Ciphertext = ff78128ee18ee3cb9fb0d20726a017ff67fbd09d3a4c38aa32f6d306d3fdda378e459b83ed005507449d6cd981a4c1e3ff4193870c276ef09b6317a01a2283206ae4b4be0d0b235422c8abb00122410656b75e1ffc7fb49c0d0c5d6169aa7623610579968037aee8e83fc26264ea866590fd620aa3c0a5f323d953aa7f8defb0d0d60ab5a9de44dbaf8eae74ea3ab5f30594154f405fd630aa4c4d5603efdfa1
|
||||
|
||||
|
||||
Title = SEED test vectors from RFC4269
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 00000000000000000000000000000000
|
||||
Operation = DECRYPT
|
||||
Plaintext = 000102030405060708090A0B0C0D0E0F
|
||||
Ciphertext = 5EBAC6E0054E166819AFF1CC6D346CDB
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
Plaintext = 00000000000000000000000000000000
|
||||
Ciphertext = C11F22F20140505084483597E4370F43
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 4706480851E61BE85D74BFB3FD956185
|
||||
Operation = DECRYPT
|
||||
Plaintext = 83A2F8A288641FB9A4E9A5CC2F131C7D
|
||||
Ciphertext = EE54D13EBCAE706D226BC3142CD40D4A
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 28DBC3BC49FFD87DCFA509B11D422BE7
|
||||
Operation = DECRYPT
|
||||
Plaintext = B41E6BE2EBA84A148E2EED84593C5EC7
|
||||
Ciphertext = 9B9B7BFCD1813CB95D0B3618F40F5122
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 00000000000000000000000000000000
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 000102030405060708090A0B0C0D0E0F
|
||||
Ciphertext = 5EBAC6E0054E166819AFF1CC6D346CDB
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 00000000000000000000000000000000
|
||||
Ciphertext = C11F22F20140505084483597E4370F43
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 4706480851E61BE85D74BFB3FD956185
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 83A2F8A288641FB9A4E9A5CC2F131C7D
|
||||
Ciphertext = EE54D13EBCAE706D226BC3142CD40D4A
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 28DBC3BC49FFD87DCFA509B11D422BE7
|
||||
Operation = ENCRYPT
|
||||
Plaintext = B41E6BE2EBA84A148E2EED84593C5EC7
|
||||
Ciphertext = 9B9B7BFCD1813CB95D0B3618F40F5122
|
||||
|
||||
Title = Chacha20 test vectors from RFC7539
|
||||
|
||||
# A.1 Test Vector 1
|
||||
|
||||
@@ -0,0 +1,385 @@
|
||||
#
|
||||
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
Title = CAST5 Test vectors (from https://github.com/pyca/cryptography)
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 1f8e4973953f3fb0bd6b16662e9a3c17
|
||||
IV = 2fe2b333ceda8f98
|
||||
Plaintext = 45cf12964fc824ab76616ae2f4bf0822
|
||||
Ciphertext = 327c198b9d0a59456a2194bd21fc3ff0
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 0700d603a1c514e46b6191ba430a3a0c
|
||||
IV = aad1583cd91365e3
|
||||
Plaintext = 068b25c7bfb1f8bdd4cfc908f69dffc5ddc726a197f0e5f720f730393279be91
|
||||
Ciphertext = f5ce00a3ba73e5a289789783c34787e11d27859beac26bb53dc732f03c80c548
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 3348aa51e9a45c2dbe33ccc47f96e8de
|
||||
IV = 19153c673160df2b
|
||||
Plaintext = 9b7cee827a26575afdbb7c7a329f887238052e3601a7917456ba61251c214763d5e1847a6ad5d54127a399ab07ee3599
|
||||
Ciphertext = 3c033e10fad0c4ce1e62e2a91488090947c5e0ac0dd5f55c1b15b0b02fa7cfd20f61b02d67ea9f326c5475447dee69bf
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = b7f3c9576e12dd0db63e8f8fac2b9a39
|
||||
IV = c80f095d8bb1a060
|
||||
Plaintext = 9ac19954ce1319b354d3220460f71c1e373f1cd336240881160cfde46ebfed2e791e8d5a1a136ebd1dc469dec00c4187722b841cdabcb22c1be8a14657da200e
|
||||
Ciphertext = 219e4a20d3fcffa9c5d3b74038f2147ff3baf9c828bff134dfc1655ddec01120dc59069682e1fea35ce4dc2d1ee7e15929bdcaeddb0e2894fd21e1a95cff853f
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = b6f9afbfe5a1562bba1368fc72ac9d9c
|
||||
IV = 3f9d5ebe250ee7ce
|
||||
Plaintext = db397ec22718dbffb9c9d13de0efcd4611bf792be4fce0dc5f25d4f577ed8cdbd4eb9208d593dda3d4653954ab64f05676caa3ce9bfa795b08b67ceebc923fdc89a8c431188e9e482d8553982cf304d1
|
||||
Ciphertext = 9a489a104fece86017fa9e8bfa66322a07c940dc2709f4ed7aa85343449a774880b977eb3a95c797593f38a52009095f4792ce957ec95866739ab7ee520938d11f6601036691aea9a83948c00c1a2fb3
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = bbe7b7ba07124ff1ae7c3416fe8b465e
|
||||
IV = 7f65b5ee3630bed6
|
||||
Plaintext = 2aad0c2c4306568bad7447460fd3dac054346d26feddbc9abd9110914011b4794be2a9a00a519a51a5b5124014f4ed2735480db21b434e99a911bb0b60fe0253763725b628d5739a5117b7ee3aefafc5b4c1bf446467e7bf5f78f31ff7caf187
|
||||
Ciphertext = 3cc5a34d2592daa6d8bda161a349b52a1dcb8899654bb15ff295ab05ff666c1b31184801033e374e1f0f4f08f745a9af688f3d869ca8362d7e3b34c6dca259a3c14033f1c4f15c106552ac2cd3e953234bafefac74df0cb8757ab1d46e4b8914
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 89a553730433f7e6d67d16d373bd5360
|
||||
IV = f724558db3433a52
|
||||
Plaintext = 807bc4ea684eedcfdcca30180680b0f1ae2814f35f36d053c5aea6595a386c1442770f4d7297d8b91825ee7237241da8925dd594ccf676aecd46ca2068e8d37a3a0ec8a7d5185a201e663b5ff36ae197110188a23503763b8218826d23ced74b31e9f6e2d7fbfa6cb43420c7807a8625
|
||||
Ciphertext = ab1d2225e541a27a00e8e7a698f12d5044eac004b5c1362dd9df4c484ec1e7f22be8946f5a1c8450c5a7e3fd319af94c17dd3472ec8c0a52a5cbcb112bb5fb467511afb58e9f4b5fdbbb0c64f39b31c968582d06b980f05dac45ee0f6b30144bf41aa1582db3d669c0061eba42f591f1
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = c491ca31f91708458e29a925ec558d78
|
||||
IV = 9ef934946e5cd0ae
|
||||
Plaintext = cb6a787e0dec56f9a165957f81af336ca6b40785d9e94093c6190e5152649f882e874d79ac5e167bd2a74ce5ae088d2ee854f6539e0a94796b1e1bd4c9fcdbc79acbef4d01eeb89776d18af71ae2a4fc47dd66df6c4dbe1d1850e466549a47b636bcc7c2b3a62495b56bb67b6d455f1eebd9bfefecbca6c7f335cfce9b45cb9d
|
||||
Ciphertext = 37fbb13aedae35151641acb2db6df6044e7c860320a1e9ee4977ba9ebbecbcaa995ea76cdbb9d3ea017ff3d9d650befdb4b35c98ae444b762432b5fd2a172b30ed879044bd870f9bd9f1e90aa89fe08b8c39b06890e816f5d21069f591cc2f656694d1acb0de7273f5c16a6dd69d3c77789b11b7450eb524d9f98640ac855f8a
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = f6e87d71b0104d6eb06a68dc6a71f498
|
||||
IV = 1c245f26195b76eb
|
||||
Plaintext = f82bef3c73a6f7f80db285726d691db6bf55eec25a859d3ba0e0445f26b9bb3b16a3161ed1866e4dd8f2e5f8ecb4e46d74a7a78c20cdfc7bcc9e479ba7a0caba9438238ad0c01651d5d98de37f03ddce6e6b4bd4ab03cf9e8ed818aedfa1cf963b932067b97d776dce1087196e7e913f7448e38244509f0caf36bd8217e15336d35c149fd4e41707893fdb84014f8729
|
||||
Ciphertext = 2edff012cd4cb447f58c00391c86e187d0d9a70b800f12bcb0436e423c21adb7eafcae0833b74228e01784b02de552e10a89fbd272b89aadf4316b9fe10917e8fb9c959fb00b920c1bce4517cd37458ef3f51a6c27366339051adc47147f375b5ec63d84c1e5cc386babc24fc4ee4dec507c5e9f5d6631adad59b7464b4950abf2c7af2f9599b2a371616469a55e0ffb
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 2c14413751c31e2730570ba3361c786b
|
||||
IV = 1dbbeb2f19abb448
|
||||
Plaintext = 40d930f9a05334d9816fe204999c3f82a03f6a0457a8c475c94553d1d116693adc618049f0a769a2eed6a6cb14c0143ec5cccdbc8dec4ce560cfd206225709326d4de7948e54d603d01b12d7fed752fb23f1aa4494fbb00130e9ded4e77e37c079042d828040c325b1a5efd15fc842e44014ca4374bf38f3c3fc3ee327733b0c8aee1abcd055772f18dc04603f7b2c1ea69ff662361f2be0a171bbdcea1e5d3f
|
||||
Ciphertext = cc16f1685b309c380fa0a6556a604040a3e6eb326f1884b7c5d85d5bfdf925c96d0621e69b1f601463d23efdee60d531211c638ffca1134ddd70fa21d65b30fb462af045d32547acafbfb9c9c40e5e66bbcd23abf7adb3239da666a220a6b79dc335c2adb11559de7077348af3dd551374d95a800bed393cc3d12b220eca16564100373f6d4c422e1f94d6f82b38431a7bb8e13750e7f09afdf6677fb9cb2077
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 6a7082cf8cda13eff48c8158dda206ae
|
||||
IV = bd4172934078c201
|
||||
Plaintext = 940bc76d61e2c49dddd5df7f37fcf105
|
||||
Ciphertext = 431c2991b6388feb25ac695408c0b5ab
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 625eefa18a4756454e218d8bfed56e36
|
||||
IV = 73d9d0e27c2ec568
|
||||
Plaintext = 360dc1896ce601dfb2a949250067aad96737847a4580ede2654a329b842fe81e
|
||||
Ciphertext = 6da475bb7ca9345d9d321c2e523a4c42f281df4529264da2e95d3616037a8b7a
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = fd6e0b954ae2e3b723d6c9fcae6ab09b
|
||||
IV = f08b65c9f4dd9500
|
||||
Plaintext = a206385945b21f812a9475f47fddbb7fbdda958a8d14c0dbcdaec36e8b28f1f6ececa1ceae4ce17721d162c1d42a66c1
|
||||
Ciphertext = ca71fa129c94f5f67ad8928b70b788b4d621fef07aead8ae5aecbfc9027651bf1888cc4459627ff8c7a5383f56f95b87
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 7b1ab9144b0239315cd5eec6c75663bd
|
||||
IV = 0b1e74f45c17ff30
|
||||
Plaintext = b968aeb199ad6b3c8e01f26c2edad444538c78bfa36ed68ca76123b8cdce615a01f6112bb80bfc3f17490578fb1f909a52e162637b062db04efee291a1f1af60
|
||||
Ciphertext = 5570f2e5fc0390d718adbed7e3ef74bf390317936846438190e9cc8424ba6c6f026ba29a6980a15fd090a8b6ee4a182e3de0817862b05b9cf2202ed6421fe0b6
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 36466b6bd25ea3857ea42f0cac1919b1
|
||||
IV = 7186fb6bdfa98a16
|
||||
Plaintext = 999983467c47bb1d66d7327ab5c58f61ddb09b93bd2460cb78cbc12b5fa1ea0c5f759ccc5e478697687012ff4673f6e61eecaeda0ccad2d674d3098c7d17f887b62b56f56b03b4d055bf3a4460e83efa
|
||||
Ciphertext = 551db27bab09919fbb3f257080c1972e4297a37cb5c77b14c2622a476914b95e726b0814172e3189bf3b93adef6ef8eedddd2917793e04f4ba0d57503f426503d624f65d0b1e8b9f62d2bf08c752c90c
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 89373ee6e28397640d5082eed4123239
|
||||
IV = 1a74d7c859672c80
|
||||
Plaintext = 45efd00daa4cdc8273ef785cae9e944a7664a2391e1e2c449f475acec0124bbc22944331678617408a1702917971f4654310ffb9229bec6173715ae512d37f93aaa6abf009f7e30d65669d1db0366b5bce4c7b00f871014f5753744a1878dc57
|
||||
Ciphertext = cb373a6d2f2463b81b4bfece800c6a0d1afebbf5dff76c67cab44844b6c2569c59770f569efa6dd26d74aa1f24999edcfb979db7a34a4155367dab091d9306c4a89acf932d442bb4ca70bef3b6c0866fc79f29d24af40e1e5f9626d13f752fa8
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = bab0cceddc0abd63e3f82e9fbff7b8aa
|
||||
IV = 68b9140f300490c5
|
||||
Plaintext = c5585ff215bbb73ba5393440852fb199436de0d15e55c631f877670aa3eda9f672eb1f876f09544e63558436b8928000db2f02a5ad90f95b05ac4cf49e198e617e7678480fdf0efacc6aae691271e6cdd3541ebf719a1ccaedb24e2f80f92455dd5910cb5086b0960a3942ec182dcbd7
|
||||
Ciphertext = 3580a9b62d3ac4798ad351a53efdc98b5f4e2eb04e19d0328ee0931a0647172cb9596ff7441c78625fcccfa1c0e579c811142441253a169914b3435f2e4d47ccca4151d6d0c9399071e23879cb5f355659bdca594c9c59039c9ec90f87bfed3c830d624298681e5523d537ab58a0f340
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 9c702898efa44557b29ed283f5bc0293
|
||||
IV = cec6e1b82e8b2a59
|
||||
Plaintext = 1d1f8d81bdc3e2c7cb057f408e6450000c5aaed3260ff1e87fbb6f324df6887ffd8f78d7e2a04c9ed9deda9d64482d2b002f4a2b78d8b4f691875c8295d4a64b22257ceaf713ed2f4b92530d7ad7151d629acda882b4829577a43990b0948c1149c22fe4273656d1b08833930e8b06709a94579a78fc220f7057bbc1fa9f6563
|
||||
Ciphertext = be790efc9fb2fd205402cb355ecf881ee7dc7d4cf19441374c37c3cb4fedd6a1996a703bc42b88c2c93adb0628b39483cc8f6e26a1f1fbcef685f6c4640b85922540ae5c263428e531847f7fc5cd8c8ed069b4dc3c0f23f89edebaee567c4268cb78710803b263832ef74259885470bbee6fe6f1997f84fb88dbe17860b52dce
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 5674636dbdb38f705f0b08c372ef4785
|
||||
IV = 3f20ce0509b57420
|
||||
Plaintext = 6d40fd2f908f48ce19241b6b278b1b1676dffd4a97ce9f8a1574c33bc59237deb536bee376fd6c381e6987700e39283aa111cf1a59f26fae6fb6700bf012646a2ab80239bf5e1632329043aa87d7911978b36523a2bc0bed9a9737ccf7a00baa2f3822b4e9e742e168e7069290705fed2eb63aa044b78f97dd33a8d6b24741ec1fd8c8db79d93b884e762dba0f406961
|
||||
Ciphertext = b1793ca5c3b6ad612d5616841d9c281ed4ba2a8355caffb122184cb01f18102c5b0837d316e76dbcd93b70fa3dc6b741aa1262f976afa5807832f87e77156a6c9eadf2b986d3cd29a6452948ad818d2c864faf352d0002e2b824de9a00dc230cb530fb6b19195aeae9d2f6b032bff28f5cf483f7835310f880afa6d9210666b6c2c121a51abc86cbe9468ba423944409
|
||||
|
||||
Cipher = CAST5-CBC
|
||||
Key = 97a1025529b9925e25bbe78770ca2f99
|
||||
IV = d4b4eab92aa9637e
|
||||
Plaintext = e8b89150d8438bf5b17449d6ed26bd72127e10e4aa57cad85283e8359e089208e84921649f5b60ea21f7867cbc9620560c4c6238db021216db453c9943f1f1a60546173daef2557c3cdd855031b353d4bf176f28439e48785c37d38f270aa4a6faad2baabcb0c0b2d1dd5322937498ce803ba1148440a52e227ddba4872fe4d81d2d76a939d24755adb8a7b8452ceed2d179e1a5848f316f5c016300a390bfa7
|
||||
Ciphertext = 78b56a69ffcb77d3a848ad2ccb9b67263d9d9668936b040d5a0fb514013fa4dc012f7ccb54c0d30b764d96ff5edf70d4c90d95015c2555656581bfbf7c13a86b8254ffd177246938cb706abdb9ff6e752a763e36c6102a124683695dba4bab2bd8fc2100b99734f2bf4de56c0a3f3b701593b9efdbcb1cc4bc220d2ecbbf5d8a5a13aab7fd35d923cefc87e5a97587e5903a5af0b00e3d747435ad495c55155b
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 085b8af6788fa6bc1a0b47dcf50fbd35
|
||||
IV = 58cb2b12bb52c6f1
|
||||
Plaintext = 4b5a872260293312eea1a570fd39c788
|
||||
Ciphertext = 453d00cb11e1cf4e52ee11c1c22cd6b6
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 701ccc4c0e36e512ce077f5af6ccb957
|
||||
IV = 5337ddeaf89a00dd
|
||||
Plaintext = cc1172f2f80866d0768b25f70fcf6361aab7c627c8488f97525d7d88949beeea
|
||||
Ciphertext = 0cb41e41b55c3aa4f7a002e7ffbe438897769b9cb77e7a8ff9237d8e066fc64f
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 0a8e8876c96cddf3223069002002c99f
|
||||
IV = b125a20ecd79e8b5
|
||||
Plaintext = 4fd0ecac65bfd321c88ebca0daea35d2b061205d696aab08bea68320db65451a6d6c3679fdf633f37cf8ebcf1fa94b91
|
||||
Ciphertext = 8feace1e2d6aedf53e779ee3d62e3635a2d1234802665bc34c8be46f397e04aecaea6045f3d0194ea9002dfa358ed390
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = b9ba9fa32cc491d8ac2beb5f99193d57
|
||||
IV = 95511452b71e53e9
|
||||
Plaintext = b40382705aaeea41097c309da6cd06010f15e09c0130fa4b3af69cc8da109d1f0f0a2661f1a8b89bab7e7009dcbb8a883d46254a830c45cd87981e0ea4e490fa
|
||||
Ciphertext = 6774ade6984392eaf670dc2f8c2397e87af5c850325376d9230cf622d7f0a0fd0a4a0c68565c9efdaf58c2aec18e352a315a0f9ca6beeb8e1bf4dfb673768f0e
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 5947bbd78b06bb5ea2fc67ed7b24216e
|
||||
IV = 8e4722ad2230b15f
|
||||
Plaintext = 9e69423653c20c982794ed35d63c1a78e8ac14f37e1888ae4bf273bfe119891b2e4ed8ac46e7a9a463c7a710298d43b02f0c5606bcfc08adceeef2ec61867f8bede498e53163803f2f86fc58782fb841
|
||||
Ciphertext = f15a5b0a9f323931149fa5549f98a2cd14995a177910644dbb10fc1f6cfb281d4cf09958a5bcb23931640ca932ec50fd67e85532fe5a89a736b1027cc0423a4b5d609d6ee91fddd8b0921fc8cb6f2044
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = abce650e78f969b3b210151c74117fd2
|
||||
IV = bc4659fbb7073c1f
|
||||
Plaintext = 322eae07df5ad2ddd64bba34e42d30c1b884f842e71efa123345a3fb0c39884c57dd4c2c6fb0c42e69ff5a269d59af3a6144853c182edb376ca65947d7ccefae6806ba25c4f527706ba85a353c0fd10e3cb244dd93a2d060d7b055058dde1dff
|
||||
Ciphertext = a03ddffb19dbfae5dc4190382c88b57ece48a562adb1d2a97554475430c30c174cd58cb05f04d4ca6ca07b1413735e4c192157af2738de438fd4e8544e32e5476645a9eae06b097ae624100f1294c1870bb48910929166d200bd12f4b0b34a6e
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 9f56e19b09dd3fee0e110f71e9967b7a
|
||||
IV = 1155cf4231bf7ac5
|
||||
Plaintext = ad1e4d3162a5084f581117639a13fc35df5449625ffe0f01e57d9a8726875be8515926ffe7449e30cd69ed4ca0c1b8b4486051c2d0fa2f6474a69c0afce2aec349d778a22edf81678145765b714c1b7c197287da56f59141d6978618729e1d89be20ace3de7d9b3c9b2d195ab6bc0fd4
|
||||
Ciphertext = ae27a1f299072d0bf7ea533d6ef2b490b78fa926bc5e7195300a2676b8e8a54bacac00d91c1f734ec959c2260dcb123e22b4d10cb810625dff0810f570755cdc520c3eaaa86412b1b382f4ca6c25953144d8a959ee9db4771aad2a1dfc812e3f0016d75d95168629be284adf3734c0b6
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 31c485c996d6ceb2d17e0aa05b2490e4
|
||||
IV = 8c37f33405051b4c
|
||||
Plaintext = ac68de6a2c2144c6b4fd975a8dec93447391e7c9a4fde63d36be7f23ad186f96cd92b5e8adb546880d100329e97fe8204fad860e6dd8b3c0eed4805387536b9ccc63d6c74938b83dce2c93cc0a04a6025b7563d9e5e7239ae27819fb3844848a51e4294f273401ad9e592f8a170334b042f0667233b29f92b9b13262eb73232a
|
||||
Ciphertext = 0fa7effeec07717c49fc5bfa2e0dcd96b3bb5ed3080171621c67bbaf795a06bc4aa8fcb82217ff3f164a8abe0a92f9f9baf05809962b2a684eb6acdaa3a0935e298c8e23e1f1a19cd3cf174c92ff07df0541bc2fedbedcf721f11e398dabbcd3cd1b5842e8a8a117b7f97ee7d17b4a7c7a9126eefb45ca7d3e76d8240f64fa92
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 556ccfa360ecb5025032dddb124cad4d
|
||||
IV = d54c6fdcc85dc0a2
|
||||
Plaintext = 71fbf180effac3dca0d69d40e4017dbe50455396f9fb6507ef7df26507de156cded8edd41a05fb25f352cbcdf3b2d770f90fa87f84863e0c2ed3b2dd770a1abfc489ad1ca82a28d061bd7039a6b5788da021657136def0c78d0b0cc7cfbec9512cf579811fd01185f3fdd2ab857328be4b63d293956b43df130e484b9861eccb1d06992b095e7febb0fb394c1954aeab
|
||||
Ciphertext = eea7b5280a023d240e01e428eb566ef6ce709de1e961fb45256f453b4c63a8adcb3cd22fb58c6d091bcc91bf57e2d09f3290658a4a72af2427d338e4b559a0598a0983edbcf5c441540ca8d43a91c3623f2cfa604ac002c7e95e9ca4e3d685ba62b862a6de78724074261fe6e5094dc18db65b64b914f5125ba52b92a55719ab66e9fb4d1032419ede1d51123277dd43
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 7cb81fc4b203b0fa9bec49759bd515c2
|
||||
IV = 4d5e2fa3bf73f488
|
||||
Plaintext = 362789b376d85eb8181d4eeea52d42e873ce7741c11a2f820383a7457b15489b09fb21ac4445959dc9e851b7d40682c50d7044bda46a5da39fae2bab73b3db9ed22edc7ec5da936dfa7451cb5f0a829ff0762738cc2686148f1e1f00dc3fe38139c9a173201fc1f052ca34736fc1ab3dc4e707f864d6119b7adb6c8ddd41c80de5d357d17e9c85ed7af1e4f72cb2656932ccce469202680109eef89a9f42f10a
|
||||
Ciphertext = f24802e7d3d3fc2f487a48caa63d3b1c97856aff1f25ebe2a5579422fb75c0eff313ad93e21f667048479646b547716ec00de0686c7fcaa7352175034e4347f4552872f38c0339a70538226a0155ea26cb46bc98d0341122bfaeff3ed23eb003824e239717de4088441b5abd780bc9f10570d36e5123a6adfad601845005a7b0ee80e7de92991f931e2a52379da40ba40e6c79ff6817de63191e31570722d7d7
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = beb622d0228cde29b342bbcf4c1c83b4
|
||||
IV = 75c282fa581d9c67
|
||||
Plaintext = 860476c81685b58e71e2599efe083ce5
|
||||
Ciphertext = 3f08c279175f0eb1b66c991c650735c7
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = c4666081e0b0eddb10a9a607c807378f
|
||||
IV = 5f23623288e4a41b
|
||||
Plaintext = 2fd02dab9054248073ebc0b07aed383756ccfa4fa6298722775be6a9b4ed27a5
|
||||
Ciphertext = cba9c6b7a6672071031aa237a602996896e31a110bae1870d000768a79f661aa
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = df010376a6b03279338773a70e012382
|
||||
IV = 67455decec549365
|
||||
Plaintext = 9b9c3dea553ec235db0011b27191544171845b7bdda0dc04a089583959bba5ab7048f8ca87eab073a8b824fdd4e82e40
|
||||
Ciphertext = c0401a8557096e02ff58f62634eb39b8894735f6e1d735eee0cbd97804987a6d1f123100e2be26089fb40708b48854ce
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = ff01aa4f7106c6bd24399076f901a530
|
||||
IV = 089b4f6054eeeef7
|
||||
Plaintext = ae9cb9dfa305af83e95a3b2099f70907edcd49fbc6efc5ebe744184c76b4f56bf35774f3fe215e1c8ee42172a2dd3e6f9ccd3d9bb044325e61a6bb97e48e9986
|
||||
Ciphertext = 18c2127028579828ce13a8636ba7d666ace80c0b392bf3be4f5f97ff94d081e4174afd85de006c0affbb244149f9d2efd5f50ae7791f4ca061979f0e80a1790f
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = d33d4062ab32298eafcca86b5088d5fd
|
||||
IV = fcfffce8b020240f
|
||||
Plaintext = 1fe1318adb99e6d4fced292902fe8c831ba488a43f85964d6ff54b322663b380bc99fed15568278cfe1d0af795c71355bf65e876855763655eec3abf3d4b27a0341d607f4bfbd82c8900fd436f7c4186
|
||||
Ciphertext = ea2913d6d9f3906403ae86fa34fb185e333cf4991ab5f27d58abbc4d4bbf14165fbbf7da164401b4ff856807141fbc4d5ad550beb5d8c708eda610a5af801e27d68945ded441f2ff85206e5c3e52e786
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = 47e13544a7bbf74dd68ab5ce66e5bdaa
|
||||
IV = 69480b4dd38cf3b4
|
||||
Plaintext = 3e2e583a3a0389ca324f2aaa52b7823904ab288dae562995cf1d70c796d785fd361261434eea480ceb3d369d969652c7ff194931c0a9bd978f5ae4094d6ef32d986a092c580ccbf865e5095a7b80559be13f842f9bea9e42a3a01ef8a24a6526
|
||||
Ciphertext = c4fd34b698c5908a37eab83859317b9961e7e741bfef9060595fcee55c73f6c93bdbc5b80c73798c15efb29207e958e975cb77b4cbe5e5b329d50e86fb43dd3a234aa23fb5c9d38dae78c5de99b5e3f8a00d0bb00208ceaf2ede8f8b99f19223
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = ae86823695b48e8c612ae5a01b597f97
|
||||
IV = b26eef7b1d14894c
|
||||
Plaintext = 569a910bc6aa97b8939ca703fc10ce0d171625bc735a1fea7148650541109d955b1b686c6cc404b2d3d92ad9faaff217dc7b31b038b770959aeccd1ca55d650364fde51df8d4f0aeb05fa364f5028f709c179ca6df0bdfc1cb850f238d755ac44a733fce558402be0c70bc0871b8e62f
|
||||
Ciphertext = 63c415bd42ee6097485e023ff9c4a29e04fb4ab3254bbe1dba5b85c844184d64550dd2ed4f3dc30aa75e987363343b4db154bb0a5a250fc7049ccd8a507083f5ebd76e34f87f8b23a4540ef1e77c094ab1e0afeacfe04116aa33e2df1e505d0d788065288d57570977feb304ab432bbf
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = b85df29c9244229835d73441dc37555e
|
||||
IV = c1375430efedb2d3
|
||||
Plaintext = c232a0bbf967ef28b74e7b809c62bc8c1cf2d52a273a84162900da834448fd567870471498f29770619dec504922e379eaba0d3a712602583d00279d8fc6a6d568cb94a330039a189ed5802abb7a2898c13ef89c00d73fca9a2f2ffc2107ab498212c56835c0fc26f835a69c00bb3eaa695ac20e8bdb0f5b5b6684d02bee8fb2
|
||||
Ciphertext = 12c322b65b8296f7f88030ddbe64f2fbcb39beea0165f7633e1cc5e1cbe939bd52b0ddae37603a14bb85faf130ccf34492ed3e41d0092878d96eb09c3a5c6e09e0ba38a60ae0fdd855e1b236e69bf2e6ec6e80e4bd620826419788409524debead5430142da648144ab11746f6a4b40f357e570d8f645767bcf10fd1e1cc3286
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = e96771f5f20a89ee871261d2d18e1e46
|
||||
IV = 8c664a37d245d26c
|
||||
Plaintext = 8aaafd56c5d5d54fbe16f115c3216bd1f4376666931a2ef1ffc5468ad12150c39250dca2d63c6ea166bb0ef4aaa3d5849c1f9c621c55826a1ca362f03bcba4dcbd654b300d16519710130e5360bd949aaded6a648f96dd8937a77287d4a4ac2941729475b635b9797476b4dca4171787ff15882d3b4872ed0999a7546dbb61698e8348f70e4a14981a78156150484532
|
||||
Ciphertext = c4b350d70801419909077a2218b855d2e4cd3ad47063618009d216fb5bed38f2c161ab1d02fa62fa87371e3975b4e4786617636351e56c294d1a56c43644f54a3566173e18a5ba48964cfb314817219efa9d22b61364b7f1d2c4f38e0a6ad04bc1aee05f5f6061c3f93697125ad29c9a9b39b3640a61f3873f1327fe104fc3d2009052fb9cb356853a6f1e81feebc88f
|
||||
|
||||
Cipher = CAST5-CFB
|
||||
Key = aef49da33f538ee66e178d4b6121055d
|
||||
IV = 842566e68b61ff7b
|
||||
Plaintext = 415991f65e1a95040cef9960556f61e617827c30c74bf353cdd86173dbe4cc983a2ee6bc8ca6cfb71121e7b0d0178f2e13445c710dcc176b781201971171f7489f18faf110f39accd1cf08c85a958d7698b116f1c0d75812ac9b0b39aee7f7159ccad8fdae9b99f2d695eacf12c6469d5b51a34de26eac73613dcb2f77122cb1f8dd5162786a12052dc7b6dea6acc4989dcc7eafd9374f6c29697c74749ef16d
|
||||
Ciphertext = cda6dcfc1e0103192673cf18f67939eabe1011b94764ddc809f7d4fac4521ed72ee66629220ef29aec006c82e31432030480589f9fe35600939609a0c6f9252ec8ad7f96540236d3dcb4a53433b6759b218da8a37cde43aadcbc517c12811e27db1870d78c874e5f81492b47245cc48c6761998f1fb8cbc6848ff40f0d27adf519bb3645b4d3ca6e35a1979aa5685976375298822dbbb072856312eb30232b97
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = d7d57bd847154af9722a8df096e61a42
|
||||
IV = fdde201c91e401d9
|
||||
Plaintext = 81883f22165282ba6a442a8dd2a768d4
|
||||
Ciphertext = afd1a6abb87a4a12ccfb63b91868b734
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = c9f4ce21b4c7daaa4f93e292dc605bc5
|
||||
IV = 5e5a8cf2808c720e
|
||||
Plaintext = 8e19c5cacd015a662e7f40cdecadbf79a68081c06d9544b41c2dd248e77633b4
|
||||
Ciphertext = 834fc0990736575be34b56f7af26a1cc4d801cfd36eb0d0830c5264a7050db77
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 7a70cc6b261eeccb05c57117d5763197
|
||||
IV = bb7b9667fbd76d5e
|
||||
Plaintext = 823cbaae3760c85512a3c83fd60bb54b7cfc739b295b63e05ef435d86e19fd15368c89ff08a0f21ce89a728ffb5d75df
|
||||
Ciphertext = 3552cb60d8b3a9d8a6458d20e70250ef67ff90a1767cd61597a18a28dfc354d810f30b8949a8a13a111393ba08bc9e6f
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 85dbd5a6e73681a51a4a7d4e93ca7d0c
|
||||
IV = 89d897c5aa9e0a5d
|
||||
Plaintext = e3dbfc6ae1a879870fd22644c8135fe063355dfc0a8dad45c9c6e052e6e085cf717754dc1b49acb04cf340826ffb0da991138f022a9c34923a6a116c98c7d3d5
|
||||
Ciphertext = 20310bbe52bdde7725da64a30e428654a2ab9c2506ea89499b04782038a29c3712915328380e785a660e378dba714a3598ab4a6612cd8350d608a8cf598bea7a
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 18b9887a34438fb2e759027e54e334b6
|
||||
IV = a5be8621e58dae32
|
||||
Plaintext = 8cd659df925950b516f737fc92d2fafa008c008c9dfe0e75ed2d68f6ff79399ff2183464b8c37cf31aafc145fcbfac73e3f87eccb435f424bf1c6d6efb504e8e93e8a668a2210e3d3b4fd437ad1a5842
|
||||
Ciphertext = 0cefd22109f262103018037c3821c3bb1d43b5ff45dba0de243a915bdd2e7e9a4b847dcfb23baf1b7c42cc62bf33ffb0e9e8edf31b2ad9545074b5c6c57721f1b3b6d85f343aeddc72591de1f7d4fc7c
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = da52c0e4609e82ee926174a9eaf90b08
|
||||
IV = f2d0c5e86b4ddb40
|
||||
Plaintext = 91d6c95a614cf85de16eeabe5976c2a2a9d307042f79a7aaeb7c3c57e1dd8d43bfa458c8c02e4f5ed0c960c9f17e3991dd2e0cb3ede18f96395a484001ef07ca4c97b411ce454aaf0f74242aca03786a93442171bd50a1467b9d663245d24c2f
|
||||
Ciphertext = 2e7514b53c534a7d443757a1f071cd9b6e3b79764134c202717bef1f633807b42a3e34b1c6e8b233d2436ec61fa642cc48ef653de35ae84298c380652f2633e5180d35a28f0e8876693a0e92e47a4076ddd9f56d3145564c880dd98adb77e6c2
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 56d6f7e2a870b92d55ff8d6e9c554d2a
|
||||
IV = b512f0e11e27fd1a
|
||||
Plaintext = e62cdeac43667749701314c546f778a4c758e4f55760e7d729c3783cf7a242edf6ae3fcf0990886434896c945455bfae0e5674aa06ee6fb1512d94df2cac2447eeb849373bb3efbe7bb8d66c8a7ee559b17fc268d6599fcdef7457cdbde5b9c5b692236e4397545f2be97bd44f3993ad
|
||||
Ciphertext = 71497485f2deb55dfb1f6f77230e98c34faa185a9de4fbd5a2d065c50de8978f9aacec1e4e55c69b72ec581a7acdb9795233d7c40506d9599346a71f2ba14c2f6b7e678efa3cc4e0a30453be14794fd121db985a5b2639a2719e2b771195ad742e60ae9d17ab8c6466676e77f61032b3
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 09f216ff78dfe419dfcef1a855473414
|
||||
IV = 722174c892d26529
|
||||
Plaintext = 11f435e7e3656fcfa8e0df230311ca21054e84e13c8590e7ec7309f59c174022d467a7302641ee1b6ba46bee4f20bfda108bb78982f670b057dfbfe49da9cfae88490ce17241402b20d2fceb476d3a424e6c406d56ffc85278695d584d6c087cb4012ca2cf4daf284fd15ac1f2e183814957e934bf88dff4d777adfbb54933b5
|
||||
Ciphertext = 5e37c2fac52455a124fdbb84a7627e3480f672907ee82b2830c2d26f12da8a5edfcc6ef0305de040c2a998b968b2e1e66a586887d1ba77076b661a09b01108c0f6bfcae40ae5441e16cc2b2b32f391e2e88f245325003226802093d33dd676d4591e60a17a958939ef898b20482a99cf79187f6f56f9d1e53f77a6c895730a89
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = cde9b69eea2b6a5588457e35e0a08803
|
||||
IV = 52323b54d69a62fe
|
||||
Plaintext = 967798995af6f435b3a6f92bff77a11fa44d1426ae0f6e7dbafac27b123c5fc419be52c0ea412c4b3cac05ae89a4c0ce6f5e91a456b1bded5370a1234cf6f6ab5d0253507bc6f3f0573ab97585b67107dec059812323e021e341ad839ea9e3d02aeca43356add48ccef81f693ed53d32ba1c74a35e8a5f7f3115ef834f7daf9948244c4fc31f5487678d3e70fb27abb5
|
||||
Ciphertext = 5cc3f00892f8ac87d5794965f43540ac36965e8122c2cbe8bbc68621739ddb0d28c9086a58c157e7bbdab4bf3e70988a9d2913445776771557bc3e6c6f7f803bfef5085441763b24e266a995b7db60239990202c946aa89750adbf35ebd089b6897a3ca6efa0b4f505dac03c5c2e93cddc3fd7b8ceb419a72d2512330e2cbc99d7b3f3e4eee8b315d3e761c93a08c67a
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 939aac71e337709855715a57e3a4648f
|
||||
IV = 493509b56a92f140
|
||||
Plaintext = 9c22efddc7de496a916d15d710de374d57478126ed64c9ad7e823e24d19bfc0cfac3dda0d1c292a3a203f35b26ad94deb20f998caf41cbdd4a08eb5d6cfb46f4ede4896b0569d72c03ec194941af95c0573cc3fe8f045ba19946b382803248f3dd4f9a454b1a3e8e1af02ea8482d637dac96a68275f4a382d3023f9df4892b9032cab9378b1cef5051d6db81226f259d1be4eb23495ac807600536b5b0481754
|
||||
Ciphertext = e04d62785f1d6a05df1ad002c5c81f1e511d4317d674278b0fd35ba16fc4de739d0fc6429df9de7b12fc4f2f9903efe47b5974f7b727d58f919bd198249eac42fdd0d09d741ad6a37b34203c4a7b2f7b22df0edcc263ca3d245387a6fca88937d762820e5c6a820fa26f7dcb6b1346deb7bd60cd61db8a272667bbc03fe2e88d9d69492eab0c6bdd5184bbe82121232e9340fd1d7a5a4b8b304a88137842954c
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 8368189d41eaa20d06a3a2d2a91e43f7
|
||||
IV = cf04ac0e4733952b
|
||||
Plaintext = 696ca57339840fb3c150e0c111d9e13e
|
||||
Ciphertext = 3f530c7c373723d7d06695e6782f14e0
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 5124c6fdb0856ded76afb6febdaa981e
|
||||
IV = 937ebdeec379685a
|
||||
Plaintext = 5a5928dd09e78a21256eadb062630a3f0b47ca2376ccae314948143fff2512d4
|
||||
Ciphertext = 8ce4e3661b442f508f7016fdbb69f7dcf4609cf6be2a9854533aa450e0638dc9
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 6a8f6487e76058bc5a126276e48fdd77
|
||||
IV = 6e75d8b8ac097614
|
||||
Plaintext = 424ddc343067612fdb426920f40ab4d82e3d4f9485b07fef91617556d3093874840e8110ff375b7a68f98c471ca10acc
|
||||
Ciphertext = 7994f1beec7126aa62694e2b6e0874ba8d2da96f5bfc52059d27af0f93ee47798a894a2d6cb793667ca4b308c46b4dd7
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 01963d44aea026b2205238454d5bb73f
|
||||
IV = 9442a6e0f3a53f10
|
||||
Plaintext = c54cfacd953736a2d8db0b8b63b555253a0ca6f6e05f2e918d18be95669fa85609f827d6da014add2964626670c202b195248fc986372c92adbb10c0e7c36e04
|
||||
Ciphertext = 8f3f08ab74d80edad7b7008e122050ec8b0af8d0b0b4d107a9d74d701bc367296ea0feefbb7106c7d752757be37f4e19c2178c12ea6d68dfdd8e96a301937223
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 4ea87b0b346054c097edc5601b782870
|
||||
IV = 9a3e23333b2b2de7
|
||||
Plaintext = 0c7734310c5ca82b520bf1e0a1614c7ddd0c002711ef0b239de8fa256e15b32056b992747ff3a3a310d52e9df36275d9192dad61caa16715744552c865c5ae9477a70a2c3a02a01ba176b927445094d2
|
||||
Ciphertext = 182462c882bb5a0251542567a92b58e28dc0895891da88befaa0c2d3aae0870ed76b62ba146e4a97a28dc34f83f83bbc29000298028ac646399fdb35c5428b86759c181a8f663d099e33aca6918c3d2c
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 1956f40b2334a6546b3071f2d17f4a59
|
||||
IV = 765cfb560c46777a
|
||||
Plaintext = 045ad66c515d407ab73ea0c6f6ae869872342fc72956a659945454005e37c76ed07df996ffe1322840cf23843b34346a1e730ab721ddceaf362ed256054c105ed581a80c04ef22ae1b5eb8742c6e3c9c0e0e29fad211b4f40adc1520f7c6821e
|
||||
Ciphertext = d441ffecd27fdb3172cb38e462e2b6420cb85db892a6073fe1741bc119815079134582238bf47bff2cf2287f7e9fe6617041177da1675e74a15e2e6b183b6148bbf88bb7aecc0161d497f838a85071425a945fdaf0ac8fc3a1d9a405915dd115
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 4e47e1b5c1b489295d3a2bf049f4be2d
|
||||
IV = 83fdf064d213df41
|
||||
Plaintext = 94a7bed3b5a158e85f9e4778a7de105ff4f3b2a61c2fead82cbe949d7a4ee961a6c62949ba2c69d513d836a455b612c2fbb6ca243a0a18a853cadb6b73b600192de1d51ddf80030718b079fbb581073a06b66ba4ad524d3d09efaa59e6919bca15b2b92bd9f8c17d6e463f4ea5fd5f5e
|
||||
Ciphertext = faa5133fcad1830f7ea3ab6c6266e0ec7ef25643dd5680a433952ed87a433bbab85392f37edbdab44878b337121bf8b37e8b4cd1980ae59bcd8b34191ffffc5f08850f910f3c2c26a4d32fc460d845ed09995cf172b6338728b3aa17b041122e52c4cd9bc036ff5e7a0c3fb1ca82cca5
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 613485e5bb84b91cdd0ca02f8d83e0bb
|
||||
IV = ad8a7564f6ce8abb
|
||||
Plaintext = ed5068003163c424ae9a8e51e3d77684c69073a824dc4721568f7528657c3dd28d66219f398ed57105aa35cfef3ac078eab30ae0f3ed752b0e320b099ea42b156f818904c4b6c534cabde53dfa62e7b74518a8bca3f36ee85b130e8520d38c006e6adef34bbc8df56b757b500d703e5777aa545c4170404754f03dbf22c9f0d7
|
||||
Ciphertext = a03127978305f8e500061bf108157a5e2e4db5e405f130efab2ef5c9d190d15e2bc87c235b6c123de066b447ed506d03d433c12642e8b86ebcfd9077a1e76adf1f79614a28fe92f49c482b6bc3119ab364426236a4aee7920194d0a77ce7d0061c5d254b11f72c6fed02c07a187f945f18818ce31d82fe867153a725525dc11b
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = 8198b36e880cf50dbf6724feaaac8688
|
||||
IV = fbaa2882a2a4acdb
|
||||
Plaintext = b2516a356e437513f0df83938afefbe9f9ef1ec879797997f31da96a1ea7a15d395ecdb94b7fda14cdc0b75c171784fa8832d574b64f9450c6be25dc83b93d3bbf0145a661bf4db775282b98649b64613aeedb8bb770f67cc3421ac6761e5d763c21ac2d1e729e4597ad7fca9fdc70878b26634df78cd0f36fb3b138a1357915abba4ff5f8dfaef268307022f2e23528
|
||||
Ciphertext = 685e4aa88c350e10125a108a6cdbb38baf3c0fc5c5fdc8b36f0f788ed80ce3dd4e21dd3c0c56f7f2ba399270c80e9f106c7cef715d78c1bdcb3841363afc1c27a65f68bfa2e58b9bf8ccced2e99349fb208116ae2ec176351fdeca19060edec12348590496abb943160075a8408a9d4d51e25e147d1e4045cd76e77ee192bbe411241a3013070ee071c08450ed61bd0f
|
||||
|
||||
Cipher = CAST5-OFB
|
||||
Key = e30b4c874c4c4f6e0cf1f8ef58e5d375
|
||||
IV = 7e26f07f8024343c
|
||||
Plaintext = 8ceca4dc346cfd6b15774e082db1a89497b7d85d6b5b7102e77417f7a243fafe17118b7a3bb49d1657cf61b866da395a5b3f349183a53dfa11fc0ac053bddff49dd472ee55f5e43a2f8bc785e2bc420300694919ff7bb43feb75a9cac44ece96f679e618db5d7433af12dcc7e0963ff10b45d835f9a8f42627e7f3fd5038932685965ad0e183f5955e671fc2b878dd51051eedaf85310d1e4e8f75f2decf36c7
|
||||
Ciphertext = e1d258d7b885417ba27c3d00ee9fc9247ee7aec53b1647f1d5250db8f358b7f0da34d3ba595c0f9480815ad7dc5a46aaee41f1478ee302f5a068ca7bf2a123e5a6359f1d85a07ce1415b17f1fa03d1b233f4922ae981120ad919b70822cf68b3597ea080d7688eaab85c17b31dfa2fed465a3f272ad9d97362c3ff4c06bad8db4b548ef263c810094d927fc85ef2f90fb6258245024ad9acc2175aeb73015381
|
||||
|
||||
Title = CAST5 ECB Test vectors (from RFC 2144)
|
||||
Cipher = CAST5-ECB
|
||||
Key = 0123456712345678234567893456789A
|
||||
Plaintext = 0123456789ABCDEF
|
||||
Ciphertext = 238B4FE5847E44B2
|
||||
|
||||
Cipher = CAST5-ECB
|
||||
Key = 01234567123456782345
|
||||
Plaintext = 0123456789ABCDEF
|
||||
Ciphertext = EB6A711A2C02271B
|
||||
|
||||
Cipher = CAST5-ECB
|
||||
Key = 0123456712
|
||||
Plaintext = 0123456789ABCDEF
|
||||
Ciphertext = 7AC816D16E9B302E
|
||||
@@ -0,0 +1,555 @@
|
||||
#
|
||||
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
|
||||
Title = IDEA Tests (from https://github.com/pyca/cryptography)
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 1f8e4973953f3fb0bd6b16662e9a3c17
|
||||
IV = 2fe2b333ceda8f98
|
||||
Plaintext = 45cf12964fc824ab76616ae2f4bf0822
|
||||
Ciphertext = 2cb10d22ac22a375c0021ab6732936c1
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 0700d603a1c514e46b6191ba430a3a0c
|
||||
IV = aad1583cd91365e3
|
||||
Plaintext = 068b25c7bfb1f8bdd4cfc908f69dffc5ddc726a197f0e5f720f730393279be91
|
||||
Ciphertext = 4af8370c69ae4e45cc5a395e790272d5a5a0895dee1f336f0067963bd9ed55c7
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 3348aa51e9a45c2dbe33ccc47f96e8de
|
||||
IV = 19153c673160df2b
|
||||
Plaintext = 9b7cee827a26575afdbb7c7a329f887238052e3601a7917456ba61251c214763d5e1847a6ad5d54127a399ab07ee3599
|
||||
Ciphertext = 09738cbc8c7764dd63206892eca29fbc3a67f7fe44ded6b128a0350426776ea71d0c9a1b6d627e1e3d014837dd82f11a
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = b7f3c9576e12dd0db63e8f8fac2b9a39
|
||||
IV = c80f095d8bb1a060
|
||||
Plaintext = 9ac19954ce1319b354d3220460f71c1e373f1cd336240881160cfde46ebfed2e791e8d5a1a136ebd1dc469dec00c4187722b841cdabcb22c1be8a14657da200e
|
||||
Ciphertext = 956c2993f77485da8f50b09ea7aa532f7c0aa1f63af0ac998680514a16c99d143261f7434f9a9c0fcb26a02175fde4b4093e1efe672cfe12509cf3d455c3ab01
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = b6f9afbfe5a1562bba1368fc72ac9d9c
|
||||
IV = 3f9d5ebe250ee7ce
|
||||
Plaintext = db397ec22718dbffb9c9d13de0efcd4611bf792be4fce0dc5f25d4f577ed8cdbd4eb9208d593dda3d4653954ab64f05676caa3ce9bfa795b08b67ceebc923fdc89a8c431188e9e482d8553982cf304d1
|
||||
Ciphertext = 3831f1265df609c006a15c2b963465e8a0d77bbec6e6d332f0b384479f0f34d2a7ed722607e077170a97ca9cdf526602972823c562c87187b8dc5f5d7de27a80c58bcaa95f5f7cae9c5b70938bb7de9f
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = bbe7b7ba07124ff1ae7c3416fe8b465e
|
||||
IV = 7f65b5ee3630bed6
|
||||
Plaintext = 2aad0c2c4306568bad7447460fd3dac054346d26feddbc9abd9110914011b4794be2a9a00a519a51a5b5124014f4ed2735480db21b434e99a911bb0b60fe0253763725b628d5739a5117b7ee3aefafc5b4c1bf446467e7bf5f78f31ff7caf187
|
||||
Ciphertext = 5ee0a43a2dd9d14eee83d99e51598870a3b4221f28a2eb77b3612fec3c92037ff9eccab303d225d89f313a8894d1de97f3e87a93684290a17622766eda764308e1abe6153f638a3e8e1e6e0f36cca66ee06fa21457266c4291d8456fa84aaa09
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 89a553730433f7e6d67d16d373bd5360
|
||||
IV = f724558db3433a52
|
||||
Plaintext = 807bc4ea684eedcfdcca30180680b0f1ae2814f35f36d053c5aea6595a386c1442770f4d7297d8b91825ee7237241da8925dd594ccf676aecd46ca2068e8d37a3a0ec8a7d5185a201e663b5ff36ae197110188a23503763b8218826d23ced74b31e9f6e2d7fbfa6cb43420c7807a8625
|
||||
Ciphertext = 1c1fa2b32f704963913dd890dc5504d9a4562587f60e15dcf5351bc89ebf4467679ba38d6febb3063745c88e53c4e2866b7fdfe0916cb6196da3f96d0d69dd605d603a80e8da4782f6458f65a0ab55541a0cdac68095b4835ffa0d119cf5d4e40dbf19731cddcfd57cb5cf6250abfa0d
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = c491ca31f91708458e29a925ec558d78
|
||||
IV = 9ef934946e5cd0ae
|
||||
Plaintext = cb6a787e0dec56f9a165957f81af336ca6b40785d9e94093c6190e5152649f882e874d79ac5e167bd2a74ce5ae088d2ee854f6539e0a94796b1e1bd4c9fcdbc79acbef4d01eeb89776d18af71ae2a4fc47dd66df6c4dbe1d1850e466549a47b636bcc7c2b3a62495b56bb67b6d455f1eebd9bfefecbca6c7f335cfce9b45cb9d
|
||||
Ciphertext = 5b15322d02a4de6ee0847b029fa88eb39db00697113260bb5834128ed2201ec2c5e22f50bd274b5ae8dc24e4b721c3e5cb905d96595c869ca1db7cbe6389c8553b36f635a1fbbece6b1aba3ba9d0c6cb361aeb5708b61b99a2812b23f16ca0bc602f5dcb77a1eec677399a47b6ce5f9ebb90c32b2ff3c181a0ebcde94c46ff41
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = f6e87d71b0104d6eb06a68dc6a71f498
|
||||
IV = 1c245f26195b76eb
|
||||
Plaintext = f82bef3c73a6f7f80db285726d691db6bf55eec25a859d3ba0e0445f26b9bb3b16a3161ed1866e4dd8f2e5f8ecb4e46d74a7a78c20cdfc7bcc9e479ba7a0caba9438238ad0c01651d5d98de37f03ddce6e6b4bd4ab03cf9e8ed818aedfa1cf963b932067b97d776dce1087196e7e913f7448e38244509f0caf36bd8217e15336d35c149fd4e41707893fdb84014f8729
|
||||
Ciphertext = c2725ddb784b9cffe46543af4ac9f0e64edcd1678f26b3ee652af6d00ae164f7c07afd0fb773277401c2137070a6a59e39de429c032711756ce6b0c9b9dc69a0a1caaabff9da5855f7410656f8e09e00cee6f44c0fc93f9419d13ccfe63517a1c74afc3dabfd1b43171bfe097cf28ca5674fbd0fa58b0698289a92eb57cf1ff74b1d756ff113252a379f2bae8dd9cd3d
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 2c14413751c31e2730570ba3361c786b
|
||||
IV = 1dbbeb2f19abb448
|
||||
Plaintext = 40d930f9a05334d9816fe204999c3f82a03f6a0457a8c475c94553d1d116693adc618049f0a769a2eed6a6cb14c0143ec5cccdbc8dec4ce560cfd206225709326d4de7948e54d603d01b12d7fed752fb23f1aa4494fbb00130e9ded4e77e37c079042d828040c325b1a5efd15fc842e44014ca4374bf38f3c3fc3ee327733b0c8aee1abcd055772f18dc04603f7b2c1ea69ff662361f2be0a171bbdcea1e5d3f
|
||||
Ciphertext = d9ab48c7195d8dd8860860688b8b66a74b3798a97647d8106352d1e3d8bb6c353e2e561478d396fb432ab07392f5fdd39d610c8e046ffc5fe5eb8736ce87f43a05ec4f4bfb0142a1d32fde8bea7af6b9e22a3fe3823a979f73cd4f4eacc145e5e043dd1a3e2183d0ae3a1aa5d8fe78d9dd867c4bd54ab149bfaefc66647f8948881f712ed7b1eabdab62b71caea6f0face592ab5fcb668752bfa7cbc39a00d05
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 6a7082cf8cda13eff48c8158dda206ae
|
||||
IV = bd4172934078c201
|
||||
Plaintext = 940bc76d61e2c49dddd5df7f37fcf105
|
||||
Ciphertext = 05a31cd129886c6458ec0739472556de
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 625eefa18a4756454e218d8bfed56e36
|
||||
IV = 73d9d0e27c2ec568
|
||||
Plaintext = 360dc1896ce601dfb2a949250067aad96737847a4580ede2654a329b842fe81e
|
||||
Ciphertext = b046b49207973f946668d49d3cd93a13bc9cf50bab20f40cca024e2fc3dd17ea
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = fd6e0b954ae2e3b723d6c9fcae6ab09b
|
||||
IV = f08b65c9f4dd9500
|
||||
Plaintext = a206385945b21f812a9475f47fddbb7fbdda958a8d14c0dbcdaec36e8b28f1f6ececa1ceae4ce17721d162c1d42a66c1
|
||||
Ciphertext = c25cbe4acc9e6909ed195e257a5f28beb77ceb614c538ef531b18778bbbfe1d25d70e4c9b37c4d1d9cde4361206f6173
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 7b1ab9144b0239315cd5eec6c75663bd
|
||||
IV = 0b1e74f45c17ff30
|
||||
Plaintext = b968aeb199ad6b3c8e01f26c2edad444538c78bfa36ed68ca76123b8cdce615a01f6112bb80bfc3f17490578fb1f909a52e162637b062db04efee291a1f1af60
|
||||
Ciphertext = 08186d727f2bf0eee50e52f98775ae222b67b037f40f8a803aa6196fb200ee45a5183ccd4942677d4abe617a6c41c9c565dd79d44de12d9291f434939639e59c
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 36466b6bd25ea3857ea42f0cac1919b1
|
||||
IV = 7186fb6bdfa98a16
|
||||
Plaintext = 999983467c47bb1d66d7327ab5c58f61ddb09b93bd2460cb78cbc12b5fa1ea0c5f759ccc5e478697687012ff4673f6e61eecaeda0ccad2d674d3098c7d17f887b62b56f56b03b4d055bf3a4460e83efa
|
||||
Ciphertext = 0b13ebbec3b66a240dc11cecb1b3a6d5cf2770d529f852a405da596170fa6067a28f07f41c9d520b6d7c3163395dbe875995809f24a4243e0e80e735d3d92307e07775300e10ee57ab916a043c29d3cc
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 89373ee6e28397640d5082eed4123239
|
||||
IV = 1a74d7c859672c80
|
||||
Plaintext = 45efd00daa4cdc8273ef785cae9e944a7664a2391e1e2c449f475acec0124bbc22944331678617408a1702917971f4654310ffb9229bec6173715ae512d37f93aaa6abf009f7e30d65669d1db0366b5bce4c7b00f871014f5753744a1878dc57
|
||||
Ciphertext = d3ed4e4fc32dc0342ec301817899967f3a47737e2691fecf6799fa9c8d41362107be6fa674320befc87ccf9fecbf03dec5be160433f450bfd89d8fc3312232efae95661ee55f10eb2a52f9590c4d7e2c656f6779f6f677190c7349273daebab4
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = bab0cceddc0abd63e3f82e9fbff7b8aa
|
||||
IV = 68b9140f300490c5
|
||||
Plaintext = c5585ff215bbb73ba5393440852fb199436de0d15e55c631f877670aa3eda9f672eb1f876f09544e63558436b8928000db2f02a5ad90f95b05ac4cf49e198e617e7678480fdf0efacc6aae691271e6cdd3541ebf719a1ccaedb24e2f80f92455dd5910cb5086b0960a3942ec182dcbd7
|
||||
Ciphertext = 7ca59cefd0c1f0190af2c8b85d00b7e5838aee42274f26cf08fd0b4ae539c1966367960b0600425e50c802dc94427f0ccf713de467a61319ce05d23c5a5db4d43ac0b0762b2f6ad9e7076df190c50f41788a02317ecfb2e59c42b31c151f9c93f4b1cac3c37e2aafa00ba2d27dbf6b63
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 9c702898efa44557b29ed283f5bc0293
|
||||
IV = cec6e1b82e8b2a59
|
||||
Plaintext = 1d1f8d81bdc3e2c7cb057f408e6450000c5aaed3260ff1e87fbb6f324df6887ffd8f78d7e2a04c9ed9deda9d64482d2b002f4a2b78d8b4f691875c8295d4a64b22257ceaf713ed2f4b92530d7ad7151d629acda882b4829577a43990b0948c1149c22fe4273656d1b08833930e8b06709a94579a78fc220f7057bbc1fa9f6563
|
||||
Ciphertext = 41bc04fb50553959c10d20550d54280f56b33e988b674dee1112631d18d6f79efe3067d8133bdc8ce334929537d9d19a9f5e05f626e56b45daab02fa58a027a759573f363d995e2a5fc779476bf009accc44435c044d481acf9c8c3228b9a69052ef228d64640ca4dd19352ce6257bc5658084f96fdc99790b676a0556f92c51
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 5674636dbdb38f705f0b08c372ef4785
|
||||
IV = 3f20ce0509b57420
|
||||
Plaintext = 6d40fd2f908f48ce19241b6b278b1b1676dffd4a97ce9f8a1574c33bc59237deb536bee376fd6c381e6987700e39283aa111cf1a59f26fae6fb6700bf012646a2ab80239bf5e1632329043aa87d7911978b36523a2bc0bed9a9737ccf7a00baa2f3822b4e9e742e168e7069290705fed2eb63aa044b78f97dd33a8d6b24741ec1fd8c8db79d93b884e762dba0f406961
|
||||
Ciphertext = 52392c00281497aea7e057bd31ee71ad818674c2dd10782e395f9a59ca7b191331cb8576f0f38db240fef904d52ca9181f309e43525e5f2f2a9dc2083360cdef4bd92f61d0b54c1955429df1f3dea48edce637f33c94ce8bd1bd2dbcaa929f3a1d184753238794c585e81cfe5ade7fe86ece0d6a196d8db0282cbadc40913c3973e0c1437ab94cd59370504e9fbc5511
|
||||
|
||||
Cipher = IDEA-CBC
|
||||
Key = 97a1025529b9925e25bbe78770ca2f99
|
||||
IV = d4b4eab92aa9637e
|
||||
Plaintext = e8b89150d8438bf5b17449d6ed26bd72127e10e4aa57cad85283e8359e089208e84921649f5b60ea21f7867cbc9620560c4c6238db021216db453c9943f1f1a60546173daef2557c3cdd855031b353d4bf176f28439e48785c37d38f270aa4a6faad2baabcb0c0b2d1dd5322937498ce803ba1148440a52e227ddba4872fe4d81d2d76a939d24755adb8a7b8452ceed2d179e1a5848f316f5c016300a390bfa7
|
||||
Ciphertext = 0100f7adc870bedd878236fa1d6c23b5a0343546a18567b80ce4d8413854aa1e1633e8ef3c4ed53e90de2a4f11940ea6b6d59321235a6b08aba07339c9b645796729d8c18e23f0ce9e8010f0b3da765a47cbbf9635a40b0f3e56e76748290f83fdf8d1452f91d6ca2cc6d1ab2b967d51f3a9a47e0f0a51d00be2eec0f3da2aa7c06793fda880a93284e7ab3009a52f7d34b76592b3d5bdbe6332505af816a1a4
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = 80000000000000000000000000000000
|
||||
Plaintext = 0000000000000000
|
||||
Ciphertext = B1F5F7F87901370F
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = DEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDE
|
||||
Ciphertext = DEDEDEDEDEDEDEDE
|
||||
Plaintext = D2058501E91225A5
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDF
|
||||
Ciphertext = DFDFDFDFDFDFDFDF
|
||||
Plaintext = E35E6B186283F441
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0
|
||||
Ciphertext = E0E0E0E0E0E0E0E0
|
||||
Plaintext = 242588C5F782A93F
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1
|
||||
Ciphertext = E1E1E1E1E1E1E1E1
|
||||
Plaintext = 7095A50C1E99E008
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2
|
||||
Ciphertext = E2E2E2E2E2E2E2E2
|
||||
Plaintext = 9933DF5A78A355A8
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3
|
||||
Ciphertext = E3E3E3E3E3E3E3E3
|
||||
Plaintext = D1D945E51221B893
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4
|
||||
Ciphertext = E4E4E4E4E4E4E4E4
|
||||
Plaintext = 915D915B79B927ED
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5
|
||||
Ciphertext = E5E5E5E5E5E5E5E5
|
||||
Plaintext = E0C9897A94D0F2C4
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6
|
||||
Ciphertext = E6E6E6E6E6E6E6E6
|
||||
Plaintext = 911E376BF4497437
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7
|
||||
Ciphertext = E7E7E7E7E7E7E7E7
|
||||
Plaintext = B82FAE4092690A95
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8
|
||||
Ciphertext = E8E8E8E8E8E8E8E8
|
||||
Plaintext = E6ACA65966B4AC3F
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = E9E9E9E9E9E9E9E9E9E9E9E9E9E9E9E9
|
||||
Ciphertext = E9E9E9E9E9E9E9E9
|
||||
Plaintext = DFA504DD9CCF1E78
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = EAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEA
|
||||
Ciphertext = EAEAEAEAEAEAEAEA
|
||||
Plaintext = DF00C0F695286D74
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = EBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEB
|
||||
Ciphertext = EBEBEBEBEBEBEBEB
|
||||
Plaintext = A3BA29F79071549E
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = ECECECECECECECECECECECECECECECEC
|
||||
Ciphertext = ECECECECECECECEC
|
||||
Plaintext = BB46376E1CF4EC6A
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED
|
||||
Ciphertext = EDEDEDEDEDEDEDED
|
||||
Plaintext = 1195A6DE7052280E
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
|
||||
Ciphertext = EEEEEEEEEEEEEEEE
|
||||
Plaintext = 415E756EFDCB7A4A
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = EFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEF
|
||||
Ciphertext = EFEFEFEFEFEFEFEF
|
||||
Plaintext = 56A88197AE5924BD
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0
|
||||
Ciphertext = F0F0F0F0F0F0F0F0
|
||||
Plaintext = 89951D70270C9B17
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1
|
||||
Ciphertext = F1F1F1F1F1F1F1F1
|
||||
Plaintext = 2A775028D170B29C
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F2F2F2F2F2F2F2F2F2F2F2F2F2F2F2F2
|
||||
Ciphertext = F2F2F2F2F2F2F2F2
|
||||
Plaintext = 9A4CF8B7C599EF4A
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3
|
||||
Ciphertext = F3F3F3F3F3F3F3F3
|
||||
Plaintext = F9966866D43965CD
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4
|
||||
Ciphertext = F4F4F4F4F4F4F4F4
|
||||
Plaintext = 80E41CCC7641E959
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5
|
||||
Ciphertext = F5F5F5F5F5F5F5F5
|
||||
Plaintext = 0B7C702996413B45
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6
|
||||
Ciphertext = F6F6F6F6F6F6F6F6
|
||||
Plaintext = EB69BC3BF5B3FEA5
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7
|
||||
Ciphertext = F7F7F7F7F7F7F7F7
|
||||
Plaintext = 36BF2856E58435EA
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8
|
||||
Ciphertext = F8F8F8F8F8F8F8F8
|
||||
Plaintext = 1CD03F0A40A7B20C
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9
|
||||
Ciphertext = F9F9F9F9F9F9F9F9
|
||||
Plaintext = F56AF83339036916
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA
|
||||
Ciphertext = FAFAFAFAFAFAFAFA
|
||||
Plaintext = 3114B9E8F15EA604
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = FBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFB
|
||||
Ciphertext = FBFBFBFBFBFBFBFB
|
||||
Plaintext = 55BC49104267BD78
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
|
||||
Ciphertext = FCFCFCFCFCFCFCFC
|
||||
Plaintext = 1A578AB6029071AE
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD
|
||||
Ciphertext = FDFDFDFDFDFDFDFD
|
||||
Plaintext = 1C2292FA2BDF8F40
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE
|
||||
Ciphertext = FEFEFEFEFEFEFEFE
|
||||
Plaintext = C7E3F87FFE503CC3
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
Ciphertext = FFFFFFFFFFFFFFFF
|
||||
Plaintext = 28886D814399E782
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Ciphertext = 0011223344556677
|
||||
Plaintext = DB2D4A92AA68273F
|
||||
|
||||
Cipher = IDEA-ECB
|
||||
Key = 2BD6459F82C5B300952C49104881FF48
|
||||
Ciphertext = EA024714AD5C4D84
|
||||
Plaintext = F129A6601EF62A47
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = d7d57bd847154af9722a8df096e61a42
|
||||
IV = fdde201c91e401d9
|
||||
Plaintext = 81883f22165282ba6a442a8dd2a768d4
|
||||
Ciphertext = 770e7b0eacc089b7eef410d98d886e9e
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = c9f4ce21b4c7daaa4f93e292dc605bc5
|
||||
IV = 5e5a8cf2808c720e
|
||||
Plaintext = 8e19c5cacd015a662e7f40cdecadbf79a68081c06d9544b41c2dd248e77633b4
|
||||
Ciphertext = 7debe39a58066a7994150d910060b127582de612ff58f9564a92ab45591bec49
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 7a70cc6b261eeccb05c57117d5763197
|
||||
IV = bb7b9667fbd76d5e
|
||||
Plaintext = 823cbaae3760c85512a3c83fd60bb54b7cfc739b295b63e05ef435d86e19fd15368c89ff08a0f21ce89a728ffb5d75df
|
||||
Ciphertext = ab6e0f15cedf272c78fbc7fadcc4ba1ded256668b9bc8302dc3312c0149e656e8fea632b8e20f5ae8675106d7761a366
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 85dbd5a6e73681a51a4a7d4e93ca7d0c
|
||||
IV = 89d897c5aa9e0a5d
|
||||
Plaintext = e3dbfc6ae1a879870fd22644c8135fe063355dfc0a8dad45c9c6e052e6e085cf717754dc1b49acb04cf340826ffb0da991138f022a9c34923a6a116c98c7d3d5
|
||||
Ciphertext = f2175634137d76347f4cd8f44a00282f6144dfc0cde4929457f8f180f62aabd180249d4568405d9d596be34802ded7d2e390d77384677c45575eb6865cca7cb2
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 18b9887a34438fb2e759027e54e334b6
|
||||
IV = a5be8621e58dae32
|
||||
Plaintext = 8cd659df925950b516f737fc92d2fafa008c008c9dfe0e75ed2d68f6ff79399ff2183464b8c37cf31aafc145fcbfac73e3f87eccb435f424bf1c6d6efb504e8e93e8a668a2210e3d3b4fd437ad1a5842
|
||||
Ciphertext = b5241fefa40b2f9f015387b0e648843e35549d891702d66c1bf440aeb07432e3299badcc1d56b9ca8c45abcd677cfda10de93e2f3b05b2da1086e4070301989eac95cd7ed311b7de208bf66a59f64d1f
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = da52c0e4609e82ee926174a9eaf90b08
|
||||
IV = f2d0c5e86b4ddb40
|
||||
Plaintext = 91d6c95a614cf85de16eeabe5976c2a2a9d307042f79a7aaeb7c3c57e1dd8d43bfa458c8c02e4f5ed0c960c9f17e3991dd2e0cb3ede18f96395a484001ef07ca4c97b411ce454aaf0f74242aca03786a93442171bd50a1467b9d663245d24c2f
|
||||
Ciphertext = f0decc26c48676592200ae619f0b5111d629733f23a34ce888c862e9ae0886b5e8f93e2c2832d3cde6cccc5499801e7b8790b61e8a13add9da593981e8ba4ec08e46226eb77f8fb40105e040c7a5d84e4df6ee05f3e29832f80db65bc03fd4b6
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 56d6f7e2a870b92d55ff8d6e9c554d2a
|
||||
IV = b512f0e11e27fd1a
|
||||
Plaintext = e62cdeac43667749701314c546f778a4c758e4f55760e7d729c3783cf7a242edf6ae3fcf0990886434896c945455bfae0e5674aa06ee6fb1512d94df2cac2447eeb849373bb3efbe7bb8d66c8a7ee559b17fc268d6599fcdef7457cdbde5b9c5b692236e4397545f2be97bd44f3993ad
|
||||
Ciphertext = b0464ff22110d71452ab1b6c8064b706268a2d849607c734ae20c1d4f55c2b98a4abb7db1759205cd0f870f6dfbc7d4fdd72e60c4e9a4143dc76408340dd6d2c6ce86381511930997a304cf890eec337176c95b834186a9191fbb17b8548e3dc7b10c8b7cb8d0b6bbb26ceac0111477c
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 09f216ff78dfe419dfcef1a855473414
|
||||
IV = 722174c892d26529
|
||||
Plaintext = 11f435e7e3656fcfa8e0df230311ca21054e84e13c8590e7ec7309f59c174022d467a7302641ee1b6ba46bee4f20bfda108bb78982f670b057dfbfe49da9cfae88490ce17241402b20d2fceb476d3a424e6c406d56ffc85278695d584d6c087cb4012ca2cf4daf284fd15ac1f2e183814957e934bf88dff4d777adfbb54933b5
|
||||
Ciphertext = 59cb49f6193b7a8c728049be0a804b3a2ea9c0dfbe84f82b5b0439e33e073168f90053094c37ab3ce34b7abfb6386b23003e73e275ea2fa8da8c2acc18314ffdcd8c0512bed2472e5d82e7e27a0af1d01aecf4a14ad8bb031ad968ec0aacc9d759aa76c58c74400fed536c7482474ce23cb798cc8885713d1a32c174ef6827da
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = cde9b69eea2b6a5588457e35e0a08803
|
||||
IV = 52323b54d69a62fe
|
||||
Plaintext = 967798995af6f435b3a6f92bff77a11fa44d1426ae0f6e7dbafac27b123c5fc419be52c0ea412c4b3cac05ae89a4c0ce6f5e91a456b1bded5370a1234cf6f6ab5d0253507bc6f3f0573ab97585b67107dec059812323e021e341ad839ea9e3d02aeca43356add48ccef81f693ed53d32ba1c74a35e8a5f7f3115ef834f7daf9948244c4fc31f5487678d3e70fb27abb5
|
||||
Ciphertext = dd12abdb3d5ec0e56565f9c9d281095cd97b8dc05f230d23ef0ed671abfe5eb9cfa9b5b7acaad4f2e00f0319de2fa90baa757b3f9f96df735233e433c0b8451dbf84465cf6d26e30198cbb1c6e100822aed49690db1638efb1a3e94039b83de7e1ab9339fa31e93440da61c4a814914c16742470428858336dd2944eaf81e2b93bb279454a4a1e02de7f82657ef32904
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 939aac71e337709855715a57e3a4648f
|
||||
IV = 493509b56a92f140
|
||||
Plaintext = 9c22efddc7de496a916d15d710de374d57478126ed64c9ad7e823e24d19bfc0cfac3dda0d1c292a3a203f35b26ad94deb20f998caf41cbdd4a08eb5d6cfb46f4ede4896b0569d72c03ec194941af95c0573cc3fe8f045ba19946b382803248f3dd4f9a454b1a3e8e1af02ea8482d637dac96a68275f4a382d3023f9df4892b9032cab9378b1cef5051d6db81226f259d1be4eb23495ac807600536b5b0481754
|
||||
Ciphertext = 3ce172ca82e0a649e182b3c4bd235f55936d343810bcbb6e53f6f6934c6cae8cd54212e9acb4379c99d83c6ecb72d915400b86f984d67f394b72fcdad6eafb56298da8ede4ceea5c1cc3e54d6d6505fddb2857470184adf50b287bd3db64b73da05584f78689b6d1215a26ebf18ef83fe38970bb23346a0a6380f77afd206333821646463a9e72124bdaf8c9b3046cfb5a48db37686859f79098cb806135bea0
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 8368189d41eaa20d06a3a2d2a91e43f7
|
||||
IV = cf04ac0e4733952b
|
||||
Plaintext = 696ca57339840fb3c150e0c111d9e13e
|
||||
Ciphertext = 93e074da165bb361804f9183fccf09a7
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 5124c6fdb0856ded76afb6febdaa981e
|
||||
IV = 937ebdeec379685a
|
||||
Plaintext = 5a5928dd09e78a21256eadb062630a3f0b47ca2376ccae314948143fff2512d4
|
||||
Ciphertext = 4876980c4401aad16b3e1eabff960769a1bc8405a985dadc08282d0ff674e4f2
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 6a8f6487e76058bc5a126276e48fdd77
|
||||
IV = 6e75d8b8ac097614
|
||||
Plaintext = 424ddc343067612fdb426920f40ab4d82e3d4f9485b07fef91617556d3093874840e8110ff375b7a68f98c471ca10acc
|
||||
Ciphertext = 948a59cd4ac292743708e7309b9893fbeba832a9996ecccc13a8cc17a7711f00858e5e3d04c0635371191356eb58f78d
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 01963d44aea026b2205238454d5bb73f
|
||||
IV = 9442a6e0f3a53f10
|
||||
Plaintext = c54cfacd953736a2d8db0b8b63b555253a0ca6f6e05f2e918d18be95669fa85609f827d6da014add2964626670c202b195248fc986372c92adbb10c0e7c36e04
|
||||
Ciphertext = 26c746d831f5f7ea08686075d0f180f52b0fcc105494943bc0179fdb01fc437ae60fe3dee725902f11fb3dbbc42184f52b1d5207c71d1e6fe0e83b3dc2767227
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 4ea87b0b346054c097edc5601b782870
|
||||
IV = 9a3e23333b2b2de7
|
||||
Plaintext = 0c7734310c5ca82b520bf1e0a1614c7ddd0c002711ef0b239de8fa256e15b32056b992747ff3a3a310d52e9df36275d9192dad61caa16715744552c865c5ae9477a70a2c3a02a01ba176b927445094d2
|
||||
Ciphertext = d5f99a34f86f6de38e10712f306add36cfef67ed3bd8dbf0cb32f5ffc1832037cba7168e2249e1c635de1577797898d2573aa6fd61e766cbd0e4e5bc87c5d85fc95dbdc78c26d51a7228515b342f94cf
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 1956f40b2334a6546b3071f2d17f4a59
|
||||
IV = 765cfb560c46777a
|
||||
Plaintext = 045ad66c515d407ab73ea0c6f6ae869872342fc72956a659945454005e37c76ed07df996ffe1322840cf23843b34346a1e730ab721ddceaf362ed256054c105ed581a80c04ef22ae1b5eb8742c6e3c9c0e0e29fad211b4f40adc1520f7c6821e
|
||||
Ciphertext = 7b853c47f4e39a069415f5fe34f857b9b7e846b45999c12a496ce5550834cc26376a90235ae20983c31129b108ffc3cf4431bf379a5907b16c7248df9d40fa5b8e9888bd1c2a45a0812e4bcf71d40bb8a064279d5f3f214eca8bf193b6144bec
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 4e47e1b5c1b489295d3a2bf049f4be2d
|
||||
IV = 83fdf064d213df41
|
||||
Plaintext = 94a7bed3b5a158e85f9e4778a7de105ff4f3b2a61c2fead82cbe949d7a4ee961a6c62949ba2c69d513d836a455b612c2fbb6ca243a0a18a853cadb6b73b600192de1d51ddf80030718b079fbb581073a06b66ba4ad524d3d09efaa59e6919bca15b2b92bd9f8c17d6e463f4ea5fd5f5e
|
||||
Ciphertext = 6130cd5cc68d4bd6055cca1c51281de12652e6df9ac9a24b39d5d2bb3876cc76e7e85f72efbdd9b7d55d8e1a84e17ad3292ba5bd071f39f7b373c807153a4fe553fb44872cb2a7b80d6c97f78eaea3824d501792456667f335e8f33e29f6ffe7736a5b46786c78b3cd9e8bd3498e7c4c
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 613485e5bb84b91cdd0ca02f8d83e0bb
|
||||
IV = ad8a7564f6ce8abb
|
||||
Plaintext = ed5068003163c424ae9a8e51e3d77684c69073a824dc4721568f7528657c3dd28d66219f398ed57105aa35cfef3ac078eab30ae0f3ed752b0e320b099ea42b156f818904c4b6c534cabde53dfa62e7b74518a8bca3f36ee85b130e8520d38c006e6adef34bbc8df56b757b500d703e5777aa545c4170404754f03dbf22c9f0d7
|
||||
Ciphertext = cada42aeaf73266caa8537f853fbc710df59f6e7809ca07e6131ba41c3cd413433c3f26faf5fbceb50238e150f6d613cf4bcf79416abada400a827dcfd2320a5d19ac7ff6fd725a30ae3c739ed9f6d9495f36ce414abc338cf52e7a351de4dfa54b52660370678529dbd7c36770399ab90a44f95dd5a837dde12b28da8a06ee7
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = 8198b36e880cf50dbf6724feaaac8688
|
||||
IV = fbaa2882a2a4acdb
|
||||
Plaintext = b2516a356e437513f0df83938afefbe9f9ef1ec879797997f31da96a1ea7a15d395ecdb94b7fda14cdc0b75c171784fa8832d574b64f9450c6be25dc83b93d3bbf0145a661bf4db775282b98649b64613aeedb8bb770f67cc3421ac6761e5d763c21ac2d1e729e4597ad7fca9fdc70878b26634df78cd0f36fb3b138a1357915abba4ff5f8dfaef268307022f2e23528
|
||||
Ciphertext = 14ba2c1e1fc015568184c1346b09469366db7d1dc151d08a8f99ffa22115a30a5a6dd5c2d6fbd09e03134710f1902ceab86069551630d3f614e67d195a7422b2c70225c5ebbecf7fbabf8db05c21025102225cdf2093fba3bd4ba1f1674c305a99cde36e1d112467466489c4f04a55fa495b610ee616749dc5c9f7ca3eb4ee35989402a91ff0085128077eb03e5d6ac1
|
||||
|
||||
Cipher = IDEA-OFB
|
||||
Key = e30b4c874c4c4f6e0cf1f8ef58e5d375
|
||||
IV = 7e26f07f8024343c
|
||||
Plaintext = 8ceca4dc346cfd6b15774e082db1a89497b7d85d6b5b7102e77417f7a243fafe17118b7a3bb49d1657cf61b866da395a5b3f349183a53dfa11fc0ac053bddff49dd472ee55f5e43a2f8bc785e2bc420300694919ff7bb43feb75a9cac44ece96f679e618db5d7433af12dcc7e0963ff10b45d835f9a8f42627e7f3fd5038932685965ad0e183f5955e671fc2b878dd51051eedaf85310d1e4e8f75f2decf36c7
|
||||
Ciphertext = fc1991515ffef84ce1074d0f7e7ce9a2dd0b56facbaf4b5f2c617963c6df3ea9c6d1242abbab76160cc159a81e51fef33835546429b6bc026e4f091c89a8a9e0707747fc85083c776e5603ef2383c3e5e5ae493013b4940df54c9a050bc2b696f03a234fad58506b10aacbb48de0c91ef39ebe76a9e5540ec6284eed13cc17c72dad54555aed4ae60359dfa8b1c4e8bdcea6abc458dc1452a623d8f3fe13e2ae
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 085b8af6788fa6bc1a0b47dcf50fbd35
|
||||
IV = 58cb2b12bb52c6f1
|
||||
Plaintext = 4b5a872260293312eea1a570fd39c788
|
||||
Ciphertext = 5d9c48bf7dc115f28e153dc93dfcff96
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 701ccc4c0e36e512ce077f5af6ccb957
|
||||
IV = 5337ddeaf89a00dd
|
||||
Plaintext = cc1172f2f80866d0768b25f70fcf6361aab7c627c8488f97525d7d88949beeea
|
||||
Ciphertext = 4ec6f34be3335024cbfbbf80f3e7501b8c9f7a6cbd630cf8debba4a4c3f1daa4
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 0a8e8876c96cddf3223069002002c99f
|
||||
IV = b125a20ecd79e8b5
|
||||
Plaintext = 4fd0ecac65bfd321c88ebca0daea35d2b061205d696aab08bea68320db65451a6d6c3679fdf633f37cf8ebcf1fa94b91
|
||||
Ciphertext = a562b606f716af7fd9641b5ebc66e4cad7e9422200a83b07e5341814b33590d26dba38db01c19bac669dc469f4c2eb9b
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = b9ba9fa32cc491d8ac2beb5f99193d57
|
||||
IV = 95511452b71e53e9
|
||||
Plaintext = b40382705aaeea41097c309da6cd06010f15e09c0130fa4b3af69cc8da109d1f0f0a2661f1a8b89bab7e7009dcbb8a883d46254a830c45cd87981e0ea4e490fa
|
||||
Ciphertext = 5294eb7f0f7872e20a2012675a1fbcb059a9c2bec5231dfe72e6dd7826b86af365b6beb33a23ebfec6184e790d3002b8ff81eedd84b73edc3ac539230e23c65b
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 5947bbd78b06bb5ea2fc67ed7b24216e
|
||||
IV = 8e4722ad2230b15f
|
||||
Plaintext = 9e69423653c20c982794ed35d63c1a78e8ac14f37e1888ae4bf273bfe119891b2e4ed8ac46e7a9a463c7a710298d43b02f0c5606bcfc08adceeef2ec61867f8bede498e53163803f2f86fc58782fb841
|
||||
Ciphertext = 4fb93afc260b40f575f1fe95609737f158c61c40f23b13845cda507f5baf20c31c3d3c85726fbb0b89751498ef29f123fe0767fc550e71e38e0db5d52b507f7e2321a37bc0959410ffb785bcdaede128
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = abce650e78f969b3b210151c74117fd2
|
||||
IV = bc4659fbb7073c1f
|
||||
Plaintext = 322eae07df5ad2ddd64bba34e42d30c1b884f842e71efa123345a3fb0c39884c57dd4c2c6fb0c42e69ff5a269d59af3a6144853c182edb376ca65947d7ccefae6806ba25c4f527706ba85a353c0fd10e3cb244dd93a2d060d7b055058dde1dff
|
||||
Ciphertext = 800a13afd1ccd50aaada08a18ed61674aa9b9cc84d6fe1220bc0acc19f973ad5414da099359ef259b2d63e8b1e5cc0ba6258ab48f1603252199f7631a513330fcbf383d8de82a6b2a2c2870f8c06a635076c40c8f98dbc35f09f372db8fd3834
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 9f56e19b09dd3fee0e110f71e9967b7a
|
||||
IV = 1155cf4231bf7ac5
|
||||
Plaintext = ad1e4d3162a5084f581117639a13fc35df5449625ffe0f01e57d9a8726875be8515926ffe7449e30cd69ed4ca0c1b8b4486051c2d0fa2f6474a69c0afce2aec349d778a22edf81678145765b714c1b7c197287da56f59141d6978618729e1d89be20ace3de7d9b3c9b2d195ab6bc0fd4
|
||||
Ciphertext = 4dc8bbf26235b8858157cf03165ce61bdb25f3a2773b27db0c5e23dd14f7c4971f8b8ca65f61ef6ed7f348da0201d1e6ac2c45d431a31116ca89beb0e503f0c078848e5f982981406d0d72a46cc9e48da09cd5fca0aa8b97b8120f798a1f6f8316e677023028b219d844619e269608ff
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 31c485c996d6ceb2d17e0aa05b2490e4
|
||||
IV = 8c37f33405051b4c
|
||||
Plaintext = ac68de6a2c2144c6b4fd975a8dec93447391e7c9a4fde63d36be7f23ad186f96cd92b5e8adb546880d100329e97fe8204fad860e6dd8b3c0eed4805387536b9ccc63d6c74938b83dce2c93cc0a04a6025b7563d9e5e7239ae27819fb3844848a51e4294f273401ad9e592f8a170334b042f0667233b29f92b9b13262eb73232a
|
||||
Ciphertext = 1777835b641860aae245fe67750d514ba3f0ebd1c9a1179f258999cf5e1a6f850db6dc5cb3088cb262fe5086ca4b75be1cf4ad8d795c99a6d392da940c41a190d0eb38c3ea6b54c771a382d0969b2f1975c9e6d22f4c651eab379302e656d3d316424fda315128462c49364cdac824673883b06ac67781f1ca7c80b5cad92e97
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 556ccfa360ecb5025032dddb124cad4d
|
||||
IV = d54c6fdcc85dc0a2
|
||||
Plaintext = 71fbf180effac3dca0d69d40e4017dbe50455396f9fb6507ef7df26507de156cded8edd41a05fb25f352cbcdf3b2d770f90fa87f84863e0c2ed3b2dd770a1abfc489ad1ca82a28d061bd7039a6b5788da021657136def0c78d0b0cc7cfbec9512cf579811fd01185f3fdd2ab857328be4b63d293956b43df130e484b9861eccb1d06992b095e7febb0fb394c1954aeab
|
||||
Ciphertext = 9ceb25ce05eeee39452995468321c2b73c39f60082d7c91d129304f5802d3e559c099ccb00aeab4e274d47397268ab7367d055a336a52dd314402e2accb0925372028157a3ef60bd97427855117379bd70e05a3cbafe9acfc19e5ce78262011d1f2dfa1e67ec214469fab9a9e1a92e2591acfcfbb2376559433de491217260996637856930b57cec36f3f091940370a3
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 7cb81fc4b203b0fa9bec49759bd515c2
|
||||
IV = 4d5e2fa3bf73f488
|
||||
Plaintext = 362789b376d85eb8181d4eeea52d42e873ce7741c11a2f820383a7457b15489b09fb21ac4445959dc9e851b7d40682c50d7044bda46a5da39fae2bab73b3db9ed22edc7ec5da936dfa7451cb5f0a829ff0762738cc2686148f1e1f00dc3fe38139c9a173201fc1f052ca34736fc1ab3dc4e707f864d6119b7adb6c8ddd41c80de5d357d17e9c85ed7af1e4f72cb2656932ccce469202680109eef89a9f42f10a
|
||||
Ciphertext = e0456318fb7a2318181f4b847e3952cdc5f09e6f12631a89d7d86c108a9d14e49368bdc65366cf4c42c98e31641bb63439314010bafb88f83a300f8ca107e95d689738f29ce399348a8418baa2cc57b935640d574ea7b2f0205b62a68b0c7aca3c58f3181c5892c21036acdb241d933e1bd05e764fe8297131b9c7c7a99d2aa202f07312b4d48df43b973cf51b9fbc895284a304dc7eabde4eafa58325b984e4
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = beb622d0228cde29b342bbcf4c1c83b4
|
||||
IV = 75c282fa581d9c67
|
||||
Plaintext = 860476c81685b58e71e2599efe083ce5
|
||||
Ciphertext = 1a68dff188262ef7525fe051199fb940
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = c4666081e0b0eddb10a9a607c807378f
|
||||
IV = 5f23623288e4a41b
|
||||
Plaintext = 2fd02dab9054248073ebc0b07aed383756ccfa4fa6298722775be6a9b4ed27a5
|
||||
Ciphertext = eb5d94d1d12b97ae3814ddf3b9c8c9aab689ce912334b3054f14e8082334cd1c
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = df010376a6b03279338773a70e012382
|
||||
IV = 67455decec549365
|
||||
Plaintext = 9b9c3dea553ec235db0011b27191544171845b7bdda0dc04a089583959bba5ab7048f8ca87eab073a8b824fdd4e82e40
|
||||
Ciphertext = bbe775751f4b704f3cb0dbb43441111675f63c54668d34c1fc50d3a6c428217a009a167d9162f4d93dca391979002164
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = ff01aa4f7106c6bd24399076f901a530
|
||||
IV = 089b4f6054eeeef7
|
||||
Plaintext = ae9cb9dfa305af83e95a3b2099f70907edcd49fbc6efc5ebe744184c76b4f56bf35774f3fe215e1c8ee42172a2dd3e6f9ccd3d9bb044325e61a6bb97e48e9986
|
||||
Ciphertext = e1ad6de3d5ed15b7fd560482478f5e5e7673657eab175e03d71cb1f80d8e476e7b976c4b0a6c2a6a2d5fd2b20f4f6cc8b56b46adb9a97db56deba7e9d2b8d817
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = d33d4062ab32298eafcca86b5088d5fd
|
||||
IV = fcfffce8b020240f
|
||||
Plaintext = 1fe1318adb99e6d4fced292902fe8c831ba488a43f85964d6ff54b322663b380bc99fed15568278cfe1d0af795c71355bf65e876855763655eec3abf3d4b27a0341d607f4bfbd82c8900fd436f7c4186
|
||||
Ciphertext = 5424e2c3d2e00cf2ccefd1ee8ae552ef8122c2bda3624b3e4cbfb23abc309e103e485a8ff677a5ad908ffc72b9e70b4ccf0794a3be537aadd59a30bf5905fa6702d0ba12238f705c20884443ba921c91
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = 47e13544a7bbf74dd68ab5ce66e5bdaa
|
||||
IV = 69480b4dd38cf3b4
|
||||
Plaintext = 3e2e583a3a0389ca324f2aaa52b7823904ab288dae562995cf1d70c796d785fd361261434eea480ceb3d369d969652c7ff194931c0a9bd978f5ae4094d6ef32d986a092c580ccbf865e5095a7b80559be13f842f9bea9e42a3a01ef8a24a6526
|
||||
Ciphertext = 50d3ec47a14c6ac19dc5c8820520c8265e4e0265816e753792ef759ff523aceb904a02e8b10259c9e1d019bb684417f05e431e02541adaec98d725fd1bf11365fca4b97d7c0bfd8294bcc9d72f235899ee7c110dc4ca53fd4974d0cd20055834
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = ae86823695b48e8c612ae5a01b597f97
|
||||
IV = b26eef7b1d14894c
|
||||
Plaintext = 569a910bc6aa97b8939ca703fc10ce0d171625bc735a1fea7148650541109d955b1b686c6cc404b2d3d92ad9faaff217dc7b31b038b770959aeccd1ca55d650364fde51df8d4f0aeb05fa364f5028f709c179ca6df0bdfc1cb850f238d755ac44a733fce558402be0c70bc0871b8e62f
|
||||
Ciphertext = d0dc50553bbc0248e6f8b1d5f7c31aa93fda2addb2cd184a13d0adeb7f2ef8f611d92479bd8b61cf029b406f09921a972f2f0e14a3d790256cff4e812c40b822821c71ba6cb21a3a2c1b463f598d1d5a626d5c9fb85f0aafa1f6bf18aef0db18c9872c0e8588e9646f237be9f32a7550
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = b85df29c9244229835d73441dc37555e
|
||||
IV = c1375430efedb2d3
|
||||
Plaintext = c232a0bbf967ef28b74e7b809c62bc8c1cf2d52a273a84162900da834448fd567870471498f29770619dec504922e379eaba0d3a712602583d00279d8fc6a6d568cb94a330039a189ed5802abb7a2898c13ef89c00d73fca9a2f2ffc2107ab498212c56835c0fc26f835a69c00bb3eaa695ac20e8bdb0f5b5b6684d02bee8fb2
|
||||
Ciphertext = 935458de3bc1a090a7a85eb79a12a3e48defcae8581c59233ce0b2a8b7ad999a99d1858e5e513680a9cb7558b0706ec0be122a33964c4c6d4c880b4e953810ae111f6d3f8e89e8b3a708b199ce6a7476f177fea627eca43439df5c98a414dd8dde088cc380bc10e43a9341114787fa80c7dae515d6a21af4f2d3619a200b9ca0
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = e96771f5f20a89ee871261d2d18e1e46
|
||||
IV = 8c664a37d245d26c
|
||||
Plaintext = 8aaafd56c5d5d54fbe16f115c3216bd1f4376666931a2ef1ffc5468ad12150c39250dca2d63c6ea166bb0ef4aaa3d5849c1f9c621c55826a1ca362f03bcba4dcbd654b300d16519710130e5360bd949aaded6a648f96dd8937a77287d4a4ac2941729475b635b9797476b4dca4171787ff15882d3b4872ed0999a7546dbb61698e8348f70e4a14981a78156150484532
|
||||
Ciphertext = d357c276cc6961fa627b0edf66ec8e5baf035cf19980e53d6be5f3e5fa67de668bc1e27ef04cd2efc216783c4b955f8072af265aa96cc99dcf53ab3ab0fa024efca1087f0851a6b392f4aef1ac946fdd0fc1320a395df4d3ce596332aa5a0628b5f8e2aac4cf677a4b3d804a1503bfc879040f90b3a0530f49eb3d8c67d1cb00dad36f6f3a98328984258eae6fab1e6b
|
||||
|
||||
Cipher = IDEA-CFB
|
||||
Key = aef49da33f538ee66e178d4b6121055d
|
||||
IV = 842566e68b61ff7b
|
||||
Plaintext = 415991f65e1a95040cef9960556f61e617827c30c74bf353cdd86173dbe4cc983a2ee6bc8ca6cfb71121e7b0d0178f2e13445c710dcc176b781201971171f7489f18faf110f39accd1cf08c85a958d7698b116f1c0d75812ac9b0b39aee7f7159ccad8fdae9b99f2d695eacf12c6469d5b51a34de26eac73613dcb2f77122cb1f8dd5162786a12052dc7b6dea6acc4989dcc7eafd9374f6c29697c74749ef16d
|
||||
Ciphertext = 11690969c6b2bf0f1c42a42d44049062c885499eadcb350e81d22c6caf7d499502e706ca3137e3a5d8cfb56354003aa8a1fb3c30767d6f8e5255b4e31c3325924b95494144fb02c257995e2e59f9017d5a32e1d2bf285bf404554dd6bf7077ba1d48d0c08ebe10ad110e66148b17d43f341d72da027033cd0b75bb3ca3a046557b39bed024e9ff5b08725d357ed22aede4a33dfcc4b61b34ba0d32230e572f6f
|
||||
@@ -0,0 +1,313 @@
|
||||
#
|
||||
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
Title = SEED CBC Test vectors (from RFC 4196)
|
||||
|
||||
Cipher = SEED-CBC
|
||||
Key = ed2401ad22fa255991bafdb01fefd697
|
||||
IV = 93eb149f92c9905bae5cd34da06c3c8e
|
||||
Plaintext = b40d7003d9b6904b35622750c91a24575bb9a632364aa26e3ac0cf3a9c9d0dcb
|
||||
Ciphertext = f072c5b1a0588c105af8301adcd91dd067f6822155304bf3aad75ceb44341c25
|
||||
|
||||
Cipher = SEED-CBC
|
||||
Key = 88e34f8f081779f1e9f394370ad40589
|
||||
IV = 268d66a735a81a816fbad9fa36162501
|
||||
Plaintext = d76d0d18327ec562b15e6bc365ac0c0f8d41e0bb938568aeebfd92ed1affa096394d20fc5277ddfc4de8b0fce1eb2b93d4ae40ef4768c613b50b8942f7d4b9b3
|
||||
Ciphertext = a293eae9d9aebfac37ba714bd774e427e8b706d7e7d9a097228639e0b62b3b34ced11609cef2abaaec2edf979308f379c31527a8267783e5cba3538982b48d06
|
||||
|
||||
Title = SEED ECB Test vectors (from RFC4269)
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 00000000000000000000000000000000
|
||||
Operation = DECRYPT
|
||||
Plaintext = 000102030405060708090A0B0C0D0E0F
|
||||
Ciphertext = 5EBAC6E0054E166819AFF1CC6D346CDB
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = DECRYPT
|
||||
Plaintext = 00000000000000000000000000000000
|
||||
Ciphertext = C11F22F20140505084483597E4370F43
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 4706480851E61BE85D74BFB3FD956185
|
||||
Operation = DECRYPT
|
||||
Plaintext = 83A2F8A288641FB9A4E9A5CC2F131C7D
|
||||
Ciphertext = EE54D13EBCAE706D226BC3142CD40D4A
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 28DBC3BC49FFD87DCFA509B11D422BE7
|
||||
Operation = DECRYPT
|
||||
Plaintext = B41E6BE2EBA84A148E2EED84593C5EC7
|
||||
Ciphertext = 9B9B7BFCD1813CB95D0B3618F40F5122
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 00000000000000000000000000000000
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 000102030405060708090A0B0C0D0E0F
|
||||
Ciphertext = 5EBAC6E0054E166819AFF1CC6D346CDB
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 00000000000000000000000000000000
|
||||
Ciphertext = C11F22F20140505084483597E4370F43
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 4706480851E61BE85D74BFB3FD956185
|
||||
Operation = ENCRYPT
|
||||
Plaintext = 83A2F8A288641FB9A4E9A5CC2F131C7D
|
||||
Ciphertext = EE54D13EBCAE706D226BC3142CD40D4A
|
||||
|
||||
Cipher = SEED-ECB
|
||||
Key = 28DBC3BC49FFD87DCFA509B11D422BE7
|
||||
Operation = ENCRYPT
|
||||
Plaintext = B41E6BE2EBA84A148E2EED84593C5EC7
|
||||
Ciphertext = 9B9B7BFCD1813CB95D0B3618F40F5122
|
||||
|
||||
Title = SEED Test vectors (from https://github.com/pyca/cryptography)
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 085b8af6788fa6bc1a0b47dcf50fbd35
|
||||
IV = 58cb2b12bb52c6f14b56da9210524864
|
||||
Plaintext = 4b5a872260293312eea1a570fd39c788
|
||||
Ciphertext = 5c460dc6a83060ee36ec55c5ce6448c1
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 701ccc4c0e36e512ce077f5af6ccb957
|
||||
IV = 5337ddeaf89a00dd4d58d860de968469
|
||||
Plaintext = cc1172f2f80866d0768b25f70fcf6361aab7c627c8488f97525d7d88949beeea
|
||||
Ciphertext = a6841e5e4dea28f28d7a83031442c86e5b68d1048cda42452964df577d3c0abc
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 0a8e8876c96cddf3223069002002c99f
|
||||
IV = b125a20ecd79e8b5ae91af738037acf7
|
||||
Plaintext = 4fd0ecac65bfd321c88ebca0daea35d2b061205d696aab08bea68320db65451a6d6c3679fdf633f37cf8ebcf1fa94b91
|
||||
Ciphertext = 4081ec9257303ae208eea0411d7977eb82e3b8d4f2d03d299f98fbddd519812c2bbe7af6d5c13b8fa5b15f233911eaaf
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = b9ba9fa32cc491d8ac2beb5f99193d57
|
||||
IV = 95511452b71e53e93afad07ba1aa4d98
|
||||
Plaintext = b40382705aaeea41097c309da6cd06010f15e09c0130fa4b3af69cc8da109d1f0f0a2661f1a8b89bab7e7009dcbb8a883d46254a830c45cd87981e0ea4e490fa
|
||||
Ciphertext = d9add2885d52163ff04060b8ee46a6e02374af2f895e28ac6d2a964ca8e78bcc9e4e2d4a7a4a11cce7a605a5c0b79c7b8f546ce9159014cb4b462454de902646
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 5947bbd78b06bb5ea2fc67ed7b24216e
|
||||
IV = 8e4722ad2230b15f2eea302173bc1795
|
||||
Plaintext = 9e69423653c20c982794ed35d63c1a78e8ac14f37e1888ae4bf273bfe119891b2e4ed8ac46e7a9a463c7a710298d43b02f0c5606bcfc08adceeef2ec61867f8bede498e53163803f2f86fc58782fb841
|
||||
Ciphertext = 48af72fe5b7449786965500fe685b9ebbebd15b0afcc9ecc8ce424a931d55462c52dc2cfb41eb17f3cedce1ad1546c348a190846510a427216230575245462b61161c1ef7515e209bc809b66309521d1
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = abce650e78f969b3b210151c74117fd2
|
||||
IV = bc4659fbb7073c1f2185cd8ac5314bd1
|
||||
Plaintext = 322eae07df5ad2ddd64bba34e42d30c1b884f842e71efa123345a3fb0c39884c57dd4c2c6fb0c42e69ff5a269d59af3a6144853c182edb376ca65947d7ccefae6806ba25c4f527706ba85a353c0fd10e3cb244dd93a2d060d7b055058dde1dff
|
||||
Ciphertext = b343343a7f0fd1c0874c8c43cb4078c6da6b6691d1747a6c583f0b93e77d0b1b58e605f80d2f9e0f06d61f75cb03b81f543f5f309aa5cfe3c1d39359be074383d9159bb0b3e51e7b7742cd439b355926589fabfc7b45bbcbb81d84828dc81947
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 9f56e19b09dd3fee0e110f71e9967b7a
|
||||
IV = 1155cf4231bf7ac55d5e6eb27a974fad
|
||||
Plaintext = ad1e4d3162a5084f581117639a13fc35df5449625ffe0f01e57d9a8726875be8515926ffe7449e30cd69ed4ca0c1b8b4486051c2d0fa2f6474a69c0afce2aec349d778a22edf81678145765b714c1b7c197287da56f59141d6978618729e1d89be20ace3de7d9b3c9b2d195ab6bc0fd4
|
||||
Ciphertext = e5f75f794db9d60f1a8f64dcb241c4463b0bd8ecc57b4aea8f87db1478debdb02b9fb9a9f159b24a2b292681683394bd067fe07026043557391aa59f77421497205a44896bde4e74af04ac231f7918f66d65bf5211e3ff9d7628feee17331a9260b7412b561b1f8eaece42532bff6de7
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 31c485c996d6ceb2d17e0aa05b2490e4
|
||||
IV = 8c37f33405051b4c50abd16c6456643e
|
||||
Plaintext = ac68de6a2c2144c6b4fd975a8dec93447391e7c9a4fde63d36be7f23ad186f96cd92b5e8adb546880d100329e97fe8204fad860e6dd8b3c0eed4805387536b9ccc63d6c74938b83dce2c93cc0a04a6025b7563d9e5e7239ae27819fb3844848a51e4294f273401ad9e592f8a170334b042f0667233b29f92b9b13262eb73232a
|
||||
Ciphertext = 9775a5c6dab170473a48e938e4bb036533476535c545ba27e149a2efc4f37dd4d8d45f769e74b080122077bf6d049cc146040bd56da957d644cc37abd2a20d795ad0b4a31f44f94e8b2bdeef0b7507c05a4b12dc84986d8e6c2beb1e5f6b16a057df782da903fd4bcc913e3ffc5fc75145a329e57528be7c34a92542cb80eab8
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 556ccfa360ecb5025032dddb124cad4d
|
||||
IV = d54c6fdcc85dc0a28c0b06205fee8854
|
||||
Plaintext = 71fbf180effac3dca0d69d40e4017dbe50455396f9fb6507ef7df26507de156cded8edd41a05fb25f352cbcdf3b2d770f90fa87f84863e0c2ed3b2dd770a1abfc489ad1ca82a28d061bd7039a6b5788da021657136def0c78d0b0cc7cfbec9512cf579811fd01185f3fdd2ab857328be4b63d293956b43df130e484b9861eccb1d06992b095e7febb0fb394c1954aeab
|
||||
Ciphertext = d43fe04c874d091a7953ed15589f7b4b6b509c21746a366b0c32f135a9e84c6c2a1bb8d2f6a3a389f95b903db62030b1ab54ff45b1a837ada720977944707fe8ea159714f8e7cfd5299227249aec14920ab5a877a57e4b23a951bda95b8f98b908a55f73792f86944de919b0a18cc50e13c549b6d7da8806062afb125c388f02d914548f5747b1bd227520018d97066e
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 7cb81fc4b203b0fa9bec49759bd515c2
|
||||
IV = 4d5e2fa3bf73f488b3e7e125f03dfbbe
|
||||
Plaintext = 362789b376d85eb8181d4eeea52d42e873ce7741c11a2f820383a7457b15489b09fb21ac4445959dc9e851b7d40682c50d7044bda46a5da39fae2bab73b3db9ed22edc7ec5da936dfa7451cb5f0a829ff0762738cc2686148f1e1f00dc3fe38139c9a173201fc1f052ca34736fc1ab3dc4e707f864d6119b7adb6c8ddd41c80de5d357d17e9c85ed7af1e4f72cb2656932ccce469202680109eef89a9f42f10a
|
||||
Ciphertext = 87fbc595b52e0c299420338f422fabd264665e5457f1df907c5a2c95fc2ed4d04c29296467123223414b0e0223dcab3d93d5740f2e498acf20f50a59d267a734733c946597c2e1e54d5d76a6cb552b264f86b1b2e135cb601f73c5ec3237d2d341f09064e3e68cf08e9e770ced087c94e54b9aba36f01cd10596615cd02f1008b3701084cddfa659fc2b7293a605c1c273f54662894d6d6ca86256d915d4fb3f
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = beb622d0228cde29b342bbcf4c1c83b4
|
||||
IV = 75c282fa581d9c671edf5d540951b680
|
||||
Plaintext = 860476c81685b58e71e2599efe083ce5
|
||||
Ciphertext = b8d5730f28bb21d79345e2668f9b4a91
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = c4666081e0b0eddb10a9a607c807378f
|
||||
IV = 5f23623288e4a41b03186024755a10ea
|
||||
Plaintext = 2fd02dab9054248073ebc0b07aed383756ccfa4fa6298722775be6a9b4ed27a5
|
||||
Ciphertext = 6bacb9856757883e22e04085deb6dd3ed3694dc6a6ea4445dd2f2684e465e6d5
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = df010376a6b03279338773a70e012382
|
||||
IV = 67455decec549365742525d8dbf1fed9
|
||||
Plaintext = 9b9c3dea553ec235db0011b27191544171845b7bdda0dc04a089583959bba5ab7048f8ca87eab073a8b824fdd4e82e40
|
||||
Ciphertext = 8871858efc277d3033d1c95c53a3fda31ba8d17b9f641922ef69de0277c80e914f25a8f3366106b22efef2a5c5355504
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = ff01aa4f7106c6bd24399076f901a530
|
||||
IV = 089b4f6054eeeef76d4e13f75de64f7e
|
||||
Plaintext = ae9cb9dfa305af83e95a3b2099f70907edcd49fbc6efc5ebe744184c76b4f56bf35774f3fe215e1c8ee42172a2dd3e6f9ccd3d9bb044325e61a6bb97e48e9986
|
||||
Ciphertext = 676537bc02ad0fc270ba547f5640bcdb125bc95d9db54029b4ef32b83da838773c0750300b4384fec116732b76f654228f6c942f54839a5a2101c1fed1eb62b3
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = d33d4062ab32298eafcca86b5088d5fd
|
||||
IV = fcfffce8b020240f9f694adcb8ddf213
|
||||
Plaintext = 1fe1318adb99e6d4fced292902fe8c831ba488a43f85964d6ff54b322663b380bc99fed15568278cfe1d0af795c71355bf65e876855763655eec3abf3d4b27a0341d607f4bfbd82c8900fd436f7c4186
|
||||
Ciphertext = 1898807204f12402a0ca6f11c2ff2a929123c3c18e02149740d6bc91f6a626e79b827d3fb877e1821c861b3e7a361c0fae457340692425b0b8f21447e3fadf95e60819789f2964fda844bd3c508d06c9
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = 47e13544a7bbf74dd68ab5ce66e5bdaa
|
||||
IV = 69480b4dd38cf3b47e2b7652751395ae
|
||||
Plaintext = 3e2e583a3a0389ca324f2aaa52b7823904ab288dae562995cf1d70c796d785fd361261434eea480ceb3d369d969652c7ff194931c0a9bd978f5ae4094d6ef32d986a092c580ccbf865e5095a7b80559be13f842f9bea9e42a3a01ef8a24a6526
|
||||
Ciphertext = d5d73ef41aea9daa98d04b309299809408eeebc8de56b2258ba97155dc0bf54150b5338be0aac01ec9a93f49c3aa193d9c74ea5fd0dd4efb9030eca445dd52784cf5f18bd4e0f5facd56620df9d66ead9de1b6fc86f8c3d87f69866a490f5ed4
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = ae86823695b48e8c612ae5a01b597f97
|
||||
IV = b26eef7b1d14894c0c6388ce5273f4f2
|
||||
Plaintext = 569a910bc6aa97b8939ca703fc10ce0d171625bc735a1fea7148650541109d955b1b686c6cc404b2d3d92ad9faaff217dc7b31b038b770959aeccd1ca55d650364fde51df8d4f0aeb05fa364f5028f709c179ca6df0bdfc1cb850f238d755ac44a733fce558402be0c70bc0871b8e62f
|
||||
Ciphertext = 0be12d90fd8536ef7fa415f0322dc833891e97d4e6c5427e743bae14fb2776177ad9bb8198d344e74b2c9fe720b67c35965acac1436c5f8e328fe86b4b65d389d8e060295a1c48c6de9a06835e677adea60d3ccc589754593bae6ac9f847b8f0c39253db2e863d5ce1df024f504cecf0
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = b85df29c9244229835d73441dc37555e
|
||||
IV = c1375430efedb2d311a37bfa5ad2110e
|
||||
Plaintext = c232a0bbf967ef28b74e7b809c62bc8c1cf2d52a273a84162900da834448fd567870471498f29770619dec504922e379eaba0d3a712602583d00279d8fc6a6d568cb94a330039a189ed5802abb7a2898c13ef89c00d73fca9a2f2ffc2107ab498212c56835c0fc26f835a69c00bb3eaa695ac20e8bdb0f5b5b6684d02bee8fb2
|
||||
Ciphertext = 7b8b2a3a38328276e2739ecac4c876633e5cc8835a46053fdbbe0bc828450bc6b2e9cb31515edbbccf74a1128213d64577eec37eff3377528dafdd14bcfe2d8cc988f7705622893d3691126ed1de20a1ae7397e3dfe78464c2d310a452608799b024e7725394b309b9def5b2840e8ffa9fb2b9da92fe2df24769c5250167f4f2
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = e96771f5f20a89ee871261d2d18e1e46
|
||||
IV = 8c664a37d245d26c0c55adfb424758ba
|
||||
Plaintext = 8aaafd56c5d5d54fbe16f115c3216bd1f4376666931a2ef1ffc5468ad12150c39250dca2d63c6ea166bb0ef4aaa3d5849c1f9c621c55826a1ca362f03bcba4dcbd654b300d16519710130e5360bd949aaded6a648f96dd8937a77287d4a4ac2941729475b635b9797476b4dca4171787ff15882d3b4872ed0999a7546dbb61698e8348f70e4a14981a78156150484532
|
||||
Ciphertext = 18d65e3fd66b6aef76354325c323f0cd45f6c280335b890ba6822437125b86baf0f8576039e074aeb557f73dcacedd94fe134219fda1b5fac5e4d02f5b582496e97350926902a43dec11b09d12d294b7cc815eb98c4b5f693dd341a7d47a71f6c1a9af3981c97bb13ef4abc8a54aaa0fd601e2cd981d3f49bd8e958b3fe5769a76264784116038c8086af3d49d9429bf
|
||||
|
||||
Cipher = SEED-CFB
|
||||
Key = aef49da33f538ee66e178d4b6121055d
|
||||
IV = 842566e68b61ff7bf001f2642da62f64
|
||||
Plaintext = 415991f65e1a95040cef9960556f61e617827c30c74bf353cdd86173dbe4cc983a2ee6bc8ca6cfb71121e7b0d0178f2e13445c710dcc176b781201971171f7489f18faf110f39accd1cf08c85a958d7698b116f1c0d75812ac9b0b39aee7f7159ccad8fdae9b99f2d695eacf12c6469d5b51a34de26eac73613dcb2f77122cb1f8dd5162786a12052dc7b6dea6acc4989dcc7eafd9374f6c29697c74749ef16d
|
||||
Ciphertext = da97a99e4734c2dfe541642e30b9cea9263f5ee2055d468fc519585c4072f3163eda6cfa5014ed6b2293bf6d296cc7406530657b960072fa8aeafb6a7192c782e73dc4bcb02e621ca6a375d318ec98e7998339060650940d7d9d5e89f95a15e1d673b4c7132be9875bb339a30a61b57050b2c91e57a4b11f7f00c0df906edc508a5a54d218e62de114e89b6e1c137c3a40b55130343a3527dd85d8f9c87a1fc6
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = d7d57bd847154af9722a8df096e61a42
|
||||
IV = fdde201c91e401d9723868c2a612b77a
|
||||
Plaintext = 81883f22165282ba6a442a8dd2a768d4
|
||||
Ciphertext = 78aa827fca58956065e1dc0ce17bfb80
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = c9f4ce21b4c7daaa4f93e292dc605bc5
|
||||
IV = 5e5a8cf2808c720e01c1ed92d470a45d
|
||||
Plaintext = 8e19c5cacd015a662e7f40cdecadbf79a68081c06d9544b41c2dd248e77633b4
|
||||
Ciphertext = 814d987a07282f950fa9a6559e5443f0826243a630458327e5c20440d2a50a0d
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 7a70cc6b261eeccb05c57117d5763197
|
||||
IV = bb7b9667fbd76d5ee204828769a341b1
|
||||
Plaintext = 823cbaae3760c85512a3c83fd60bb54b7cfc739b295b63e05ef435d86e19fd15368c89ff08a0f21ce89a728ffb5d75df
|
||||
Ciphertext = edeae6665592ab617f52e495e9177108399a2d073e0e7d9e4ede0545bdf9294f32a1ac2f4c915b1432024b5ca05cf91d
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 85dbd5a6e73681a51a4a7d4e93ca7d0c
|
||||
IV = 89d897c5aa9e0a5d5586d4b4664fc927
|
||||
Plaintext = e3dbfc6ae1a879870fd22644c8135fe063355dfc0a8dad45c9c6e052e6e085cf717754dc1b49acb04cf340826ffb0da991138f022a9c34923a6a116c98c7d3d5
|
||||
Ciphertext = eb97edb484801398304d27fa5512417cf63fa76c3860c738cf4866dd9a024bdd2e4029fe1bc83587b452686edf971dae2390ef0af2a00deef79216b1104e43f6
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 18b9887a34438fb2e759027e54e334b6
|
||||
IV = a5be8621e58dae325c6b868fd783e2cd
|
||||
Plaintext = 8cd659df925950b516f737fc92d2fafa008c008c9dfe0e75ed2d68f6ff79399ff2183464b8c37cf31aafc145fcbfac73e3f87eccb435f424bf1c6d6efb504e8e93e8a668a2210e3d3b4fd437ad1a5842
|
||||
Ciphertext = ecee4794867f81ee0ab465481f160521a918121e02308744e65cbacc4c369ef0b98ff6feaca41a8979045c4bd49487b4f3437376c4b6f43536973ba54bdd2b7170c7136f92e87cba79b892616b80fe10
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = da52c0e4609e82ee926174a9eaf90b08
|
||||
IV = f2d0c5e86b4ddb40d30713aaa5a153fe
|
||||
Plaintext = 91d6c95a614cf85de16eeabe5976c2a2a9d307042f79a7aaeb7c3c57e1dd8d43bfa458c8c02e4f5ed0c960c9f17e3991dd2e0cb3ede18f96395a484001ef07ca4c97b411ce454aaf0f74242aca03786a93442171bd50a1467b9d663245d24c2f
|
||||
Ciphertext = 6207d66ce45fa32922bc75c14bd1a2d44a8daf4e655f9b9934f7f41de98337d3f6aa6175f43d056b6be3decb791a324c80a84983b026dcdabdcd1cf93059a238e14ff5c952b740802cd11171f5275c12adb6564532de13194c66532c0cc17663
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 56d6f7e2a870b92d55ff8d6e9c554d2a
|
||||
IV = b512f0e11e27fd1a94aa0c697bb6da5e
|
||||
Plaintext = e62cdeac43667749701314c546f778a4c758e4f55760e7d729c3783cf7a242edf6ae3fcf0990886434896c945455bfae0e5674aa06ee6fb1512d94df2cac2447eeb849373bb3efbe7bb8d66c8a7ee559b17fc268d6599fcdef7457cdbde5b9c5b692236e4397545f2be97bd44f3993ad
|
||||
Ciphertext = 22632b7abf711ad0e66f1834e5984609df0fdf0903a7180c713e1c084812913c31d1fb3469c777a94e5115fc1c4a081283fa2d28a9aec1b6f46738d8bf04ab6b82505b2063153a12dace49000aa9ac41ff3cdf9510a20183f934d364f52cd72cc6b5deb192ca5bacbff471565ae2d563
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 09f216ff78dfe419dfcef1a855473414
|
||||
IV = 722174c892d265291982c6f042ced145
|
||||
Plaintext = 11f435e7e3656fcfa8e0df230311ca21054e84e13c8590e7ec7309f59c174022d467a7302641ee1b6ba46bee4f20bfda108bb78982f670b057dfbfe49da9cfae88490ce17241402b20d2fceb476d3a424e6c406d56ffc85278695d584d6c087cb4012ca2cf4daf284fd15ac1f2e183814957e934bf88dff4d777adfbb54933b5
|
||||
Ciphertext = d9a5d3bc0a558b86046877a9030a09c537c2830b93dd9f56df91233f3b403fa39dc820d5eadf46ca016ad130018310a4e31e0974bb233085236340e057cac0d6968f0fcceea780b9da7bfb297e8593abd242e382e7482e9c4679b7cb720798c17522c5cf4db9004368f609b5280b5421f30a39a6659d51ef8feafed739959441
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = cde9b69eea2b6a5588457e35e0a08803
|
||||
IV = 52323b54d69a62fec0689baee1b3ec63
|
||||
Plaintext = 967798995af6f435b3a6f92bff77a11fa44d1426ae0f6e7dbafac27b123c5fc419be52c0ea412c4b3cac05ae89a4c0ce6f5e91a456b1bded5370a1234cf6f6ab5d0253507bc6f3f0573ab97585b67107dec059812323e021e341ad839ea9e3d02aeca43356add48ccef81f693ed53d32ba1c74a35e8a5f7f3115ef834f7daf9948244c4fc31f5487678d3e70fb27abb5
|
||||
Ciphertext = 1dc92191514c65141edb04acc655cf3c664ff5727d569b636787332ef1e34b1afd4b8e9acf4b745530fa7b3094f45a32d82b0e2be7cc035a1dded75f4033bcc4727dd14303761a9061b8365a8893e2569d045f08d2b447c35d2f927ac6103730e3aa4e81aef54c426320d657e2aa169bf8884ef0541074e9c08793364646a9a99df0e5022ea3740361096c3790707b3d
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 939aac71e337709855715a57e3a4648f
|
||||
IV = 493509b56a92f14040eb9b66a188bc57
|
||||
Plaintext = 9c22efddc7de496a916d15d710de374d57478126ed64c9ad7e823e24d19bfc0cfac3dda0d1c292a3a203f35b26ad94deb20f998caf41cbdd4a08eb5d6cfb46f4ede4896b0569d72c03ec194941af95c0573cc3fe8f045ba19946b382803248f3dd4f9a454b1a3e8e1af02ea8482d637dac96a68275f4a382d3023f9df4892b9032cab9378b1cef5051d6db81226f259d1be4eb23495ac807600536b5b0481754
|
||||
Ciphertext = 5bf691be73fa80ebdfcf9ab0657729c9017505cb7163afb35c120915e111d2a2978e373164579c9ffc66bfe189ffe1fbe641d45c8d91a2bab418d8b549eb027721d241a9d80e298c79c75d7db8dec3a8d56cf27d33431c07ac4128b1068684e1d99b1ff23f83e8badb704600de7ae95cbef8029f101bfa852ef5f69cc7a7427d0fa3abd7de68db07de0ba4c17fd579ffcf1be3ad9e5f724c8e9c87c079f2afec
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 8368189d41eaa20d06a3a2d2a91e43f7
|
||||
IV = cf04ac0e4733952ba538711f79eef8ca
|
||||
Plaintext = 696ca57339840fb3c150e0c111d9e13e
|
||||
Ciphertext = 03f102dbfb29bcde9e7d16825de64228
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 5124c6fdb0856ded76afb6febdaa981e
|
||||
IV = 937ebdeec379685a71d466703f788ff7
|
||||
Plaintext = 5a5928dd09e78a21256eadb062630a3f0b47ca2376ccae314948143fff2512d4
|
||||
Ciphertext = 841cca2b58abd8d0b68fa2d3949bc943a105427f2deb117572de28cd0581c54a
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 6a8f6487e76058bc5a126276e48fdd77
|
||||
IV = 6e75d8b8ac0976143ea103a710caec02
|
||||
Plaintext = 424ddc343067612fdb426920f40ab4d82e3d4f9485b07fef91617556d3093874840e8110ff375b7a68f98c471ca10acc
|
||||
Ciphertext = c9123902ac5cfd3f0151b4e95185815ddf4ea92baadd91215007c98ab3dcbae14ca5cfcb5aafeea9939b998e3f4ec276
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 01963d44aea026b2205238454d5bb73f
|
||||
IV = 9442a6e0f3a53f10b0ccf5b0ccc1793a
|
||||
Plaintext = c54cfacd953736a2d8db0b8b63b555253a0ca6f6e05f2e918d18be95669fa85609f827d6da014add2964626670c202b195248fc986372c92adbb10c0e7c36e04
|
||||
Ciphertext = d6592ec2f649ea123bce88818ebbbb74d3b6b55a987ab01db21b5ef91cf8a9fff6851a6ce523d2607da048d9e0897ff672d787433cd54b6c9c25a7a5aeea1538
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 4ea87b0b346054c097edc5601b782870
|
||||
IV = 9a3e23333b2b2de7eceea67a7ca97641
|
||||
Plaintext = 0c7734310c5ca82b520bf1e0a1614c7ddd0c002711ef0b239de8fa256e15b32056b992747ff3a3a310d52e9df36275d9192dad61caa16715744552c865c5ae9477a70a2c3a02a01ba176b927445094d2
|
||||
Ciphertext = a91c4fb4f9e05adab087db1fd125b1f42dd26953bb3b3d722adb443c0a4b927ef83c62ae3ef8e1f83ef8e6b50a3b8caf7a623fa9d23685cda5851139a69c449d8b94877c3547c37e8c246738c6183b50
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 1956f40b2334a6546b3071f2d17f4a59
|
||||
IV = 765cfb560c46777a20cce091232ccaf2
|
||||
Plaintext = 045ad66c515d407ab73ea0c6f6ae869872342fc72956a659945454005e37c76ed07df996ffe1322840cf23843b34346a1e730ab721ddceaf362ed256054c105ed581a80c04ef22ae1b5eb8742c6e3c9c0e0e29fad211b4f40adc1520f7c6821e
|
||||
Ciphertext = e77614bed3d8fc7a22355efc2d1401cd1386fcd6585b472a500278c56108123af13bbfffdd87bc963634f28ab8355061f23c6d943fd226360685b5fda3eee847d64154af7f48732f37c3a4f740ed73dd276dafc9a2e3a22f381a61501dd89b73
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 4e47e1b5c1b489295d3a2bf049f4be2d
|
||||
IV = 83fdf064d213df417ba0e75ec517bf63
|
||||
Plaintext = 94a7bed3b5a158e85f9e4778a7de105ff4f3b2a61c2fead82cbe949d7a4ee961a6c62949ba2c69d513d836a455b612c2fbb6ca243a0a18a853cadb6b73b600192de1d51ddf80030718b079fbb581073a06b66ba4ad524d3d09efaa59e6919bca15b2b92bd9f8c17d6e463f4ea5fd5f5e
|
||||
Ciphertext = 6a64fccc9e7f00bc696e09761c1a059557e02d16b6d407931b1abde227b6c42e512eeabcf5d01d7a662da46c1c87ffb7575607e1b88a755c7d469c55f7cc98d4ccf9f3fc3a29e22b7e16052cfe90c61132311853547885d7a78cbcdc1a26c05953d3f45735901d44dad6710d67712c20
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 613485e5bb84b91cdd0ca02f8d83e0bb
|
||||
IV = ad8a7564f6ce8abb6949ddb7d7186580
|
||||
Plaintext = ed5068003163c424ae9a8e51e3d77684c69073a824dc4721568f7528657c3dd28d66219f398ed57105aa35cfef3ac078eab30ae0f3ed752b0e320b099ea42b156f818904c4b6c534cabde53dfa62e7b74518a8bca3f36ee85b130e8520d38c006e6adef34bbc8df56b757b500d703e5777aa545c4170404754f03dbf22c9f0d7
|
||||
Ciphertext = 63e2f4b237b0635709ed42bf7ce29a0a828fd52f157dbed5a7b78d5afb8cc780f009c7982a31eb4db2a2d30d80622fa84c430fd69c68652a2876f984a3a795d952a8ed540d6ef936ba85ce7932523e47ec6e9865ffc4f8805232039b79c5fbfbfa8c18d7b4aa655c247357b5b3b2e960e0eac46a13f52c5646c396887500b6ad
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = 8198b36e880cf50dbf6724feaaac8688
|
||||
IV = fbaa2882a2a4acdb299e4f82c93f2af7
|
||||
Plaintext = b2516a356e437513f0df83938afefbe9f9ef1ec879797997f31da96a1ea7a15d395ecdb94b7fda14cdc0b75c171784fa8832d574b64f9450c6be25dc83b93d3bbf0145a661bf4db775282b98649b64613aeedb8bb770f67cc3421ac6761e5d763c21ac2d1e729e4597ad7fca9fdc70878b26634df78cd0f36fb3b138a1357915abba4ff5f8dfaef268307022f2e23528
|
||||
Ciphertext = 40396cb65cc8eda8c591e671cbf92889588fe593fbe6e8e884a9d58f90df8505025cd0e268c368fc4aed1e8a5be2359a72d087775f85f6944b0cf731e8051cf80f0b9aac8073f82c01e0306077bfbf547d9074b8cf2a844d778371b0db8c7d8358596404a4047bafc3e4c9bd424860dbe3b1a54bb68f0461e8612940695b795a1e5aad72befb79ea8c5336d01758d077
|
||||
|
||||
Cipher = SEED-OFB
|
||||
Key = e30b4c874c4c4f6e0cf1f8ef58e5d375
|
||||
IV = 7e26f07f8024343cec35409e71e0cd8c
|
||||
Plaintext = 8ceca4dc346cfd6b15774e082db1a89497b7d85d6b5b7102e77417f7a243fafe17118b7a3bb49d1657cf61b866da395a5b3f349183a53dfa11fc0ac053bddff49dd472ee55f5e43a2f8bc785e2bc420300694919ff7bb43feb75a9cac44ece96f679e618db5d7433af12dcc7e0963ff10b45d835f9a8f42627e7f3fd5038932685965ad0e183f5955e671fc2b878dd51051eedaf85310d1e4e8f75f2decf36c7
|
||||
Ciphertext = 6328ab2e9039edcd034499d13561b8866ff4f528a375365e84e1a2de9d2e58cd6b6e9cad7215d105e0653a480dbc3e69d8ba496d4333515e879b20df1bc9f77382b81db4d846fbb9e93b60b80558322c6b7e1936076295c842e262f84dff7b47e406a62c44900e6d1383199deee77215ed4c27397d4f01acdbd4d54328e538770e87d9e4900602a129f405cc1f8800ea723cdb109afffc9d04da2b1403a8d3e7
|
||||
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
|
||||
Title = SM4 test vectors from IETF draft-ribose-cfrg-sm4
|
||||
|
||||
Cipher = SM4-ECB
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEFFEDCBA9876543210
|
||||
Ciphertext = 681EDF34D206965E86B3E94F536E4246
|
||||
|
||||
Cipher = SM4-CBC
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
IV = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
|
||||
Ciphertext = 2677F46B09C122CC975533105BD4A22AF6125F7275CE552C3A2BBCF533DE8A3B
|
||||
|
||||
Cipher = SM4-OFB
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
IV = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
|
||||
Ciphertext = 693D9A535BAD5BB1786F53D7253A7056F2075D28B5235F58D50027E4177D2BCE
|
||||
|
||||
Cipher = SM4-CFB
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
IV = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
|
||||
Ciphertext = 693D9A535BAD5BB1786F53D7253A70569ED258A85A0467CC92AAB393DD978995
|
||||
|
||||
Cipher = SM4-CTR
|
||||
Key = 0123456789ABCDEFFEDCBA9876543210
|
||||
IV = 0123456789ABCDEFFEDCBA9876543210
|
||||
Plaintext = AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAA
|
||||
Ciphertext = C2B4759E78AC3CF43D0852F4E8D5F9FD7256E8A5FCB65A350EE00630912E44492A0B17E1B85B060D0FBA612D8A95831638B361FD5FFACD942F081485A83CA35D
|
||||
@@ -20,74 +20,92 @@
|
||||
Title = BLAKE tests
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input =
|
||||
Output = 69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input = 61
|
||||
Output = 4a0d129873403037c2cd9b9048203687f6233fb6738956e0349bd4320fec3e90
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input = 616263
|
||||
Output = 508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input = 6d65737361676520646967657374
|
||||
Output = fa10ab775acf89b7d3c8a6e823d586f6b67bdbac4ce207fe145b7d3ac25cd28c
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input = 6162636465666768696a6b6c6d6e6f707172737475767778797a
|
||||
Output = bdf88eb1f86a0cdf0e840ba88fa118508369df186c7355b4b16cf79fa2710a12
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input = 4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a30313233343536373839
|
||||
Output = c75439ea17e1de6fa4510c335dc3d3f343e6f9e1ce2773e25b4174f1df8b119b
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input = 3132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930
|
||||
Output = fdaedb290a0d5af9870864fec2e090200989dc9cd53a3c092129e8535e8b4f66
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F
|
||||
Output = 1FA877DE67259D19863A2A34BCC6962A2B25FCBF5CBECD7EDE8F1FA36688A796
|
||||
|
||||
Digest = BLAKE2s256
|
||||
Availablein = default
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F8081
|
||||
Output = C80ABEEBB669AD5DEEB5F5EC8EA6B7A05DDF7D31EC4C0A2EE20B0B98CAEC6746
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input =
|
||||
Output = 786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input = 61
|
||||
Output = 333fcb4ee1aa7c115355ec66ceac917c8bfd815bf7587d325aec1864edd24e34d5abe2c6b1b5ee3face62fed78dbef802f2a85cb91d455a8f5249d330853cb3c
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input = 616263
|
||||
Output = ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d17d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input = 6d65737361676520646967657374
|
||||
Output = 3c26ce487b1c0f062363afa3c675ebdbf5f4ef9bdc022cfbef91e3111cdc283840d8331fc30a8a0906cff4bcdbcd230c61aaec60fdfad457ed96b709a382359a
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input = 6162636465666768696a6b6c6d6e6f707172737475767778797a
|
||||
Output = c68ede143e416eb7b4aaae0d8e48e55dd529eafed10b1df1a61416953a2b0a5666c761e7d412e6709e31ffe221b7a7a73908cb95a4d120b8b090a87d1fbedb4c
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input = 4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a30313233343536373839
|
||||
Output = 99964802e5c25e703722905d3fb80046b6bca698ca9e2cc7e49b4fe1fa087c2edf0312dfbb275cf250a1e542fd5dc2edd313f9c491127c2e8c0c9b24168e2d50
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input = 3132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930
|
||||
Output = 686f41ec5afff6e87e1f076f542aa466466ff5fbde162c48481ba48a748d842799f5b30f5b67fc684771b33b994206d05cc310f31914edd7b97e41860d77d282
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F
|
||||
Output = 2319E3789C47E2DAA5FE807F61BEC2A1A6537FA03F19FF32E87EECBFD64B7E0E8CCFF439AC333B040F19B0C4DDD11A61E24AC1FE0F10A039806C5DCC0DA3D115
|
||||
|
||||
Digest = BLAKE2b512
|
||||
Availablein = default
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F8081
|
||||
Output = DF0A9D0C212843A6A934E3902B2DD30D17FBA5F969D2030B12A546D8A6A45E80CF5635F071F0452E9C919275DA99BED51EB1173C1AF0518726B75B0EC3BAE2B5
|
||||
|
||||
@@ -230,173 +248,183 @@ Output = 3928e184fb8690f840da3988121d31be65cb9d3ef83ee6146feac861e19b563a
|
||||
Title = MD5 tests
|
||||
|
||||
Digest = MD5
|
||||
Availablein = default
|
||||
Input =
|
||||
Output = d41d8cd98f00b204e9800998ecf8427e
|
||||
|
||||
Digest = MD5
|
||||
Availablein = default
|
||||
Input = 61
|
||||
Output = 0cc175b9c0f1b6a831c399e269772661
|
||||
|
||||
Digest = MD5
|
||||
Availablein = default
|
||||
Input = 616263
|
||||
Output = 900150983cd24fb0d6963f7d28e17f72
|
||||
|
||||
Digest = MD5
|
||||
Availablein = default
|
||||
Input = 6d65737361676520646967657374
|
||||
Output = f96b697d7cb7938d525a2f31aaf161d0
|
||||
|
||||
Digest = MD5
|
||||
Availablein = default
|
||||
Input = 6162636465666768696a6b6c6d6e6f707172737475767778797a
|
||||
Output = c3fcd3d76192e4007dfb496cca67e13b
|
||||
|
||||
Digest = MD5
|
||||
Availablein = default
|
||||
Input = 4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a30313233343536373839
|
||||
Output = d174ab98d277d9f5a5611c2c9f419d9f
|
||||
|
||||
Digest = MD5
|
||||
Availablein = default
|
||||
Input = 3132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930
|
||||
Output = 57edf4a22be3c955ac49da2e2107b67a
|
||||
|
||||
Title = MD5-SHA1
|
||||
|
||||
Digest = MD5-SHA1
|
||||
Availablein = default
|
||||
Input =
|
||||
Output = d41d8cd98f00b204e9800998ecf8427eda39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
|
||||
Digest = MD5-SHA1
|
||||
Availablein = default
|
||||
Input = "abc"
|
||||
Output = 900150983cd24fb0d6963f7d28e17f72a9993e364706816aba3e25717850c26c9cd0d89d
|
||||
|
||||
Digest = MD5-SHA1
|
||||
Availablein = default
|
||||
Input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
||||
Output = 8215ef0796a20bcaaae116d3876c664a84983e441c3bd26ebaae4aa1f95129e5e54670f1
|
||||
|
||||
Title = MD4 tests
|
||||
|
||||
Digest = MD4
|
||||
Availablein = legacy
|
||||
Input = ""
|
||||
Output = 31d6cfe0d16ae931b73c59d7e0c089c0
|
||||
Legacy = 1
|
||||
|
||||
Digest = MD4
|
||||
Availablein = legacy
|
||||
Input = "a"
|
||||
Output = bde52cb31de33e46245e05fbdbd6fb24
|
||||
Legacy = 1
|
||||
|
||||
Digest = MD4
|
||||
Availablein = legacy
|
||||
Input = "abc"
|
||||
Output = a448017aaf21d8525fc10ae87aa6729d
|
||||
Legacy = 1
|
||||
|
||||
Digest = MD4
|
||||
Availablein = legacy
|
||||
Input = "message digest"
|
||||
Output = d9130a8164549fe818874806e1c7014b
|
||||
Legacy = 1
|
||||
|
||||
Digest = MD4
|
||||
Availablein = legacy
|
||||
Input = "abcdefghijklmnopqrstuvwxyz"
|
||||
Output = d79e1c308aa5bbcdeea8ed63df412da9
|
||||
Legacy = 1
|
||||
|
||||
Digest = MD4
|
||||
Availablein = legacy
|
||||
Input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
Output = 043f8582f241db351ce627e153e7f0e4
|
||||
Legacy = 1
|
||||
|
||||
Digest = MD4
|
||||
Availablein = legacy
|
||||
Input = "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
Output = e33b4ddc9c38f2199c3e7b164fcc0536
|
||||
Legacy = 1
|
||||
|
||||
Title = RIPEMD160 tests
|
||||
|
||||
Digest = RIPEMD160
|
||||
Availablein = legacy
|
||||
Input = ""
|
||||
Output = 9c1185a5c5e9fc54612808977ee8f548b2258d31
|
||||
Legacy = 1
|
||||
|
||||
Digest = RIPEMD160
|
||||
Availablein = legacy
|
||||
Input = "a"
|
||||
Output = 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe
|
||||
Legacy = 1
|
||||
|
||||
Digest = RIPEMD160
|
||||
Availablein = legacy
|
||||
Input = "abc"
|
||||
Output = 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc
|
||||
Legacy = 1
|
||||
|
||||
Digest = RIPEMD160
|
||||
Availablein = legacy
|
||||
Input = "message digest"
|
||||
Output = 5d0689ef49d2fae572b881b123a85ffa21595f36
|
||||
Legacy = 1
|
||||
|
||||
Digest = RIPEMD160
|
||||
Availablein = legacy
|
||||
Input = "abcdefghijklmnopqrstuvwxyz"
|
||||
Output = f71c27109c692c1b56bbdceb5b9d2865b3708dbc
|
||||
Legacy = 1
|
||||
|
||||
Digest = RIPEMD160
|
||||
Availablein = legacy
|
||||
Input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
||||
Output = 12a053384a9c0c88e405a06c27dcf49ada62eb2b
|
||||
Legacy = 1
|
||||
|
||||
Digest = RIPEMD160
|
||||
Availablein = legacy
|
||||
Input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
Output = b0e20b6e3116640286ed3a87a5713079b21f5189
|
||||
Legacy = 1
|
||||
|
||||
Digest = RIPEMD160
|
||||
Availablein = legacy
|
||||
Input = "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
Output = 9b752e45573d4b39f4dbd3323cab82bf63326bfb
|
||||
Legacy = 1
|
||||
|
||||
Title = Whirlpool (from ISO/IEC 10118-3 test vector set)
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = ""
|
||||
Output = 19FA61D75522A4669B44E39C1D2E1726C530232130D407F89AFEE0964997F7A73E83BE698B288FEBCF88E3E03C4F0757EA8964E59B63D93708B138CC42A66EB3
|
||||
Legacy = 1
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = "a"
|
||||
Output = 8ACA2602792AEC6F11A67206531FB7D7F0DFF59413145E6973C45001D0087B42D11BC645413AEFF63A42391A39145A591A92200D560195E53B478584FDAE231A
|
||||
Legacy = 1
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = "abc"
|
||||
Output = 4E2448A4C6F486BB16B6562C73B4020BF3043E3A731BCE721AE1B303D97E6D4C7181EEBDB6C57E277D0E34957114CBD6C797FC9D95D8B582D225292076D4EEF5
|
||||
Legacy = 1
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = "message digest"
|
||||
Output = 378C84A4126E2DC6E56DCC7458377AAC838D00032230F53CE1F5700C0FFB4D3B8421557659EF55C106B4B52AC5A4AAA692ED920052838F3362E86DBD37A8903E
|
||||
Legacy = 1
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = "abcdefghijklmnopqrstuvwxyz"
|
||||
Output = F1D754662636FFE92C82EBB9212A484A8D38631EAD4238F5442EE13B8054E41B08BF2A9251C30B6A0B8AAE86177AB4A6F68F673E7207865D5D9819A3DBA4EB3B
|
||||
Legacy = 1
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
Output = DC37E008CF9EE69BF11F00ED9ABA26901DD7C28CDEC066CC6AF42E40F82F3A1E08EBA26629129D8FB7CB57211B9281A65517CC879D7B962142C65F5A7AF01467
|
||||
Legacy = 1
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
Output = 466EF18BABB0154D25B9D38A6414F5C08784372BCCB204D6549C4AFADB6014294D5BD8DF2A6C44E538CD047B2681A51A2C60481E88C5A20B2C2A80CF3A9A083B
|
||||
Legacy = 1
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = "abcdbcdecdefdefgefghfghighijhijk"
|
||||
Output = 2A987EA40F917061F5D6F0A0E4644F488A7A5A52DEEE656207C562F988E95C6916BDC8031BC5BE1B7B947639FE050B56939BAAA0ADFF9AE6745B7B181C3BE3FD
|
||||
Legacy = 1
|
||||
|
||||
Digest = whirlpool
|
||||
Availablein = legacy
|
||||
Input = "aaaaaaaaaa"
|
||||
Count = 100000
|
||||
Output = 0C99005BEB57EFF50A7CF005560DDF5D29057FD86B20BFD62DECA0F1CCEA4AF51FC15490EDDC47AF32BB2B66C34FF9AD8C6008AD677F77126953B226E4ED8B01
|
||||
Legacy = 1
|
||||
|
||||
Title = SHA3
|
||||
|
||||
@@ -477,36 +505,44 @@ Input = 991c4e7402c7da689dd5525af76fcc58fe9cc1451308c0c4600363586ccc83c9ec10a8c9
|
||||
Output = cd0f2a48e9aa8cc700d3f64efb013f3600ebdbb524930c682d21025eab990eb6d7c52e611f884031fafd9360e5225ab7e4ec24cbe97f3af6dbe4a86a4f068ba7
|
||||
|
||||
Digest = SHAKE128
|
||||
Availablein = default
|
||||
Input = ""
|
||||
Output = 7F9C2BA4E88F827D616045507605853ED73B8093F6EFBC88EB1A6EACFA66EF263CB1EEA988004B93103CFB0AEEFD2A686E01FA4A58E8A3639CA8A1E3F9AE57E235B8CC873C23DC62B8D260169AFA2F75AB916A58D974918835D25E6A435085B2BADFD6DFAAC359A5EFBB7BCC4B59D538DF9A04302E10C8BC1CBF1A0B3A5120EA17CDA7CFAD765F5623474D368CCCA8AF0007CD9F5E4C849F167A580B14AABDEFAEE7EEF47CB0FCA9767BE1FDA69419DFB927E9DF07348B196691ABAEB580B32DEF58538B8D23F87732EA63B02B4FA0F4873360E2841928CD60DD4CEE8CC0D4C922A96188D032675C8AC850933C7AFF1533B94C834ADBB69C6115BAD4692D8619F90B0CDF8A7B9C264029AC185B70B83F2801F2F4B3F70C593EA3AEEB613A7F1B1DE33FD75081F592305F2E4526EDC09631B10958F464D889F31BA010250FDA7F1368EC2967FC84EF2AE9AFF268E0B1700AFFC6820B523A3D917135F2DFF2EE06BFE72B3124721D4A26C04E53A75E30E73A7A9C4A95D91C55D495E9F51DD0B5E9D83C6D5E8CE803AA62B8D654DB53D09B8DCFF273CDFEB573FAD8BCD45578BEC2E770D01EFDE86E721A3F7C6CCE275DABE6E2143F1AF18DA7EFDDC4C7B70B5E345DB93CC936BEA323491CCB38A388F546A9FF00DD4E1300B9B2153D2041D205B443E41B45A653F2A5C4492C1ADD544512DDA2529833462B71A41A45BE97290B6F
|
||||
|
||||
Digest = SHAKE128
|
||||
Availablein = default
|
||||
Input = A3
|
||||
Count = 200
|
||||
Output = 131AB8D2B594946B9C81333F9BB6E0CE75C3B93104FA3469D3917457385DA037CF232EF7164A6D1EB448C8908186AD852D3F85A5CF28DA1AB6FE3438171978467F1C05D58C7EF38C284C41F6C2221A76F12AB1C04082660250802294FB87180213FDEF5B0ECB7DF50CA1F8555BE14D32E10F6EDCDE892C09424B29F597AFC270C904556BFCB47A7D40778D390923642B3CBD0579E60908D5A000C1D08B98EF933F806445BF87F8B009BA9E94F7266122ED7AC24E5E266C42A82FA1BBEFB7B8DB0066E16A85E0493F07DF4809AEC084A593748AC3DDE5A6D7AAE1E8B6E5352B2D71EFBB47D4CAEED5E6D633805D2D323E6FD81B4684B93A2677D45E7421C2C6AEA259B855A698FD7D13477A1FE53E5A4A6197DBEC5CE95F505B520BCD9570C4A8265A7E01F89C0C002C59BFEC6CD4A5C109258953EE5EE70CD577EE217AF21FA70178F0946C9BF6CA8751793479F6B537737E40B6ED28511D8A2D7E73EB75F8DAAC912FF906E0AB955B083BAC45A8E5E9B744C8506F37E9B4E749A184B30F43EB188D855F1B70D71FF3E50C537AC1B0F8974F0FE1A6AD295BA42F6AEC74D123A7ABEDDE6E2C0711CAB36BE5ACB1A5A11A4B1DB08BA6982EFCCD716929A7741CFC63AA4435E0B69A9063E880795C3DC5EF3272E11C497A91ACF699FEFEE206227A44C9FB359FD56AC0A9A75A743CFF6862F17D7259AB075216C0699511643B6439
|
||||
|
||||
Digest = SHAKE128
|
||||
Availablein = default
|
||||
Input = a6fe00064257aa318b621c5eb311d32bb8004c2fa1a969d205d71762cc5d2e633907992629d1b69d9557ff6d5e8deb454ab00f6e497c89a4fea09e257a6fa2074bd818ceb5981b3e3faefd6e720f2d1edd9c5e4a5c51e5009abf636ed5bca53fe159c8287014a1bd904f5c8a7501625f79ac81eb618f478ce21cae6664acffb30572f059e1ad0fc2912264e8f1ca52af26c8bf78e09d75f3dd9fc734afa8770abe0bd78c90cc2ff448105fb16dd2c5b7edd8611a62e537db9331f5023e16d6ec150cc6e706d7c7fcbfff930c7281831fd5c4aff86ece57ed0db882f59a5fe403105d0592ca38a081fed84922873f538ee774f13b8cc09bd0521db4374aec69f4bae6dcb66455822c0b84c91a3474ffac2ad06f0a4423cd2c6a49d4f0d6242d6a1890937b5d9835a5f0ea5b1d01884d22a6c1718e1f60b3ab5e232947c76ef70b344171083c688093b5f1475377e3069863
|
||||
Output = 3109d9472ca436e805c6b3db2251a9bc
|
||||
|
||||
Digest = SHAKE128
|
||||
Availablein = default
|
||||
Input = 49d81708d86cd59dea0ac2c1017a9712d6dffb754dde0b57a9023a39fc5f5b6be276fc176f59f6826610428fac3a0e85fcf71011db061b8fcf2bf085ccd45670effb6dc46f4e3f2ed08e981c5935187fc95b86cf46da675096b1cf9591a67842d6301116be93d8288e4d6b70f1b1db8aa5d203b774a21825665b8170351ee86801da91154570eaf80a1564945af7822df8232fd04ea65593a7f2ab1e9e84cf6ad6c494c9ec2d9d27aaad2b8f7e4f33f12a17b422bc2d4724c13ff8a8b62054d1bfb5c33b9c11183cd8df67694300165ca37637b5a781155f1c070d156339a0242374c6723b6584bffb71c02b935455f8cb086392f5e8e8cc2015956d8f19daeb6aca4476b27108387a2ce0dc5591154d0b94ddc090abe8f4363036b821062baffb7fe550ea7dcd30bfd86c84710081e1c9e450475e123c5ec41f98ff0149bbf6405b5207cad1fb2f313d0f2bcee9be3f6ebe623049640d9234ab644a172ab14ba02633a339b5b9bb38226fda5694f7ec63ebbb8238eb8219ec9c429f4bf0353383a72f2d21702f5e3c513499f04852710f33044512edc47a56bad90885e5713851a7efac694b869fa590076e844ff757d95de581c1b3fa3dd8ccd28cad4f8ae173ee1b28f98ee606dca89063fbef0f262b33053f2c854debdc9cd433ab77abb64f445aa9b981761c4761767f3b71c2646c7b0d873baae50bc9f0
|
||||
Output = c609be05458f7ab33e7b6b54bc6e8999
|
||||
|
||||
Digest = SHAKE256
|
||||
Availablein = default
|
||||
Input = ""
|
||||
Output = 46B9DD2B0BA88D13233B3FEB743EEB243FCD52EA62B81B82B50C27646ED5762FD75DC4DDD8C0F200CB05019D67B592F6FC821C49479AB48640292EACB3B7C4BE141E96616FB13957692CC7EDD0B45AE3DC07223C8E92937BEF84BC0EAB862853349EC75546F58FB7C2775C38462C5010D846C185C15111E595522A6BCD16CF86F3D122109E3B1FDD943B6AEC468A2D621A7C06C6A957C62B54DAFC3BE87567D677231395F6147293B68CEAB7A9E0C58D864E8EFDE4E1B9A46CBE854713672F5CAAAE314ED9083DAB4B099F8E300F01B8650F1F4B1D8FCF3F3CB53FB8E9EB2EA203BDC970F50AE55428A91F7F53AC266B28419C3778A15FD248D339EDE785FB7F5A1AAA96D313EACC890936C173CDCD0FAB882C45755FEB3AED96D477FF96390BF9A66D1368B208E21F7C10D04A3DBD4E360633E5DB4B602601C14CEA737DB3DCF722632CC77851CBDDE2AAF0A33A07B373445DF490CC8FC1E4160FF118378F11F0477DE055A81A9EDA57A4A2CFB0C83929D310912F729EC6CFA36C6AC6A75837143045D791CC85EFF5B21932F23861BCF23A52B5DA67EAF7BAAE0F5FB1369DB78F3AC45F8C4AC5671D85735CDDDB09D2B1E34A1FC066FF4A162CB263D6541274AE2FCC865F618ABE27C124CD8B074CCD516301B91875824D09958F341EF274BDAB0BAE316339894304E35877B0C28A9B1FD166C796B9CC258A064A8F57E27F2A
|
||||
|
||||
Digest = SHAKE256
|
||||
Availablein = default
|
||||
Input = A3
|
||||
Count = 200
|
||||
Output = CD8A920ED141AA0407A22D59288652E9D9F1A7EE0C1E7C1CA699424DA84A904D2D700CAAE7396ECE96604440577DA4F3AA22AEB8857F961C4CD8E06F0AE6610B1048A7F64E1074CD629E85AD7566048EFC4FB500B486A3309A8F26724C0ED628001A1099422468DE726F1061D99EB9E93604D5AA7467D4B1BD6484582A384317D7F47D750B8F5499512BB85A226C4243556E696F6BD072C5AA2D9B69730244B56853D16970AD817E213E470618178001C9FB56C54FEFA5FEE67D2DA524BB3B0B61EF0E9114A92CDBB6CCCB98615CFE76E3510DD88D1CC28FF99287512F24BFAFA1A76877B6F37198E3A641C68A7C42D45FA7ACC10DAE5F3CEFB7B735F12D4E589F7A456E78C0F5E4C4471FFFA5E4FA0514AE974D8C2648513B5DB494CEA847156D277AD0E141C24C7839064CD08851BC2E7CA109FD4E251C35BB0A04FB05B364FF8C4D8B59BC303E25328C09A882E952518E1A8AE0FF265D61C465896973D7490499DC639FB8502B39456791B1B6EC5BCC5D9AC36A6DF622A070D43FED781F5F149F7B62675E7D1A4D6DEC48C1C7164586EAE06A51208C0B791244D307726505C3AD4B26B6822377257AA152037560A739714A3CA79BD605547C9B78DD1F596F2D4F1791BC689A0E9B799A37339C04275733740143EF5D2B58B96A363D4E08076A1A9D7846436E4DCA5728B6F760EEF0CA92BF0BE5615E96959D767197A0BEEB
|
||||
|
||||
Digest = SHAKE256
|
||||
Availablein = default
|
||||
Input = dc5a100fa16df1583c79722a0d72833d3bf22c109b8889dbd35213c6bfce205813edae3242695cfd9f59b9a1c203c1b72ef1a5423147cb990b5316a85266675894e2644c3f9578cebe451a09e58c53788fe77a9e850943f8a275f830354b0593a762bac55e984db3e0661eca3cb83f67a6fb348e6177f7dee2df40c4322602f094953905681be3954fe44c4c902c8f6bba565a788b38f13411ba76ce0f9f6756a2a2687424c5435a51e62df7a8934b6e141f74c6ccf539e3782d22b5955d3baf1ab2cf7b5c3f74ec2f9447344e937957fd7f0bdfec56d5d25f61cde18c0986e244ecf780d6307e313117256948d4230ebb9ea62bb302cfe80d7dfebabc4a51d7687967ed5b416a139e974c005fff507a96
|
||||
Output = 2bac5716803a9cda8f9e84365ab0a681327b5ba34fdedfb1c12e6e807f45284b
|
||||
|
||||
Digest = SHAKE256
|
||||
Availablein = default
|
||||
Input = 16caf60da14b4fa9174a6d40c23cff93ed8fc9279990f749718db1500036ef2222498ffab86fa568a0611299e54e58d83281ac558d3f4d2541ee158b1c7d4d76dbffc64ae39925e3329f7fd894fa26fc1acdc22bc858a3438e1c55707a3f75ad2b33c48789937a24b34ddd85390611088cba3231b2a3a0a93e5d9a8780470fcff92cb03811234a330db353283b3bc3036f9125efb3eaed613bfa0c59975cc2e52c33b3e6e5123e1626190a4a0261e1f5ad9bc2ee34f331736b3bd26d274536f5ae90f5186c27fdd7e8c72972f64016e72d1d32b59b8715e5b867154b99cb140a668b9d560e2c307e3904d9297f9f07dfd7629ccc526e41c109c8fc7c53b604293c6cd42933e77e11031a42f605485fe893b129bcbf705c0f45a4b087bfcead5c187ac1174322909a2d4f8b61f001c4074951000c4c550ed5564458f444dab8aae2fe8daaa6a30d209fecddf2a893df46e18b4b4460e4011d23f01d4c49a4cc1c82405f6ac5339eac41385f3295c657ac43a72fed62e6daee94ef271638f292b8e18860de0699eb45fb7d3aa81f61d44158edd68ebc244451918b
|
||||
Output = 21a48efd949c3f785179a0e340756a23f77d29a7625229a71a05731c7fbd5aa9
|
||||
|
||||
@@ -514,18 +550,22 @@ Output = 21a48efd949c3f785179a0e340756a23f77d29a7625229a71a05731c7fbd5aa9
|
||||
# http://csrc.nist.gov/groups/STM/cavp/secure-hashing.html#test-vectors
|
||||
|
||||
Digest = SHAKE128
|
||||
Availablein = default
|
||||
Input = c60a221c975e14bf835827c1103a2906
|
||||
Output = 0db7f7196eee8dd6994a16ded19cb09f05f89ccd2464333df2c017c6ca041fa0d54a4832a74ce86ce9b41d8e523e66ce6ef9df7c20aa70e0ac00f54eb072a472ef46cf2a933df0d5f9fafab6388a206f6bd1df50b0836500c758c557c8ac965733fdaaa59f5ed661a1bda61e2952886a60f9568157e3d72e49b6e061fc08f3f1caf159e8eff77ea5221565d2
|
||||
|
||||
Digest = SHAKE128
|
||||
Availablein = default
|
||||
Input = 0a13ad2c7a239b4ba73ea6592ae84ea9
|
||||
Output = 5feaf99c15f48851943ff9baa6e5055d8377f0dd347aa4dbece51ad3a6d9ce0c01aee9fe2260b80a4673a909b532adcdd1e421c32d6460535b5fe392a58d2634979a5a104d6c470aa3306c400b061db91c463b2848297bca2bc26d1864ba49d7ff949ebca50fbf79a5e63716dc82b600bd52ca7437ed774d169f6bf02e46487956fba2230f34cd2a0485484d
|
||||
|
||||
Digest = SHAKE256
|
||||
Availablein = default
|
||||
Input = 6ae23f058f0f2264a18cd609acc26dd4dbc00f5c3ee9e13ecaea2bb5a2f0bb6b
|
||||
Output = b9b92544fb25cfe4ec6fe437d8da2bbe00f7bdaface3de97b8775a44d753c3adca3f7c6f183cc8647e229070439aa9539ae1f8f13470c9d3527fffdeef6c94f9f0520ff0c1ba8b16e16014e1af43ac6d94cb7929188cce9d7b02f81a2746f52ba16988e5f6d93298d778dfe05ea0ef256ae3728643ce3e29c794a0370e9ca6a8bf3e7a41e86770676ac106f7ae79e67027ce7b7b38efe27d253a52b5cb54d6eb4367a87736ed48cb45ef27f42683da140ed3295dfc575d3ea38cfc2a3697cc92864305407369b4abac054e497378dd9fd0c4b352ea3185ce1178b3dc1599df69db29259d4735320c8e7d33e8226620c9a1d22761f1d35bdff79a
|
||||
|
||||
Digest = SHAKE256
|
||||
Availablein = default
|
||||
Input = 8d8001e2c096f1b88e7c9224a086efd4797fbf74a8033a2d422a2b6b8f6747e4
|
||||
Output = 2e975f6a8a14f0704d51b13667d8195c219f71e6345696c49fa4b9d08e9225d3d39393425152c97e71dd24601c11abcfa0f12f53c680bd3ae757b8134a9c10d429615869217fdd5885c4db174985703a6d6de94a667eac3023443a8337ae1bc601b76d7d38ec3c34463105f0d3949d78e562a039e4469548b609395de5a4fd43c46ca9fd6ee29ada5efc07d84d553249450dab4a49c483ded250c9338f85cd937ae66bb436f3b4026e859fda1ca571432f3bfc09e7c03ca4d183b741111ca0483d0edabc03feb23b17ee48e844ba2408d9dcfd0139d2e8c7310125aee801c61ab7900d1efc47c078281766f361c5e6111346235e1dc38325666c
|
||||
|
||||
@@ -534,36 +574,44 @@ Title = SM3 Tests
|
||||
# From https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
|
||||
|
||||
Digest = SM3
|
||||
Availablein = default
|
||||
Input = 0090414C494345313233405941484F4F2E434F4D787968B4FA32C3FD2417842E73BBFEFF2F3C848B6831D7E0EC65228B3937E49863E4C6D3B23B0C849CF84241484BFE48F61D59A5B16BA06E6E12D1DA27C5249A421DEBD61B62EAB6746434EBC3CC315E32220B3BADD50BDC4C4E6C147FEDD43D0680512BCBB42C07D47349D2153B70C4E5D7FDFCBFA36EA1A85841B9E46E09A20AE4C7798AA0F119471BEE11825BE46202BB79E2A5844495E97C04FF4DF2548A7C0240F88F1CD4E16352A73C17B7F16F07353E53A176D684A9FE0C6BB798E857
|
||||
Output = F4A38489E32B45B6F876E3AC2168CA392362DC8F23459C1D1146FC3DBFB7BC9A
|
||||
|
||||
# From https://tools.ietf.org/html/draft-shen-sm3-hash-01
|
||||
Digest = SM3
|
||||
Availablein = default
|
||||
Input = 616263
|
||||
Output = 66C7F0F462EEEDD9D1F2D46BDC10E4E24167C4875CF2F7A2297DA02B8F4BA8E0
|
||||
|
||||
Digest = SM3
|
||||
Availablein = default
|
||||
Input = 61626364616263646162636461626364616263646162636461626364616263646162636461626364616263646162636461626364616263646162636461626364
|
||||
Output = DEBE9FF92275B8A138604889C18E5A4D6FDB70E5387E5765293dCbA39C0C5732
|
||||
|
||||
# From GmSSL test suite
|
||||
|
||||
Digest = SM3
|
||||
Availablein = default
|
||||
Input = 0090414C494345313233405941484F4F2E434F4D787968B4FA32C3FD2417842E73BBFEFF2F3C848B6831D7E0EC65228B3937E49863E4C6D3B23B0C849CF84241484BFE48F61D59A5B16BA06E6E12D1DA27C5249A421DEBD61B62EAB6746434EBC3CC315E32220B3BADD50BDC4C4E6C147FEDD43D0680512BCBB42C07D47349D2153B70C4E5D7FDFCBFA36EA1A85841B9E46E09A20AE4C7798AA0F119471BEE11825BE46202BB79E2A5844495E97C04FF4DF2548A7C0240F88F1CD4E16352A73C17B7F16F07353E53A176D684A9FE0C6BB798E857
|
||||
Output = F4A38489E32B45B6F876E3AC2168CA392362DC8F23459C1D1146FC3DBFB7BC9A
|
||||
|
||||
Digest = SM3
|
||||
Availablein = default
|
||||
Input = 0090414C494345313233405941484F4F2E434F4D00000000000000000000000000000000000000000000000000000000000000000000E78BCD09746C202378A7E72B12BCE00266B9627ECB0B5A25367AD1AD4CC6242B00CDB9CA7F1E6B0441F658343F4B10297C0EF9B6491082400A62E7A7485735FADD013DE74DA65951C4D76DC89220D5F7777A611B1C38BAE260B175951DC8060C2B3E0165961645281A8626607B917F657D7E9382F1EA5CD931F40F6627F357542653B201686522130D590FB8DE635D8FCA715CC6BF3D05BEF3F75DA5D543454448166612
|
||||
Output = 26352AF82EC19F207BBC6F9474E11E90CE0F7DDACE03B27F801817E897A81FD5
|
||||
|
||||
Digest = SM3
|
||||
Availablein = default
|
||||
Input = 0090414C494345313233405941484F4F2E434F4D787968B4FA32C3FD2417842E73BBFEFF2F3C848B6831D7E0EC65228B3937E49863E4C6D3B23B0C849CF84241484BFE48F61D59A5B16BA06E6E12D1DA27C5249A421DEBD61B62EAB6746434EBC3CC315E32220B3BADD50BDC4C4E6C147FEDD43D0680512BCBB42C07D47349D2153B70C4E5D7FDFCBFA36EA1A85841B9E46E09A23099093BF3C137D8FCBBCDF4A2AE50F3B0F216C3122D79425FE03A45DBFE16553DF79E8DAC1CF0ECBAA2F2B49D51A4B387F2EFAF482339086A27A8E05BAED98B
|
||||
Output = E4D1D0C3CA4C7F11BC8FF8CB3F4C02A78F108FA098E51A668487240F75E20F31
|
||||
|
||||
Digest = SM3
|
||||
Availablein = default
|
||||
Input = 008842494C4C343536405941484F4F2E434F4D787968B4FA32C3FD2417842E73BBFEFF2F3C848B6831D7E0EC65228B3937E49863E4C6D3B23B0C849CF84241484BFE48F61D59A5B16BA06E6E12D1DA27C5249A421DEBD61B62EAB6746434EBC3CC315E32220B3BADD50BDC4C4E6C147FEDD43D0680512BCBB42C07D47349D2153B70C4E5D7FDFCBFA36EA1A85841B9E46E09A2245493D446C38D8CC0F118374690E7DF633A8A4BFB3329B5ECE604B2B4F37F4353C0869F4B9E17773DE68FEC45E14904E0DEA45BF6CECF9918C85EA047C60A4C
|
||||
Output = 6B4B6D0E276691BD4A11BF72F4FB501AE309FDACB72FA6CC336E6656119ABD67
|
||||
|
||||
Digest = SM3
|
||||
Availablein = default
|
||||
Input = 4D38D2958CA7FD2CFAE3AF04486959CF92C8EF48E8B83A05C112E739D5F181D03082020CA003020102020900AF28725D98D33143300C06082A811CCF550183750500307D310B300906035504060C02636E310B300906035504080C02626A310B300906035504070C02626A310F300D060355040A0C06746F70736563310F300D060355040B0C06746F707365633111300F06035504030C08546F707365634341311F301D06092A864886F70D0109010C10626A40746F707365632E636F6D2E636E301E170D3132303632343037353433395A170D3332303632303037353433395A307D310B300906035504060C02636E310B300906035504080C02626A310B300906035504070C02626A310F300D060355040A0C06746F70736563310F300D060355040B0C06746F707365633111300F06035504030C08546F707365634341311F301D06092A864886F70D0109010C10626A40746F707365632E636F6D2E636E3059301306072A8648CE3D020106082A811CCF5501822D03420004D69C2F1EEC3BFB6B95B30C28085C77B125D77A9C39525D8190768F37D6B205B589DCD316BBE7D89A9DC21917F17799E698531F5E6E3E10BD31370B259C3F81C3A3733071300F0603551D130101FF040530030101FF301D0603551D0E041604148E5D90347858BAAAD870D8BDFBA6A85E7B563B64301F0603551D230418301680148E5D90347858BAAAD870D8BDFBA6A85E7B563B64300B0603551D0F040403020106301106096086480186F8420101040403020057
|
||||
Output = C3B02E500A8B60B77DEDCF6F4C11BEF8D56E5CDE708C72065654FD7B2167915A
|
||||
@@ -254,51 +254,51 @@ Output = 2c91117204d745f3500d636a62f64f0ab3bae548aa53d423b0d1f27ebba6f5e5673a081
|
||||
|
||||
Title = id-scrypt tests (from draft-josefsson-id-scrypt-kdf-03 and others)
|
||||
|
||||
KDF = scrypt
|
||||
KDF = id-scrypt
|
||||
Ctrl.pass = pass:
|
||||
Ctrl.salt = salt:
|
||||
Ctrl.N = N:16
|
||||
Ctrl.N = n:16
|
||||
Ctrl.r = r:1
|
||||
Ctrl.p = p:1
|
||||
Output = 77d6576238657b203b19ca42c18a0497f16b4844e3074ae8dfdffa3fede21442fcd0069ded0948f8326a753a0fc81f17e8d3e0fb2e0d3628cf35e20c38d18906
|
||||
|
||||
KDF = scrypt
|
||||
KDF = id-scrypt
|
||||
Ctrl.pass = pass:password
|
||||
Ctrl.salt = salt:NaCl
|
||||
Ctrl.N = N:1024
|
||||
Ctrl.N = n:1024
|
||||
Ctrl.r = r:8
|
||||
Ctrl.p = p:16
|
||||
Output = fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b3731622eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640
|
||||
|
||||
KDF = scrypt
|
||||
KDF = id-scrypt
|
||||
Ctrl.hexpass = hexpass:70617373776f7264
|
||||
Ctrl.salt = salt:NaCl
|
||||
Ctrl.N = N:1024
|
||||
Ctrl.N = n:1024
|
||||
Ctrl.r = r:8
|
||||
Ctrl.p = p:16
|
||||
Output = fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b3731622eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640
|
||||
|
||||
KDF = scrypt
|
||||
KDF = id-scrypt
|
||||
Ctrl.pass = pass:password
|
||||
Ctrl.hexsalt = hexsalt:4e61436c
|
||||
Ctrl.N = N:1024
|
||||
Ctrl.N = n:1024
|
||||
Ctrl.r = r:8
|
||||
Ctrl.p = p:16
|
||||
Output = fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b3731622eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640
|
||||
|
||||
KDF = scrypt
|
||||
KDF = id-scrypt
|
||||
Ctrl.pass = pass:pleaseletmein
|
||||
Ctrl.salt = salt:SodiumChloride
|
||||
Ctrl.N = N:16384
|
||||
Ctrl.N = n:16384
|
||||
Ctrl.r = r:8
|
||||
Ctrl.p = p:1
|
||||
Output = 7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2d5432955613f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887
|
||||
|
||||
# Out of memory
|
||||
KDF = scrypt
|
||||
KDF = id-scrypt
|
||||
Ctrl.pass = pass:pleaseletmein
|
||||
Ctrl.salt = salt:SodiumChloride
|
||||
Ctrl.N = N:1048576
|
||||
Ctrl.N = n:1048576
|
||||
Ctrl.r = r:8
|
||||
Ctrl.p = p:1
|
||||
Result = INTERNAL_ERROR
|
||||
@@ -452,7 +452,7 @@ Title = SSHKDF tests (from NIST CAVS 14.1 test vectors)
|
||||
# The first one uses md instead of digest to test alias works
|
||||
|
||||
KDF = SSHKDF
|
||||
Ctrl.md = md:SHA1
|
||||
Ctrl.digest = digest:SHA1
|
||||
Ctrl.hexkey = hexkey:0000008055bae931c07fd824bf10add1902b6fbc7c665347383498a686929ff5a25f8e40cb6645ea814fb1a5e0a11f852f86255641e5ed986e83a78bc8269480eac0b0dfd770cab92e7a28dd87ff452466d6ae867cead63b366b1c286e6c4811a9f14c27aea14c5171d49b78c06e3735d36e6a3be321dd5fc82308f34ee1cb17fba94a59
|
||||
Ctrl.hexxcghash = hexxcghash:a4ebd45934f56792b5112dcd75a1075fdc889245
|
||||
Ctrl.hexsession_id = hexsession_id:a4ebd45934f56792b5112dcd75a1075fdc889245
|
||||
|
||||
@@ -131,7 +131,7 @@ Output = 5150d1772f50834a503e069a973fbd7c
|
||||
# SIPHASH - default values: 2,4 rounds, explicit 8-byte mac
|
||||
|
||||
MAC = SipHash
|
||||
Ctrl = digestsize:8
|
||||
Ctrl = size:8
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
|
||||
Output = 724506EB4C328A95
|
||||
@@ -139,7 +139,7 @@ Output = 724506EB4C328A95
|
||||
# SIPHASH - default values: 2,4 rounds, explicit 16-byte mac
|
||||
|
||||
MAC = SipHash
|
||||
Ctrl = digestsize:16
|
||||
Ctrl = size:16
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
|
||||
Output = 5150d1772f50834a503e069a973fbd7c
|
||||
@@ -147,7 +147,7 @@ Output = 5150d1772f50834a503e069a973fbd7c
|
||||
# SIPHASH - default values: 2,4 rounds, explicit 16-byte mac (set as 0)
|
||||
|
||||
MAC = SipHash
|
||||
Ctrl = digestsize:0
|
||||
Ctrl = size:0
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
|
||||
Output = 5150d1772f50834a503e069a973fbd7c
|
||||
@@ -155,15 +155,15 @@ Output = 5150d1772f50834a503e069a973fbd7c
|
||||
# SIPHASH - default values: 2,4 rounds, explicit 13-byte mac (invalid size)
|
||||
|
||||
MAC = SipHash
|
||||
Ctrl = digestsize:13
|
||||
Ctrl = size:13
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Result = MAC_CTRL_ERROR
|
||||
Result = MAC_BAD_PARAMS
|
||||
|
||||
# SIPHASH - default values: 2,4 rounds, explicit 13-byte mac (invalid size)
|
||||
# by EVP_PKEY this time
|
||||
|
||||
MAC = SipHash by EVP_PKEY
|
||||
Ctrl = digestsize:13
|
||||
Ctrl = size:13
|
||||
Key = 000102030405060708090A0B0C0D0E0F
|
||||
Result = EVPPKEYCTXCTRL_ERROR
|
||||
|
||||
@@ -324,19 +324,19 @@ Output = 233a6c732212f4813ec4c9f357e35297e59a652fd24155205f00363f7c54734ee1e8c73
|
||||
|
||||
MAC = BLAKE2BMAC
|
||||
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
|
||||
Ctrl = outlen:128
|
||||
Result = MAC_CTRL_ERROR
|
||||
Ctrl = size:128
|
||||
Result = MAC_BAD_PARAMS
|
||||
|
||||
MAC = BLAKE2BMAC
|
||||
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
|
||||
Input = "Sample input for outlen<digest_length"
|
||||
Ctrl = outlen:1
|
||||
Ctrl = size:1
|
||||
Output = 2a
|
||||
|
||||
MAC = BLAKE2BMAC
|
||||
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
|
||||
Input = "Sample input for outlen<digest_length"
|
||||
Ctrl = outlen:32
|
||||
Ctrl = size:32
|
||||
Output = 7fa43c7735fcacad9fce2b44bef37dba6501ab48c9397bedb5562a682e519793
|
||||
|
||||
MAC = BLAKE2BMAC
|
||||
@@ -344,7 +344,7 @@ Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
|
||||
Input = "Combo input with outlen, custom and salt"
|
||||
Custom = "application"
|
||||
Salt = 000102030405060708090a0b0c0d0e0f
|
||||
Ctrl = outlen:32
|
||||
Ctrl = size:32
|
||||
Output = 51742fc491171eaf6b9459c8b93a44bbf8f44a0b4869a17fa178c8209918ad96
|
||||
|
||||
MAC = BLAKE2SMAC
|
||||
@@ -380,18 +380,18 @@ Output = e9f7704dfe5080a4aafe62a806f53ea7f98ffc24175164158f18ec5497b961f5
|
||||
|
||||
MAC = BLAKE2SMAC
|
||||
Key = 000102030405060708090a0b0c0d0e0f
|
||||
Ctrl = outlen:64
|
||||
Result = MAC_CTRL_ERROR
|
||||
Ctrl = size:64
|
||||
Result = MAC_BAD_PARAMS
|
||||
|
||||
MAC = BLAKE2SMAC
|
||||
Key = 000102030405060708090a0b0c0d0e0f
|
||||
Ctrl = outlen:16
|
||||
Ctrl = size:16
|
||||
Input = "Sample input for outlen<digest_length"
|
||||
Output = a09fb3d513efc3ed58dd1264de3c59f5
|
||||
|
||||
MAC = BLAKE2SMAC
|
||||
Key = 000102030405060708090a0b0c0d0e0f
|
||||
Ctrl = outlen:16
|
||||
Ctrl = size:16
|
||||
Custom = "app"
|
||||
Salt = 0001020304050607
|
||||
Input = "Combo input with outlen, custom and salt"
|
||||
@@ -595,7 +595,7 @@ MAC = HMAC
|
||||
Algorithm = SHAKE128
|
||||
Input = "Test that SHAKE128 fails"
|
||||
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
|
||||
Result = MAC_CTRL_ERROR
|
||||
Result = MAC_BAD_PARAMS
|
||||
|
||||
|
||||
Title = CMAC tests (from FIPS module)
|
||||
@@ -712,7 +712,7 @@ Key = 404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7
|
||||
Custom = "My Tagged Application"
|
||||
Output = 1F5B4E6CCA02209E0DCB5CA635B89A15E271ECC760071DFD805FAA38F9729230
|
||||
Ctrl = outlen:32
|
||||
Ctrl = size:32
|
||||
|
||||
MAC = KMAC256
|
||||
Key = 404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F
|
||||
@@ -731,7 +731,7 @@ Key = 404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7
|
||||
Custom = "My Tagged Application"
|
||||
Output = B58618F71F92E1D56C1B8C55DDD7CD188B97B4CA4D99831EB2699A837DA2E4D970FBACFDE50033AEA585F1A2708510C32D07880801BD182898FE476876FC8965
|
||||
Ctrl = outlen:64
|
||||
Ctrl = size:64
|
||||
|
||||
Title = KMAC XOF Tests (From NIST)
|
||||
|
||||
@@ -754,7 +754,7 @@ Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20212223
|
||||
Custom = "My Tagged Application"
|
||||
Output = 47026C7CD793084AA0283C253EF658490C0DB61438B8326FE9BDDF281B83AE0F
|
||||
Ctrl = xof:1
|
||||
Ctrl = outlen:32
|
||||
Ctrl = size:32
|
||||
|
||||
MAC = KMAC256
|
||||
Key = 404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F
|
||||
@@ -775,7 +775,7 @@ Key = 404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F
|
||||
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7
|
||||
Custom = "My Tagged Application"
|
||||
Output = D5BE731C954ED7732846BB59DBE3A8E30F83E77A4BFF4459F2F1C2B4ECEBB8CE67BA01C62E8AB8578D2D499BD1BB276768781190020A306A97DE281DCC30305D
|
||||
Ctrl = outlen:64
|
||||
Ctrl = size:64
|
||||
Ctrl = xof:1
|
||||
|
||||
|
||||
|
||||
@@ -374,13 +374,11 @@ Result = KEYOP_ERROR
|
||||
# Illegal RSA key derivation
|
||||
Derive = RSA-2048
|
||||
Result = KEYOP_INIT_ERROR
|
||||
Function = EVP_PKEY_derive_init
|
||||
Reason = operation not supported for this keytype
|
||||
|
||||
Sign = RSA-2048
|
||||
Ctrl = rsa_mgf1_md:sha1
|
||||
Result = PKEY_CTRL_INVALID
|
||||
Function = pkey_rsa_ctrl
|
||||
Reason = invalid mgf1 md
|
||||
|
||||
# RSA PSS key tests
|
||||
@@ -571,19 +569,16 @@ Result = PKEY_CTRL_ERROR
|
||||
# Illegal decrypt
|
||||
Decrypt = RSA-PSS
|
||||
Result = KEYOP_INIT_ERROR
|
||||
Function = EVP_PKEY_decrypt_init
|
||||
Reason = operation not supported for this keytype
|
||||
|
||||
# Invalid key: rejected when we try to init
|
||||
Verify = RSA-PSS-BAD
|
||||
Result = KEYOP_INIT_ERROR
|
||||
Function = rsa_pss_get_param
|
||||
Reason = invalid salt length
|
||||
|
||||
# Invalid key: rejected when we try to init
|
||||
Verify = RSA-PSS-BAD2
|
||||
Result = KEYOP_INIT_ERROR
|
||||
Function = pkey_pss_init
|
||||
Reason = invalid salt length
|
||||
|
||||
|
||||
@@ -762,12 +757,10 @@ SharedSecret=4A5D9D5BA4CE2DE1728E3BF480350F25E07E21C947D19E3376F09B3C1E161742
|
||||
|
||||
Sign=Alice-25519
|
||||
Result = KEYOP_INIT_ERROR
|
||||
Function = EVP_PKEY_sign_init
|
||||
Reason = operation not supported for this keytype
|
||||
|
||||
Verify=Alice-25519
|
||||
Result = KEYOP_INIT_ERROR
|
||||
Function = EVP_PKEY_verify_init
|
||||
Reason = operation not supported for this keytype
|
||||
|
||||
Title = X448 test vectors (from RFC7748 6.2)
|
||||
@@ -834,12 +827,10 @@ SharedSecret=07fff4181ac6cc95ec1c16a94a0f74d12da232ce40a77552281d282bb60c0b56fd2
|
||||
|
||||
Sign=Alice-448
|
||||
Result = KEYOP_INIT_ERROR
|
||||
Function = EVP_PKEY_sign_init
|
||||
Reason = operation not supported for this keytype
|
||||
|
||||
Verify=Alice-448
|
||||
Result = KEYOP_INIT_ERROR
|
||||
Function = EVP_PKEY_verify_init
|
||||
Reason = operation not supported for this keytype
|
||||
|
||||
|
||||
@@ -17286,7 +17277,6 @@ Derive=ALICE_cf_sect283k1
|
||||
PeerKey=BOB_cf_sect283k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result = DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title = Test keypair mismatches
|
||||
@@ -17830,7 +17820,6 @@ KeyGen = rsaEncryption
|
||||
Ctrl = rsa_keygen_bits:128
|
||||
KeyName = tmprsa
|
||||
Result = PKEY_CTRL_INVALID
|
||||
Function = pkey_rsa_ctrl
|
||||
Reason = key size too small
|
||||
|
||||
# RSA-PSS with restrictions, should succeed.
|
||||
|
||||
@@ -623,7 +623,6 @@ Derive=BOB_cf_c2pnb163v1
|
||||
PeerKey=MALICE_cf_c2pnb163v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -631,7 +630,6 @@ Derive=ALICE_cf_c2pnb163v1
|
||||
PeerKey=MALICE_cf_c2pnb163v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2pnb163v2 curve tests
|
||||
@@ -695,7 +693,6 @@ Derive=BOB_cf_c2pnb163v2
|
||||
PeerKey=MALICE_cf_c2pnb163v2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -703,7 +700,6 @@ Derive=ALICE_cf_c2pnb163v2
|
||||
PeerKey=MALICE_cf_c2pnb163v2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2pnb163v3 curve tests
|
||||
@@ -767,7 +763,6 @@ Derive=BOB_cf_c2pnb163v3
|
||||
PeerKey=MALICE_cf_c2pnb163v3_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -775,7 +770,6 @@ Derive=ALICE_cf_c2pnb163v3
|
||||
PeerKey=MALICE_cf_c2pnb163v3_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2pnb176v1 curve tests
|
||||
@@ -839,7 +833,6 @@ Derive=BOB_cf_c2pnb176v1
|
||||
PeerKey=MALICE_cf_c2pnb176v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -847,7 +840,6 @@ Derive=ALICE_cf_c2pnb176v1
|
||||
PeerKey=MALICE_cf_c2pnb176v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2pnb208w1 curve tests
|
||||
@@ -913,7 +905,6 @@ Derive=BOB_cf_c2pnb208w1
|
||||
PeerKey=MALICE_cf_c2pnb208w1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -921,7 +912,6 @@ Derive=ALICE_cf_c2pnb208w1
|
||||
PeerKey=MALICE_cf_c2pnb208w1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2pnb272w1 curve tests
|
||||
@@ -987,7 +977,6 @@ Derive=BOB_cf_c2pnb272w1
|
||||
PeerKey=MALICE_cf_c2pnb272w1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -995,7 +984,6 @@ Derive=ALICE_cf_c2pnb272w1
|
||||
PeerKey=MALICE_cf_c2pnb272w1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2pnb304w1 curve tests
|
||||
@@ -1061,7 +1049,6 @@ Derive=BOB_cf_c2pnb304w1
|
||||
PeerKey=MALICE_cf_c2pnb304w1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1069,7 +1056,6 @@ Derive=ALICE_cf_c2pnb304w1
|
||||
PeerKey=MALICE_cf_c2pnb304w1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2pnb368w1 curve tests
|
||||
@@ -1138,7 +1124,6 @@ Derive=BOB_cf_c2pnb368w1
|
||||
PeerKey=MALICE_cf_c2pnb368w1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1146,7 +1131,6 @@ Derive=ALICE_cf_c2pnb368w1
|
||||
PeerKey=MALICE_cf_c2pnb368w1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2tnb191v1 curve tests
|
||||
@@ -1212,7 +1196,6 @@ Derive=BOB_cf_c2tnb191v1
|
||||
PeerKey=MALICE_cf_c2tnb191v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1220,7 +1203,6 @@ Derive=ALICE_cf_c2tnb191v1
|
||||
PeerKey=MALICE_cf_c2tnb191v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2tnb191v2 curve tests
|
||||
@@ -1286,7 +1268,6 @@ Derive=BOB_cf_c2tnb191v2
|
||||
PeerKey=MALICE_cf_c2tnb191v2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1294,7 +1275,6 @@ Derive=ALICE_cf_c2tnb191v2
|
||||
PeerKey=MALICE_cf_c2tnb191v2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2tnb191v3 curve tests
|
||||
@@ -1360,7 +1340,6 @@ Derive=BOB_cf_c2tnb191v3
|
||||
PeerKey=MALICE_cf_c2tnb191v3_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1368,7 +1347,6 @@ Derive=ALICE_cf_c2tnb191v3
|
||||
PeerKey=MALICE_cf_c2tnb191v3_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2tnb239v1 curve tests
|
||||
@@ -1434,7 +1412,6 @@ Derive=BOB_cf_c2tnb239v1
|
||||
PeerKey=MALICE_cf_c2tnb239v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1442,7 +1419,6 @@ Derive=ALICE_cf_c2tnb239v1
|
||||
PeerKey=MALICE_cf_c2tnb239v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2tnb239v2 curve tests
|
||||
@@ -1508,7 +1484,6 @@ Derive=BOB_cf_c2tnb239v2
|
||||
PeerKey=MALICE_cf_c2tnb239v2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1516,7 +1491,6 @@ Derive=ALICE_cf_c2tnb239v2
|
||||
PeerKey=MALICE_cf_c2tnb239v2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2tnb239v3 curve tests
|
||||
@@ -1582,7 +1556,6 @@ Derive=BOB_cf_c2tnb239v3
|
||||
PeerKey=MALICE_cf_c2tnb239v3_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1590,7 +1563,6 @@ Derive=ALICE_cf_c2tnb239v3
|
||||
PeerKey=MALICE_cf_c2tnb239v3_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2tnb359v1 curve tests
|
||||
@@ -1659,7 +1631,6 @@ Derive=BOB_cf_c2tnb359v1
|
||||
PeerKey=MALICE_cf_c2tnb359v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1667,7 +1638,6 @@ Derive=ALICE_cf_c2tnb359v1
|
||||
PeerKey=MALICE_cf_c2tnb359v1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=c2tnb431r1 curve tests
|
||||
@@ -1736,7 +1706,6 @@ Derive=BOB_cf_c2tnb431r1
|
||||
PeerKey=MALICE_cf_c2tnb431r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -1744,7 +1713,6 @@ Derive=ALICE_cf_c2tnb431r1
|
||||
PeerKey=MALICE_cf_c2tnb431r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=prime192v1 curve tests
|
||||
@@ -2121,7 +2089,6 @@ Derive=BOB_cf_secp112r2
|
||||
PeerKey=MALICE_cf_secp112r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -2129,7 +2096,6 @@ Derive=ALICE_cf_secp112r2
|
||||
PeerKey=MALICE_cf_secp112r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=secp128r1 curve tests
|
||||
@@ -2226,7 +2192,6 @@ Derive=BOB_cf_secp128r2
|
||||
PeerKey=MALICE_cf_secp128r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -2234,7 +2199,6 @@ Derive=ALICE_cf_secp128r2
|
||||
PeerKey=MALICE_cf_secp128r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=secp160k1 curve tests
|
||||
@@ -2651,7 +2615,6 @@ Derive=BOB_cf_sect113r1
|
||||
PeerKey=MALICE_cf_sect113r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -2659,7 +2622,6 @@ Derive=ALICE_cf_sect113r1
|
||||
PeerKey=MALICE_cf_sect113r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect113r2 curve tests
|
||||
@@ -2720,7 +2682,6 @@ Derive=BOB_cf_sect113r2
|
||||
PeerKey=MALICE_cf_sect113r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -2728,7 +2689,6 @@ Derive=ALICE_cf_sect113r2
|
||||
PeerKey=MALICE_cf_sect113r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect131r1 curve tests
|
||||
@@ -2792,7 +2752,6 @@ Derive=BOB_cf_sect131r1
|
||||
PeerKey=MALICE_cf_sect131r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -2800,7 +2759,6 @@ Derive=ALICE_cf_sect131r1
|
||||
PeerKey=MALICE_cf_sect131r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect131r2 curve tests
|
||||
@@ -2864,7 +2822,6 @@ Derive=BOB_cf_sect131r2
|
||||
PeerKey=MALICE_cf_sect131r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -2872,7 +2829,6 @@ Derive=ALICE_cf_sect131r2
|
||||
PeerKey=MALICE_cf_sect131r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect163k1 curve tests
|
||||
@@ -2936,7 +2892,6 @@ Derive=BOB_cf_sect163k1
|
||||
PeerKey=MALICE_cf_sect163k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -2944,7 +2899,6 @@ Derive=ALICE_cf_sect163k1
|
||||
PeerKey=MALICE_cf_sect163k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect163r1 curve tests
|
||||
@@ -3008,7 +2962,6 @@ Derive=BOB_cf_sect163r1
|
||||
PeerKey=MALICE_cf_sect163r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3016,7 +2969,6 @@ Derive=ALICE_cf_sect163r1
|
||||
PeerKey=MALICE_cf_sect163r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect163r2 curve tests
|
||||
@@ -3080,7 +3032,6 @@ Derive=BOB_cf_sect163r2
|
||||
PeerKey=MALICE_cf_sect163r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3088,7 +3039,6 @@ Derive=ALICE_cf_sect163r2
|
||||
PeerKey=MALICE_cf_sect163r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect193r1 curve tests
|
||||
@@ -3152,7 +3102,6 @@ Derive=BOB_cf_sect193r1
|
||||
PeerKey=MALICE_cf_sect193r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3160,7 +3109,6 @@ Derive=ALICE_cf_sect193r1
|
||||
PeerKey=MALICE_cf_sect193r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect193r2 curve tests
|
||||
@@ -3224,7 +3172,6 @@ Derive=BOB_cf_sect193r2
|
||||
PeerKey=MALICE_cf_sect193r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3232,7 +3179,6 @@ Derive=ALICE_cf_sect193r2
|
||||
PeerKey=MALICE_cf_sect193r2_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect233k1 curve tests
|
||||
@@ -3298,7 +3244,6 @@ Derive=BOB_cf_sect233k1
|
||||
PeerKey=MALICE_cf_sect233k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3306,7 +3251,6 @@ Derive=ALICE_cf_sect233k1
|
||||
PeerKey=MALICE_cf_sect233k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect233r1 curve tests
|
||||
@@ -3372,7 +3316,6 @@ Derive=BOB_cf_sect233r1
|
||||
PeerKey=MALICE_cf_sect233r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3380,7 +3323,6 @@ Derive=ALICE_cf_sect233r1
|
||||
PeerKey=MALICE_cf_sect233r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect239k1 curve tests
|
||||
@@ -3446,7 +3388,6 @@ Derive=BOB_cf_sect239k1
|
||||
PeerKey=MALICE_cf_sect239k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3454,7 +3395,6 @@ Derive=ALICE_cf_sect239k1
|
||||
PeerKey=MALICE_cf_sect239k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect283k1 curve tests
|
||||
@@ -3520,7 +3460,6 @@ Derive=BOB_cf_sect283k1
|
||||
PeerKey=MALICE_cf_sect283k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3528,7 +3467,6 @@ Derive=ALICE_cf_sect283k1
|
||||
PeerKey=MALICE_cf_sect283k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect283r1 curve tests
|
||||
@@ -3594,7 +3532,6 @@ Derive=BOB_cf_sect283r1
|
||||
PeerKey=MALICE_cf_sect283r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3602,7 +3539,6 @@ Derive=ALICE_cf_sect283r1
|
||||
PeerKey=MALICE_cf_sect283r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect409k1 curve tests
|
||||
@@ -3671,7 +3607,6 @@ Derive=BOB_cf_sect409k1
|
||||
PeerKey=MALICE_cf_sect409k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3679,7 +3614,6 @@ Derive=ALICE_cf_sect409k1
|
||||
PeerKey=MALICE_cf_sect409k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect409r1 curve tests
|
||||
@@ -3748,7 +3682,6 @@ Derive=BOB_cf_sect409r1
|
||||
PeerKey=MALICE_cf_sect409r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3756,7 +3689,6 @@ Derive=ALICE_cf_sect409r1
|
||||
PeerKey=MALICE_cf_sect409r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect571k1 curve tests
|
||||
@@ -3825,7 +3757,6 @@ Derive=BOB_cf_sect571k1
|
||||
PeerKey=MALICE_cf_sect571k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3833,7 +3764,6 @@ Derive=ALICE_cf_sect571k1
|
||||
PeerKey=MALICE_cf_sect571k1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=sect571r1 curve tests
|
||||
@@ -3902,7 +3832,6 @@ Derive=BOB_cf_sect571r1
|
||||
PeerKey=MALICE_cf_sect571r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3910,7 +3839,6 @@ Derive=ALICE_cf_sect571r1
|
||||
PeerKey=MALICE_cf_sect571r1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=wap-wsg-idm-ecid-wtls10 curve tests
|
||||
@@ -3976,7 +3904,6 @@ Derive=BOB_cf_wap-wsg-idm-ecid-wtls10
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls10_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -3984,7 +3911,6 @@ Derive=ALICE_cf_wap-wsg-idm-ecid-wtls10
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls10_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=wap-wsg-idm-ecid-wtls11 curve tests
|
||||
@@ -4050,7 +3976,6 @@ Derive=BOB_cf_wap-wsg-idm-ecid-wtls11
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls11_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -4058,7 +3983,6 @@ Derive=ALICE_cf_wap-wsg-idm-ecid-wtls11
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls11_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=wap-wsg-idm-ecid-wtls12 curve tests
|
||||
@@ -4159,7 +4083,6 @@ Derive=BOB_cf_wap-wsg-idm-ecid-wtls1
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -4167,7 +4090,6 @@ Derive=ALICE_cf_wap-wsg-idm-ecid-wtls1
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls1_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=wap-wsg-idm-ecid-wtls3 curve tests
|
||||
@@ -4231,7 +4153,6 @@ Derive=BOB_cf_wap-wsg-idm-ecid-wtls3
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls3_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -4239,7 +4160,6 @@ Derive=ALICE_cf_wap-wsg-idm-ecid-wtls3
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls3_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=wap-wsg-idm-ecid-wtls4 curve tests
|
||||
@@ -4300,7 +4220,6 @@ Derive=BOB_cf_wap-wsg-idm-ecid-wtls4
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls4_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -4308,7 +4227,6 @@ Derive=ALICE_cf_wap-wsg-idm-ecid-wtls4
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls4_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=wap-wsg-idm-ecid-wtls5 curve tests
|
||||
@@ -4372,7 +4290,6 @@ Derive=BOB_cf_wap-wsg-idm-ecid-wtls5
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls5_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
# ECC CDH Alice with Malice peer
|
||||
@@ -4380,7 +4297,6 @@ Derive=ALICE_cf_wap-wsg-idm-ecid-wtls5
|
||||
PeerKey=MALICE_cf_wap-wsg-idm-ecid-wtls5_PUB
|
||||
Ctrl=ecdh_cofactor_mode:1
|
||||
Result=DERIVE_ERROR
|
||||
Function=EC_POINT_get_affine_coordinates
|
||||
Reason=point at infinity
|
||||
|
||||
Title=wap-wsg-idm-ecid-wtls6 curve tests
|
||||
|
||||
@@ -16,6 +16,4 @@ setup("test_evp_extra");
|
||||
|
||||
plan tests => 1;
|
||||
|
||||
$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
|
||||
|
||||
ok(run(test(["evp_extra_test"])), "running evp_extra_test");
|
||||
@@ -0,0 +1,79 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use OpenSSL::Test qw(:DEFAULT bldtop_dir srctop_file srctop_dir bldtop_file);
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
BEGIN {
|
||||
setup("test_evp_fetch_prov");
|
||||
}
|
||||
|
||||
use lib srctop_dir('Configurations');
|
||||
use lib bldtop_dir('.');
|
||||
use platform;
|
||||
|
||||
my @types = ( "digest", "cipher" );
|
||||
|
||||
plan tests => 2 + 16 * scalar(@types);
|
||||
|
||||
$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
|
||||
$ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
|
||||
|
||||
my $infile = bldtop_file('providers', platform->dso('fips'));
|
||||
ok(run(app(['openssl', 'fipsinstall', '-out', bldtop_file('providers', 'fipsinstall.conf'),
|
||||
'-module', $infile,
|
||||
'-provider_name', 'fips', '-mac_name', 'HMAC',
|
||||
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
|
||||
'-section_name', 'fips_sect'])), "fipinstall");
|
||||
|
||||
# Do implicit fetch using the default context
|
||||
ok(run(test(["evp_fetch_prov_test", "-defaultctx"])),
|
||||
"running evp_fetch_prov_test using implicit fetch using the default libctx");
|
||||
|
||||
foreach my $alg(@types) {
|
||||
$ENV{OPENSSL_CONF} = srctop_file("test", "default.cnf");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg"])),
|
||||
"running evp_fetch_prov_test using implicit fetch using a created libctx");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "default"])),
|
||||
"running evp_fetch_prov_test with implicit fetch using default provider loaded");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "default=yes", "default"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'default=yes' using default provider loaded");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "fips=no", "default"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'fips=no' using default provider loaded");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "default=no", "-fetchfail", "default"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'default=no' using default provider loaded should fail");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "fips=yes", "-fetchfail", "default"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'fips=yes' using default provider loaded should fail");
|
||||
|
||||
$ENV{OPENSSL_CONF} = srctop_file("test", "fips.cnf");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch '' using loaded fips provider");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "fips=yes", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'fips=yes' using loaded fips provider");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "default=no", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'default=no' using loaded fips provider");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "default=yes", "-fetchfail", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'default=yes' using loaded fips provider should fail");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "fips=no", "-fetchfail", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'fips=no' using loaded fips provider should fail");
|
||||
|
||||
$ENV{OPENSSL_CONF} = srctop_file("test", "default-and-fips.cnf");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "", "default", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch '' using loaded default & fips provider");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "default=no", "default", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'default=no' using loaded default & fips provider");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "default=yes", "default", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'default=yes' using loaded default & fips provider");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "fips=no", "default", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'fips=no' using loaded default & fips provider");
|
||||
ok(run(test(["evp_fetch_prov_test", "-type", "$alg", "-property", "fips=yes", "default", "fips"])),
|
||||
"running evp_fetch_prov_test with $alg fetch 'fips=yes' using loaded default & fips provider");
|
||||
}
|
||||
@@ -201,7 +201,7 @@ $proxy->start();
|
||||
ok($fatal_alert, "Duplicate ServerHello extension");
|
||||
|
||||
SKIP: {
|
||||
skip "TLS <= 1.2 disabled", 3 if $no_below_tls13;
|
||||
skip "TLS <= 1.2 disabled", 2 if $no_below_tls13;
|
||||
|
||||
#Test 3: Sending a zero length extension block should pass
|
||||
$proxy->clear();
|
||||
|
||||
@@ -95,58 +95,81 @@ my $proxy = TLSProxy::Proxy->new(
|
||||
|
||||
@extensions = (
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SERVER_NAME,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SERVER_NAME_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::STATUS_REQUEST_CLI_EXTENSION],
|
||||
(disabled("ec") ? () :
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO,
|
||||
TLSProxy::Message::EXT_SUPPORTED_GROUPS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS]),
|
||||
(disabled("ec") ? () :
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO,
|
||||
TLSProxy::Message::EXT_EC_POINT_FORMATS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS]),
|
||||
(disabled("tls1_2") ? () :
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SIG_ALGS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS]),
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ALPN,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::ALPN_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SCT,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SCT_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ENCRYPT_THEN_MAC,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EXTENDED_MASTER_SECRET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SESSION_TICKET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_RENEGOTIATE,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::RENEGOTIATE_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_NPN,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::NPN_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SRP,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SRP_CLI_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_RENEGOTIATE,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_ENCRYPT_THEN_MAC,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_EXTENDED_MASTER_SECRET,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SESSION_TICKET,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::SESSION_TICKET_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SERVER_NAME,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::SERVER_NAME_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::STATUS_REQUEST_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_ALPN,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::ALPN_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SCT,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::SCT_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_NPN,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::NPN_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_EC_POINT_FORMATS,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::EC_POINT_FORMAT_SRV_EXTENSION],
|
||||
[0,0,0]
|
||||
[0,0,0,0]
|
||||
);
|
||||
|
||||
#Test 1: Check we get all the right messages for a default handshake
|
||||
|
||||
@@ -65,78 +65,112 @@ $ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.conf");
|
||||
|
||||
@extensions = (
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SERVER_NAME,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SERVER_NAME_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::STATUS_REQUEST_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EC_POINT_FORMATS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SIG_ALGS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ALPN,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::ALPN_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SCT,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SCT_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ENCRYPT_THEN_MAC,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EXTENDED_MASTER_SECRET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SESSION_TICKET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK_KEX_MODES,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::PSK_KEX_MODES_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::PSK_CLI_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::KEY_SHARE_HRR_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SERVER_NAME,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SERVER_NAME_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::STATUS_REQUEST_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EC_POINT_FORMATS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SIG_ALGS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ALPN,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::ALPN_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SCT,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SCT_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ENCRYPT_THEN_MAC,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EXTENDED_MASTER_SECRET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SESSION_TICKET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK_KEX_MODES,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::PSK_KEX_MODES_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::PSK_CLI_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::KEY_SHARE_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_PSK,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::PSK_SRV_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_CERTIFICATE, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::STATUS_REQUEST_SRV_EXTENSION],
|
||||
[0,0,0]
|
||||
[0,0,0,0]
|
||||
);
|
||||
|
||||
use constant {
|
||||
|
||||
@@ -65,92 +65,136 @@ $ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.conf");
|
||||
|
||||
@extensions = (
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SERVER_NAME,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SERVER_NAME_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::STATUS_REQUEST_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EC_POINT_FORMATS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SIG_ALGS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ALPN,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::ALPN_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SCT,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SCT_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ENCRYPT_THEN_MAC,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EXTENDED_MASTER_SECRET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SESSION_TICKET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK_KEX_MODES,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::PSK_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_POST_HANDSHAKE_AUTH,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::POST_HANDSHAKE_AUTH_CLI_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::KEY_SHARE_HRR_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SERVER_NAME,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SERVER_NAME_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::STATUS_REQUEST_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EC_POINT_FORMATS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SIG_ALGS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ALPN,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::ALPN_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SCT,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::SCT_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ENCRYPT_THEN_MAC,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EXTENDED_MASTER_SECRET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SESSION_TICKET,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK_KEX_MODES,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::PSK_CLI_EXTENSION],
|
||||
[TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_POST_HANDSHAKE_AUTH,
|
||||
TLSProxy::Message::CLIENT,
|
||||
checkhandshake::POST_HANDSHAKE_AUTH_CLI_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
[TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_PSK,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::PSK_SRV_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_SERVER_NAME,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::SERVER_NAME_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_ALPN,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::ALPN_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::SUPPORTED_GROUPS_SRV_EXTENSION],
|
||||
|
||||
[TLSProxy::Message::MT_CERTIFICATE_REQUEST, TLSProxy::Message::EXT_SIG_ALGS,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::DEFAULT_EXTENSIONS],
|
||||
|
||||
[TLSProxy::Message::MT_CERTIFICATE, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::STATUS_REQUEST_SRV_EXTENSION],
|
||||
[TLSProxy::Message::MT_CERTIFICATE, TLSProxy::Message::EXT_SCT,
|
||||
TLSProxy::Message::SERVER,
|
||||
checkhandshake::SCT_SRV_EXTENSION],
|
||||
|
||||
[0,0,0]
|
||||
[0,0,0,0]
|
||||
);
|
||||
|
||||
my $proxy = TLSProxy::Proxy->new(
|
||||
@@ -166,7 +210,7 @@ $proxy->serverconnects(2);
|
||||
$proxy->clientflags("-sess_out ".$session);
|
||||
$proxy->sessionfile($session);
|
||||
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
|
||||
plan tests => 16;
|
||||
plan tests => 17;
|
||||
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
||||
checkhandshake::DEFAULT_EXTENSIONS,
|
||||
"Default handshake test");
|
||||
@@ -182,7 +226,7 @@ checkhandshake($proxy, checkhandshake::RESUME_HANDSHAKE,
|
||||
"Resumption handshake test");
|
||||
|
||||
SKIP: {
|
||||
skip "No OCSP support in this OpenSSL build", 3
|
||||
skip "No OCSP support in this OpenSSL build", 4
|
||||
if disabled("ct") || disabled("ec") || disabled("ocsp");
|
||||
#Test 3: A status_request handshake (client request only)
|
||||
$proxy->clear();
|
||||
@@ -213,9 +257,23 @@ SKIP: {
|
||||
| checkhandshake::STATUS_REQUEST_CLI_EXTENSION
|
||||
| checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
|
||||
"status_request handshake test");
|
||||
|
||||
#Test 6: A status_request handshake (client and server) with client auth
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-status -enable_pha -cert "
|
||||
.srctop_file("apps", "server.pem"));
|
||||
$proxy->serverflags("-Verify 5 -status_file "
|
||||
.srctop_file("test", "recipes", "ocsp-response.der"));
|
||||
$proxy->start();
|
||||
checkhandshake($proxy, checkhandshake::CLIENT_AUTH_HANDSHAKE,
|
||||
checkhandshake::DEFAULT_EXTENSIONS
|
||||
| checkhandshake::STATUS_REQUEST_CLI_EXTENSION
|
||||
| checkhandshake::STATUS_REQUEST_SRV_EXTENSION
|
||||
| checkhandshake::POST_HANDSHAKE_AUTH_CLI_EXTENSION,
|
||||
"status_request handshake with client auth test");
|
||||
}
|
||||
|
||||
#Test 6: A client auth handshake
|
||||
#Test 7: A client auth handshake
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-enable_pha -cert ".srctop_file("apps", "server.pem"));
|
||||
$proxy->serverflags("-Verify 5");
|
||||
@@ -225,7 +283,7 @@ checkhandshake($proxy, checkhandshake::CLIENT_AUTH_HANDSHAKE,
|
||||
checkhandshake::POST_HANDSHAKE_AUTH_CLI_EXTENSION,
|
||||
"Client auth handshake test");
|
||||
|
||||
#Test 7: Server name handshake (no client request)
|
||||
#Test 8: Server name handshake (no client request)
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-noservername");
|
||||
$proxy->start();
|
||||
@@ -234,7 +292,7 @@ checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
||||
& ~checkhandshake::SERVER_NAME_CLI_EXTENSION,
|
||||
"Server name handshake test (client)");
|
||||
|
||||
#Test 8: Server name handshake (server support only)
|
||||
#Test 9: Server name handshake (server support only)
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-noservername");
|
||||
$proxy->serverflags("-servername testhost");
|
||||
@@ -244,7 +302,7 @@ checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
||||
& ~checkhandshake::SERVER_NAME_CLI_EXTENSION,
|
||||
"Server name handshake test (server)");
|
||||
|
||||
#Test 9: Server name handshake (client and server)
|
||||
#Test 10: Server name handshake (client and server)
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-servername testhost");
|
||||
$proxy->serverflags("-servername testhost");
|
||||
@@ -254,7 +312,7 @@ checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
||||
| checkhandshake::SERVER_NAME_SRV_EXTENSION,
|
||||
"Server name handshake test");
|
||||
|
||||
#Test 10: ALPN handshake (client request only)
|
||||
#Test 11: ALPN handshake (client request only)
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-alpn test");
|
||||
$proxy->start();
|
||||
@@ -263,7 +321,7 @@ checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
||||
| checkhandshake::ALPN_CLI_EXTENSION,
|
||||
"ALPN handshake test (client)");
|
||||
|
||||
#Test 11: ALPN handshake (server support only)
|
||||
#Test 12: ALPN handshake (server support only)
|
||||
$proxy->clear();
|
||||
$proxy->serverflags("-alpn test");
|
||||
$proxy->start();
|
||||
@@ -271,7 +329,7 @@ checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
||||
checkhandshake::DEFAULT_EXTENSIONS,
|
||||
"ALPN handshake test (server)");
|
||||
|
||||
#Test 12: ALPN handshake (client and server)
|
||||
#Test 13: ALPN handshake (client and server)
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-alpn test");
|
||||
$proxy->serverflags("-alpn test");
|
||||
@@ -286,7 +344,7 @@ SKIP: {
|
||||
skip "No CT, EC or OCSP support in this OpenSSL build", 1
|
||||
if disabled("ct") || disabled("ec") || disabled("ocsp");
|
||||
|
||||
#Test 13: SCT handshake (client request only)
|
||||
#Test 14: SCT handshake (client request only)
|
||||
$proxy->clear();
|
||||
#Note: -ct also sends status_request
|
||||
$proxy->clientflags("-ct");
|
||||
@@ -303,10 +361,7 @@ SKIP: {
|
||||
"SCT handshake test");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#Test 14: HRR Handshake
|
||||
#Test 15: HRR Handshake
|
||||
$proxy->clear();
|
||||
$proxy->serverflags("-curves P-256");
|
||||
$proxy->start();
|
||||
@@ -315,7 +370,7 @@ checkhandshake($proxy, checkhandshake::HRR_HANDSHAKE,
|
||||
| checkhandshake::KEY_SHARE_HRR_EXTENSION,
|
||||
"HRR handshake test");
|
||||
|
||||
#Test 15: Resumption handshake with HRR
|
||||
#Test 16: Resumption handshake with HRR
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-sess_in ".$session);
|
||||
$proxy->serverflags("-curves P-256");
|
||||
@@ -327,7 +382,7 @@ checkhandshake($proxy, checkhandshake::HRR_RESUME_HANDSHAKE,
|
||||
| checkhandshake::PSK_SRV_EXTENSION),
|
||||
"Resumption handshake with HRR test");
|
||||
|
||||
#Test 16: Acceptable but non preferred key_share
|
||||
#Test 17: Acceptable but non preferred key_share
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-curves P-256");
|
||||
$proxy->start();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
use OpenSSL::Test::Utils;
|
||||
use OpenSSL::Test qw/:DEFAULT srctop_file/;
|
||||
use OpenSSL::Test qw/:DEFAULT srctop_file srctop_dir/;
|
||||
use File::Temp qw(tempfile);
|
||||
|
||||
setup("test_sslapi");
|
||||
@@ -20,8 +20,7 @@ plan tests => 1;
|
||||
|
||||
(undef, my $tmpfilename) = tempfile();
|
||||
|
||||
ok(run(test(["sslapitest", srctop_file("apps", "server.pem"),
|
||||
srctop_file("apps", "server.pem"),
|
||||
ok(run(test(["sslapitest", srctop_dir("test", "certs"),
|
||||
srctop_file("test", "recipes", "90-test_sslapi_data",
|
||||
"passwd.txt"), $tmpfilename])),
|
||||
"running sslapitest");
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
use OpenSSL::Test;
|
||||
use OpenSSL::Test::Utils;
|
||||
use OpenSSL::Test qw/:DEFAULT data_file srctop_file/;
|
||||
use OpenSSL::Test qw/:DEFAULT data_file srctop_file bldtop_dir/;
|
||||
|
||||
setup("test_external_krb5");
|
||||
|
||||
@@ -20,4 +20,6 @@ plan skip_all => "krb5 not available"
|
||||
|
||||
plan tests => 1;
|
||||
|
||||
$ENV{OPENSSL_CONF} = srctop_file("test", "default-and-legacy.cnf");
|
||||
|
||||
ok(run(cmd([data_file("krb5.sh")])), "running krb5 tests");
|
||||
+156
-57
@@ -10,8 +10,10 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
# Recognise VERBOSE and V which is common on other projects.
|
||||
# Additionally, also recognise VERBOSE_FAILURE and VF.
|
||||
BEGIN {
|
||||
$ENV{HARNESS_VERBOSE} = "yes" if $ENV{VERBOSE} || $ENV{V};
|
||||
$ENV{HARNESS_VERBOSE_FAILURE} = "yes" if $ENV{VERBOSE_FAILURE} || $ENV{VF};
|
||||
}
|
||||
|
||||
use File::Spec::Functions qw/catdir catfile curdir abs2rel rel2abs/;
|
||||
@@ -20,9 +22,6 @@ use FindBin;
|
||||
use lib "$FindBin::Bin/../util/perl";
|
||||
use OpenSSL::Glob;
|
||||
|
||||
my $TAP_Harness = eval { require TAP::Harness } ? "TAP::Harness"
|
||||
: "OpenSSL::TAP::Harness";
|
||||
|
||||
my $srctop = $ENV{SRCTOP} || $ENV{TOP};
|
||||
my $bldtop = $ENV{BLDTOP} || $ENV{TOP};
|
||||
my $recipesdir = catdir($srctop, "test", "recipes");
|
||||
@@ -31,12 +30,25 @@ my $libdir = rel2abs(catdir($srctop, "util", "perl"));
|
||||
$ENV{OPENSSL_CONF} = catdir($srctop, "apps", "openssl.cnf");
|
||||
|
||||
my %tapargs =
|
||||
( verbosity => $ENV{VERBOSE} || $ENV{V} || $ENV{HARNESS_VERBOSE} ? 1 : 0,
|
||||
lib => [ $libdir ],
|
||||
switches => '-w',
|
||||
merge => 1
|
||||
( verbosity => $ENV{HARNESS_VERBOSE} ? 1 : 0,
|
||||
lib => [ $libdir ],
|
||||
switches => '-w',
|
||||
merge => 1,
|
||||
);
|
||||
|
||||
# Additional OpenSSL special TAP arguments. Because we can't pass them via
|
||||
# TAP::Harness->new(), they will be accessed directly, see the
|
||||
# TAP::Parser::OpenSSL implementation further down
|
||||
my %openssl_args = ();
|
||||
|
||||
$openssl_args{'failure_verbosity'} =
|
||||
$ENV{HARNESS_VERBOSE_FAILURE} && $tapargs{verbosity} < 1 ? 1 : 0;
|
||||
|
||||
my $outfilename = $ENV{HARNESS_TAP_COPY};
|
||||
open $openssl_args{'tap_copy'}, ">$outfilename"
|
||||
or die "Trying to create $outfilename: $!\n"
|
||||
if defined $outfilename;
|
||||
|
||||
my @alltests = find_matching_tests("*");
|
||||
my %tests = ();
|
||||
|
||||
@@ -52,7 +64,7 @@ foreach my $arg (@ARGV ? @ARGV : ('alltests')) {
|
||||
if ($arg eq 'alltests') {
|
||||
warn "'alltests' encountered, ignoring everything before that...\n"
|
||||
unless $initial_arg;
|
||||
%tests = map { $_ => 1 } @alltests;
|
||||
%tests = map { $_ => basename($_) } @alltests;
|
||||
} elsif ($arg =~ m/^(-?)(.*)/) {
|
||||
my $sign = $1;
|
||||
my $test = $2;
|
||||
@@ -60,7 +72,7 @@ foreach my $arg (@ARGV ? @ARGV : ('alltests')) {
|
||||
|
||||
# If '-foo' is the first arg, it's short for 'alltests -foo'
|
||||
if ($sign eq '-' && $initial_arg) {
|
||||
%tests = map { $_ => 1 } @alltests;
|
||||
%tests = map { $_ => basename($_) } @alltests;
|
||||
}
|
||||
|
||||
if (scalar @matches == 0) {
|
||||
@@ -72,7 +84,7 @@ foreach my $arg (@ARGV ? @ARGV : ('alltests')) {
|
||||
if ($sign eq '-') {
|
||||
delete $tests{$test};
|
||||
} else {
|
||||
$tests{$test} = 1;
|
||||
$tests{$test} = basename($test);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,9 +95,140 @@ foreach my $arg (@ARGV ? @ARGV : ('alltests')) {
|
||||
$initial_arg = 0;
|
||||
}
|
||||
|
||||
my $harness = $TAP_Harness->new(\%tapargs);
|
||||
my $ret = $harness->runtests(map { abs2rel($_, rel2abs(curdir())); }
|
||||
sort keys %tests);
|
||||
sub find_matching_tests {
|
||||
my ($glob) = @_;
|
||||
|
||||
if ($glob =~ m|^[\d\[\]\?\-]+$|) {
|
||||
return glob(catfile($recipesdir,"$glob-*.t"));
|
||||
}
|
||||
return glob(catfile($recipesdir,"*-$glob.t"));
|
||||
}
|
||||
|
||||
# The following is quite a bit of hackery to adapt to both TAP::Harness
|
||||
# and Test::Harness, depending on what's available.
|
||||
# The TAP::Harness hack allows support for HARNESS_VERBOSE_FAILURE and
|
||||
# HARNESS_TAP_COPY, while the Test::Harness hack can't, because the pre
|
||||
# TAP::Harness Test::Harness simply doesn't have support for this sort of
|
||||
# thing.
|
||||
#
|
||||
# We use eval to avoid undue interruption if TAP::Harness isn't present.
|
||||
|
||||
my $package;
|
||||
my $eres;
|
||||
|
||||
$eres = eval {
|
||||
package TAP::Parser::OpenSSL;
|
||||
use parent 'TAP::Parser';
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my %opts = %{ shift() };
|
||||
|
||||
# We rely heavily on perl closures to make failure verbosity work
|
||||
# We need to do so, because there's no way to safely pass extra
|
||||
# objects down all the way to the TAP::Parser::Result object
|
||||
my @failure_output = ();
|
||||
my %callbacks = ();
|
||||
if ($openssl_args{failure_verbosity}
|
||||
|| defined $openssl_args{tap_copy}) {
|
||||
$callbacks{ALL} = sub {
|
||||
my $self = shift;
|
||||
my $fh = $openssl_args{tap_copy};
|
||||
|
||||
print $fh $self->as_string, "\n"
|
||||
if defined $fh;
|
||||
push @failure_output, $self->as_string
|
||||
if $openssl_args{failure_verbosity} > 0;
|
||||
};
|
||||
}
|
||||
|
||||
if ($openssl_args{failure_verbosity} > 0) {
|
||||
$callbacks{EOF} = sub {
|
||||
my $self = shift;
|
||||
|
||||
# We know we are a TAP::Parser::Aggregator object
|
||||
if (scalar $self->failed > 0 && @failure_output) {
|
||||
# We add an extra empty line, because in the case of a
|
||||
# progress counter, we're still at the end of that progress
|
||||
# line.
|
||||
print $_, "\n" foreach (("", @failure_output));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (keys %callbacks) {
|
||||
# If %opts already has a callbacks element, the order here
|
||||
# ensures we do not override it
|
||||
%opts = ( callbacks => { %callbacks }, %opts );
|
||||
}
|
||||
|
||||
return $class->SUPER::new({ %opts });
|
||||
}
|
||||
|
||||
package TAP::Harness::OpenSSL;
|
||||
use parent 'TAP::Harness';
|
||||
|
||||
package main;
|
||||
|
||||
$tapargs{parser_class} = "TAP::Parser::OpenSSL";
|
||||
$package = 'TAP::Harness::OpenSSL';
|
||||
};
|
||||
|
||||
unless (defined $eres) {
|
||||
$eres = eval {
|
||||
# Fake TAP::Harness in case it's not loaded
|
||||
package TAP::Harness::fake;
|
||||
use parent 'Test::Harness';
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my %args = %{ shift() };
|
||||
|
||||
return bless { %args }, $class;
|
||||
}
|
||||
|
||||
sub runtests {
|
||||
my $self = shift;
|
||||
|
||||
# Pre TAP::Harness Test::Harness doesn't support [ filename, name ]
|
||||
# elements, so convert such elements to just be the filename
|
||||
my @args = map { ref($_) eq 'ARRAY' ? $_->[0] : $_ } @_;
|
||||
|
||||
my @switches = ();
|
||||
if ($self->{switches}) {
|
||||
push @switches, $self->{switches};
|
||||
}
|
||||
if ($self->{lib}) {
|
||||
foreach (@{$self->{lib}}) {
|
||||
my $l = $_;
|
||||
|
||||
# It seems that $switches is getting interpreted with 'eval'
|
||||
# or something like that, and that we need to take care of
|
||||
# backslashes or they will disappear along the way.
|
||||
$l =~ s|\\|\\\\|g if $^O eq "MSWin32";
|
||||
push @switches, "-I$l";
|
||||
}
|
||||
}
|
||||
|
||||
$Test::Harness::switches = join(' ', @switches);
|
||||
Test::Harness::runtests(@args);
|
||||
}
|
||||
|
||||
package main;
|
||||
$package = 'TAP::Harness::fake';
|
||||
};
|
||||
}
|
||||
|
||||
unless (defined $eres) {
|
||||
print $@,"\n" if $@;
|
||||
print $!,"\n" if $!;
|
||||
exit 127;
|
||||
}
|
||||
|
||||
my $harness = $package->new(\%tapargs);
|
||||
my $ret =
|
||||
$harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), $tests{$_} ] }
|
||||
sort keys %tests);
|
||||
|
||||
# $ret->has_errors may be any number, not just 0 or 1. On VMS, numbers
|
||||
# from 2 and on are used as is as VMS statuses, which has severity encoded
|
||||
@@ -97,47 +240,3 @@ exit !!$ret->has_errors if (ref($ret) eq "TAP::Parser::Aggregator");
|
||||
# If this isn't a TAP::Parser::Aggregator, it's the pre-TAP test harness,
|
||||
# which simply dies at the end if any test failed, so we don't need to bother
|
||||
# with any exit code in that case.
|
||||
|
||||
sub find_matching_tests {
|
||||
my ($glob) = @_;
|
||||
|
||||
if ($glob =~ m|^[\d\[\]\?\-]+$|) {
|
||||
return glob(catfile($recipesdir,"$glob-*.t"));
|
||||
}
|
||||
return glob(catfile($recipesdir,"*-$glob.t"));
|
||||
}
|
||||
|
||||
|
||||
# Fake TAP::Harness in case it's not loaded
|
||||
use Test::Harness;
|
||||
package OpenSSL::TAP::Harness;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my %args = %{ shift() };
|
||||
|
||||
return bless { %args }, $class;
|
||||
}
|
||||
|
||||
sub runtests {
|
||||
my $self = shift;
|
||||
|
||||
my @switches = ();
|
||||
if ($self->{switches}) {
|
||||
push @switches, $self->{switches};
|
||||
}
|
||||
if ($self->{lib}) {
|
||||
foreach (@{$self->{lib}}) {
|
||||
my $l = $_;
|
||||
|
||||
# It seems that $switches is getting interpreted with 'eval' or
|
||||
# something like that, and that we need to take care of backslashes
|
||||
# or they will disappear along the way.
|
||||
$l =~ s|\\|\\\\|g if $^O eq "MSWin32";
|
||||
push @switches, "-I$l";
|
||||
}
|
||||
}
|
||||
|
||||
$Test::Harness::switches = join(' ', @switches);
|
||||
Test::Harness::runtests(@_);
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <openssl/err.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "../ssl/packet_locl.h"
|
||||
#include "internal/packet.h"
|
||||
|
||||
#include "testutil.h"
|
||||
#include "internal/nelem.h"
|
||||
|
||||
@@ -122,7 +122,7 @@ static void leaf_check_all(ossl_uintmax_t n, char *value, void *arg)
|
||||
doall_data->res = 1;
|
||||
return;
|
||||
}
|
||||
TEST_error("Index %zu with value %s not found", n, value);
|
||||
TEST_error("Index %ju with value %s not found", n, value);
|
||||
}
|
||||
|
||||
static void leaf_delete(ossl_uintmax_t n, char *value, void *arg)
|
||||
@@ -138,7 +138,7 @@ static void leaf_delete(ossl_uintmax_t n, char *value, void *arg)
|
||||
ossl_sa_char_set(doall_data->sa, n, NULL);
|
||||
return;
|
||||
}
|
||||
TEST_error("Index %zu with value %s not found", n, value);
|
||||
TEST_error("Index %ju with value %s not found", n, value);
|
||||
}
|
||||
|
||||
static int test_sparse_array_doall(void)
|
||||
|
||||
+503
-367
@@ -1,6 +1,6 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 51
|
||||
num_tests = 56
|
||||
|
||||
test-0 = 0-ECDSA CipherString Selection
|
||||
test-1 = 1-ECDSA CipherString Selection
|
||||
@@ -24,35 +24,40 @@ test-18 = 18-RSA-PSS Signature Algorithm Selection
|
||||
test-19 = 19-RSA-PSS Certificate Legacy Signature Algorithm Selection
|
||||
test-20 = 20-RSA-PSS Certificate Unified Signature Algorithm Selection
|
||||
test-21 = 21-Only RSA-PSS Certificate
|
||||
test-22 = 22-RSA-PSS Certificate, no PSS signature algorithms
|
||||
test-23 = 23-RSA key exchange with all RSA certificate types
|
||||
test-24 = 24-RSA key exchange with only RSA-PSS certificate
|
||||
test-25 = 25-Suite B P-256 Hash Algorithm Selection
|
||||
test-26 = 26-Suite B P-384 Hash Algorithm Selection
|
||||
test-27 = 27-TLS 1.2 Ed25519 Client Auth
|
||||
test-28 = 28-TLS 1.2 Ed448 Client Auth
|
||||
test-29 = 29-Only RSA-PSS Certificate, TLS v1.1
|
||||
test-30 = 30-TLS 1.3 ECDSA Signature Algorithm Selection
|
||||
test-31 = 31-TLS 1.3 ECDSA Signature Algorithm Selection compressed point
|
||||
test-32 = 32-TLS 1.3 ECDSA Signature Algorithm Selection SHA1
|
||||
test-33 = 33-TLS 1.3 ECDSA Signature Algorithm Selection with PSS
|
||||
test-34 = 34-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS
|
||||
test-35 = 35-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate
|
||||
test-36 = 36-TLS 1.3 RSA Signature Algorithm Selection, no PSS
|
||||
test-37 = 37-TLS 1.3 RSA-PSS Signature Algorithm Selection
|
||||
test-38 = 38-TLS 1.3 Ed25519 Signature Algorithm Selection
|
||||
test-39 = 39-TLS 1.3 Ed448 Signature Algorithm Selection
|
||||
test-40 = 40-TLS 1.3 Ed25519 CipherString and Groups Selection
|
||||
test-41 = 41-TLS 1.3 Ed448 CipherString and Groups Selection
|
||||
test-42 = 42-TLS 1.3 RSA Client Auth Signature Algorithm Selection
|
||||
test-43 = 43-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names
|
||||
test-44 = 44-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection
|
||||
test-45 = 45-TLS 1.3 Ed25519 Client Auth
|
||||
test-46 = 46-TLS 1.3 Ed448 Client Auth
|
||||
test-47 = 47-TLS 1.3 ECDSA with brainpool
|
||||
test-48 = 48-TLS 1.2 DSA Certificate Test
|
||||
test-49 = 49-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms
|
||||
test-50 = 50-TLS 1.3 DSA Certificate Test
|
||||
test-22 = 22-Only RSA-PSS Certificate Valid Signature Algorithms
|
||||
test-23 = 23-RSA-PSS Certificate, no PSS signature algorithms
|
||||
test-24 = 24-Only RSA-PSS Restricted Certificate
|
||||
test-25 = 25-RSA-PSS Restricted Certificate Valid Signature Algorithms
|
||||
test-26 = 26-RSA-PSS Restricted Cert client prefers invalid Signature Algorithm
|
||||
test-27 = 27-RSA-PSS Restricted Certificate Invalid Signature Algorithms
|
||||
test-28 = 28-RSA key exchange with all RSA certificate types
|
||||
test-29 = 29-RSA key exchange with only RSA-PSS certificate
|
||||
test-30 = 30-Suite B P-256 Hash Algorithm Selection
|
||||
test-31 = 31-Suite B P-384 Hash Algorithm Selection
|
||||
test-32 = 32-TLS 1.2 Ed25519 Client Auth
|
||||
test-33 = 33-TLS 1.2 Ed448 Client Auth
|
||||
test-34 = 34-Only RSA-PSS Certificate, TLS v1.1
|
||||
test-35 = 35-TLS 1.3 ECDSA Signature Algorithm Selection
|
||||
test-36 = 36-TLS 1.3 ECDSA Signature Algorithm Selection compressed point
|
||||
test-37 = 37-TLS 1.3 ECDSA Signature Algorithm Selection SHA1
|
||||
test-38 = 38-TLS 1.3 ECDSA Signature Algorithm Selection with PSS
|
||||
test-39 = 39-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS
|
||||
test-40 = 40-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate
|
||||
test-41 = 41-TLS 1.3 RSA Signature Algorithm Selection, no PSS
|
||||
test-42 = 42-TLS 1.3 RSA-PSS Signature Algorithm Selection
|
||||
test-43 = 43-TLS 1.3 Ed25519 Signature Algorithm Selection
|
||||
test-44 = 44-TLS 1.3 Ed448 Signature Algorithm Selection
|
||||
test-45 = 45-TLS 1.3 Ed25519 CipherString and Groups Selection
|
||||
test-46 = 46-TLS 1.3 Ed448 CipherString and Groups Selection
|
||||
test-47 = 47-TLS 1.3 RSA Client Auth Signature Algorithm Selection
|
||||
test-48 = 48-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names
|
||||
test-49 = 49-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection
|
||||
test-50 = 50-TLS 1.3 Ed25519 Client Auth
|
||||
test-51 = 51-TLS 1.3 Ed448 Client Auth
|
||||
test-52 = 52-TLS 1.3 ECDSA with brainpool
|
||||
test-53 = 53-TLS 1.2 DSA Certificate Test
|
||||
test-54 = 54-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms
|
||||
test-55 = 55-TLS 1.3 DSA Certificate Test
|
||||
# ===========================================================
|
||||
|
||||
[0-ECDSA CipherString Selection]
|
||||
@@ -775,235 +780,366 @@ ExpectedServerSignType = RSA-PSS
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[22-RSA-PSS Certificate, no PSS signature algorithms]
|
||||
ssl_conf = 22-RSA-PSS Certificate, no PSS signature algorithms-ssl
|
||||
[22-Only RSA-PSS Certificate Valid Signature Algorithms]
|
||||
ssl_conf = 22-Only RSA-PSS Certificate Valid Signature Algorithms-ssl
|
||||
|
||||
[22-RSA-PSS Certificate, no PSS signature algorithms-ssl]
|
||||
server = 22-RSA-PSS Certificate, no PSS signature algorithms-server
|
||||
client = 22-RSA-PSS Certificate, no PSS signature algorithms-client
|
||||
[22-Only RSA-PSS Certificate Valid Signature Algorithms-ssl]
|
||||
server = 22-Only RSA-PSS Certificate Valid Signature Algorithms-server
|
||||
client = 22-Only RSA-PSS Certificate Valid Signature Algorithms-client
|
||||
|
||||
[22-RSA-PSS Certificate, no PSS signature algorithms-server]
|
||||
[22-Only RSA-PSS Certificate Valid Signature Algorithms-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-key.pem
|
||||
|
||||
[22-RSA-PSS Certificate, no PSS signature algorithms-client]
|
||||
[22-Only RSA-PSS Certificate Valid Signature Algorithms-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = rsa_pss_pss_sha512
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-22]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = RSA-PSS
|
||||
ExpectedServerSignHash = SHA512
|
||||
ExpectedServerSignType = RSA-PSS
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[23-RSA-PSS Certificate, no PSS signature algorithms]
|
||||
ssl_conf = 23-RSA-PSS Certificate, no PSS signature algorithms-ssl
|
||||
|
||||
[23-RSA-PSS Certificate, no PSS signature algorithms-ssl]
|
||||
server = 23-RSA-PSS Certificate, no PSS signature algorithms-server
|
||||
client = 23-RSA-PSS Certificate, no PSS signature algorithms-client
|
||||
|
||||
[23-RSA-PSS Certificate, no PSS signature algorithms-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-key.pem
|
||||
|
||||
[23-RSA-PSS Certificate, no PSS signature algorithms-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = RSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-22]
|
||||
[test-23]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[23-RSA key exchange with all RSA certificate types]
|
||||
ssl_conf = 23-RSA key exchange with all RSA certificate types-ssl
|
||||
[24-Only RSA-PSS Restricted Certificate]
|
||||
ssl_conf = 24-Only RSA-PSS Restricted Certificate-ssl
|
||||
|
||||
[23-RSA key exchange with all RSA certificate types-ssl]
|
||||
server = 23-RSA key exchange with all RSA certificate types-server
|
||||
client = 23-RSA key exchange with all RSA certificate types-client
|
||||
[24-Only RSA-PSS Restricted Certificate-ssl]
|
||||
server = 24-Only RSA-PSS Restricted Certificate-server
|
||||
client = 24-Only RSA-PSS Restricted Certificate-client
|
||||
|
||||
[23-RSA key exchange with all RSA certificate types-server]
|
||||
[24-Only RSA-PSS Restricted Certificate-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-restrict-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-restrict-key.pem
|
||||
|
||||
[24-Only RSA-PSS Restricted Certificate-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-24]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = RSA-PSS
|
||||
ExpectedServerSignHash = SHA256
|
||||
ExpectedServerSignType = RSA-PSS
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[25-RSA-PSS Restricted Certificate Valid Signature Algorithms]
|
||||
ssl_conf = 25-RSA-PSS Restricted Certificate Valid Signature Algorithms-ssl
|
||||
|
||||
[25-RSA-PSS Restricted Certificate Valid Signature Algorithms-ssl]
|
||||
server = 25-RSA-PSS Restricted Certificate Valid Signature Algorithms-server
|
||||
client = 25-RSA-PSS Restricted Certificate Valid Signature Algorithms-client
|
||||
|
||||
[25-RSA-PSS Restricted Certificate Valid Signature Algorithms-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-restrict-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-restrict-key.pem
|
||||
|
||||
[25-RSA-PSS Restricted Certificate Valid Signature Algorithms-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = rsa_pss_pss_sha256:rsa_pss_pss_sha512
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-25]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = RSA-PSS
|
||||
ExpectedServerSignHash = SHA256
|
||||
ExpectedServerSignType = RSA-PSS
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[26-RSA-PSS Restricted Cert client prefers invalid Signature Algorithm]
|
||||
ssl_conf = 26-RSA-PSS Restricted Cert client prefers invalid Signature Algorithm-ssl
|
||||
|
||||
[26-RSA-PSS Restricted Cert client prefers invalid Signature Algorithm-ssl]
|
||||
server = 26-RSA-PSS Restricted Cert client prefers invalid Signature Algorithm-server
|
||||
client = 26-RSA-PSS Restricted Cert client prefers invalid Signature Algorithm-client
|
||||
|
||||
[26-RSA-PSS Restricted Cert client prefers invalid Signature Algorithm-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-restrict-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-restrict-key.pem
|
||||
|
||||
[26-RSA-PSS Restricted Cert client prefers invalid Signature Algorithm-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = rsa_pss_pss_sha512:rsa_pss_pss_sha256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-26]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = RSA-PSS
|
||||
ExpectedServerSignHash = SHA256
|
||||
ExpectedServerSignType = RSA-PSS
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[27-RSA-PSS Restricted Certificate Invalid Signature Algorithms]
|
||||
ssl_conf = 27-RSA-PSS Restricted Certificate Invalid Signature Algorithms-ssl
|
||||
|
||||
[27-RSA-PSS Restricted Certificate Invalid Signature Algorithms-ssl]
|
||||
server = 27-RSA-PSS Restricted Certificate Invalid Signature Algorithms-server
|
||||
client = 27-RSA-PSS Restricted Certificate Invalid Signature Algorithms-client
|
||||
|
||||
[27-RSA-PSS Restricted Certificate Invalid Signature Algorithms-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-restrict-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-restrict-key.pem
|
||||
|
||||
[27-RSA-PSS Restricted Certificate Invalid Signature Algorithms-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = rsa_pss_pss_sha512
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-27]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[28-RSA key exchange with all RSA certificate types]
|
||||
ssl_conf = 28-RSA key exchange with all RSA certificate types-ssl
|
||||
|
||||
[28-RSA key exchange with all RSA certificate types-ssl]
|
||||
server = 28-RSA key exchange with all RSA certificate types-server
|
||||
client = 28-RSA key exchange with all RSA certificate types-client
|
||||
|
||||
[28-RSA key exchange with all RSA certificate types-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PSS.Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-cert.pem
|
||||
PSS.PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-key.pem
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[23-RSA key exchange with all RSA certificate types-client]
|
||||
[28-RSA key exchange with all RSA certificate types-client]
|
||||
CipherString = kRSA
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-23]
|
||||
[test-28]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = RSA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[24-RSA key exchange with only RSA-PSS certificate]
|
||||
ssl_conf = 24-RSA key exchange with only RSA-PSS certificate-ssl
|
||||
[29-RSA key exchange with only RSA-PSS certificate]
|
||||
ssl_conf = 29-RSA key exchange with only RSA-PSS certificate-ssl
|
||||
|
||||
[24-RSA key exchange with only RSA-PSS certificate-ssl]
|
||||
server = 24-RSA key exchange with only RSA-PSS certificate-server
|
||||
client = 24-RSA key exchange with only RSA-PSS certificate-client
|
||||
[29-RSA key exchange with only RSA-PSS certificate-ssl]
|
||||
server = 29-RSA key exchange with only RSA-PSS certificate-server
|
||||
client = 29-RSA key exchange with only RSA-PSS certificate-client
|
||||
|
||||
[24-RSA key exchange with only RSA-PSS certificate-server]
|
||||
[29-RSA key exchange with only RSA-PSS certificate-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-key.pem
|
||||
|
||||
[24-RSA key exchange with only RSA-PSS certificate-client]
|
||||
[29-RSA key exchange with only RSA-PSS certificate-client]
|
||||
CipherString = kRSA
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-24]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[25-Suite B P-256 Hash Algorithm Selection]
|
||||
ssl_conf = 25-Suite B P-256 Hash Algorithm Selection-ssl
|
||||
|
||||
[25-Suite B P-256 Hash Algorithm Selection-ssl]
|
||||
server = 25-Suite B P-256 Hash Algorithm Selection-server
|
||||
client = 25-Suite B P-256 Hash Algorithm Selection-client
|
||||
|
||||
[25-Suite B P-256 Hash Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = SUITEB128
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/p256-server-cert.pem
|
||||
ECDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/p256-server-key.pem
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[25-Suite B P-256 Hash Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA384:ECDSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/p384-root.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-25]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = P-256
|
||||
ExpectedServerSignHash = SHA256
|
||||
ExpectedServerSignType = EC
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[26-Suite B P-384 Hash Algorithm Selection]
|
||||
ssl_conf = 26-Suite B P-384 Hash Algorithm Selection-ssl
|
||||
|
||||
[26-Suite B P-384 Hash Algorithm Selection-ssl]
|
||||
server = 26-Suite B P-384 Hash Algorithm Selection-server
|
||||
client = 26-Suite B P-384 Hash Algorithm Selection-client
|
||||
|
||||
[26-Suite B P-384 Hash Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = SUITEB128
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/p384-server-cert.pem
|
||||
ECDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/p384-server-key.pem
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[26-Suite B P-384 Hash Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA256:ECDSA+SHA384
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/p384-root.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-26]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = P-384
|
||||
ExpectedServerSignHash = SHA384
|
||||
ExpectedServerSignType = EC
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[27-TLS 1.2 Ed25519 Client Auth]
|
||||
ssl_conf = 27-TLS 1.2 Ed25519 Client Auth-ssl
|
||||
|
||||
[27-TLS 1.2 Ed25519 Client Auth-ssl]
|
||||
server = 27-TLS 1.2 Ed25519 Client Auth-server
|
||||
client = 27-TLS 1.2 Ed25519 Client Auth-client
|
||||
|
||||
[27-TLS 1.2 Ed25519 Client Auth-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[27-TLS 1.2 Ed25519 Client Auth-client]
|
||||
CipherString = DEFAULT
|
||||
Ed25519.Certificate = ${ENV::TEST_CERTS_DIR}/client-ed25519-cert.pem
|
||||
Ed25519.PrivateKey = ${ENV::TEST_CERTS_DIR}/client-ed25519-key.pem
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-27]
|
||||
ExpectedClientCertType = Ed25519
|
||||
ExpectedClientSignType = Ed25519
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[28-TLS 1.2 Ed448 Client Auth]
|
||||
ssl_conf = 28-TLS 1.2 Ed448 Client Auth-ssl
|
||||
|
||||
[28-TLS 1.2 Ed448 Client Auth-ssl]
|
||||
server = 28-TLS 1.2 Ed448 Client Auth-server
|
||||
client = 28-TLS 1.2 Ed448 Client Auth-client
|
||||
|
||||
[28-TLS 1.2 Ed448 Client Auth-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[28-TLS 1.2 Ed448 Client Auth-client]
|
||||
CipherString = DEFAULT
|
||||
Ed448.Certificate = ${ENV::TEST_CERTS_DIR}/client-ed448-cert.pem
|
||||
Ed448.PrivateKey = ${ENV::TEST_CERTS_DIR}/client-ed448-key.pem
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-28]
|
||||
ExpectedClientCertType = Ed448
|
||||
ExpectedClientSignType = Ed448
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[29-Only RSA-PSS Certificate, TLS v1.1]
|
||||
ssl_conf = 29-Only RSA-PSS Certificate, TLS v1.1-ssl
|
||||
|
||||
[29-Only RSA-PSS Certificate, TLS v1.1-ssl]
|
||||
server = 29-Only RSA-PSS Certificate, TLS v1.1-server
|
||||
client = 29-Only RSA-PSS Certificate, TLS v1.1-client
|
||||
|
||||
[29-Only RSA-PSS Certificate, TLS v1.1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-key.pem
|
||||
|
||||
[29-Only RSA-PSS Certificate, TLS v1.1-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-29]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[30-TLS 1.3 ECDSA Signature Algorithm Selection]
|
||||
ssl_conf = 30-TLS 1.3 ECDSA Signature Algorithm Selection-ssl
|
||||
[30-Suite B P-256 Hash Algorithm Selection]
|
||||
ssl_conf = 30-Suite B P-256 Hash Algorithm Selection-ssl
|
||||
|
||||
[30-TLS 1.3 ECDSA Signature Algorithm Selection-ssl]
|
||||
server = 30-TLS 1.3 ECDSA Signature Algorithm Selection-server
|
||||
client = 30-TLS 1.3 ECDSA Signature Algorithm Selection-client
|
||||
[30-Suite B P-256 Hash Algorithm Selection-ssl]
|
||||
server = 30-Suite B P-256 Hash Algorithm Selection-server
|
||||
client = 30-Suite B P-256 Hash Algorithm Selection-client
|
||||
|
||||
[30-TLS 1.3 ECDSA Signature Algorithm Selection-server]
|
||||
[30-Suite B P-256 Hash Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = SUITEB128
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/p256-server-cert.pem
|
||||
ECDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/p256-server-key.pem
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[30-Suite B P-256 Hash Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA384:ECDSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/p384-root.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-30]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = P-256
|
||||
ExpectedServerSignHash = SHA256
|
||||
ExpectedServerSignType = EC
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[31-Suite B P-384 Hash Algorithm Selection]
|
||||
ssl_conf = 31-Suite B P-384 Hash Algorithm Selection-ssl
|
||||
|
||||
[31-Suite B P-384 Hash Algorithm Selection-ssl]
|
||||
server = 31-Suite B P-384 Hash Algorithm Selection-server
|
||||
client = 31-Suite B P-384 Hash Algorithm Selection-client
|
||||
|
||||
[31-Suite B P-384 Hash Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = SUITEB128
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/p384-server-cert.pem
|
||||
ECDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/p384-server-key.pem
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[31-Suite B P-384 Hash Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA256:ECDSA+SHA384
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/p384-root.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-31]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = P-384
|
||||
ExpectedServerSignHash = SHA384
|
||||
ExpectedServerSignType = EC
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[32-TLS 1.2 Ed25519 Client Auth]
|
||||
ssl_conf = 32-TLS 1.2 Ed25519 Client Auth-ssl
|
||||
|
||||
[32-TLS 1.2 Ed25519 Client Auth-ssl]
|
||||
server = 32-TLS 1.2 Ed25519 Client Auth-server
|
||||
client = 32-TLS 1.2 Ed25519 Client Auth-client
|
||||
|
||||
[32-TLS 1.2 Ed25519 Client Auth-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[32-TLS 1.2 Ed25519 Client Auth-client]
|
||||
CipherString = DEFAULT
|
||||
Ed25519.Certificate = ${ENV::TEST_CERTS_DIR}/client-ed25519-cert.pem
|
||||
Ed25519.PrivateKey = ${ENV::TEST_CERTS_DIR}/client-ed25519-key.pem
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-32]
|
||||
ExpectedClientCertType = Ed25519
|
||||
ExpectedClientSignType = Ed25519
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[33-TLS 1.2 Ed448 Client Auth]
|
||||
ssl_conf = 33-TLS 1.2 Ed448 Client Auth-ssl
|
||||
|
||||
[33-TLS 1.2 Ed448 Client Auth-ssl]
|
||||
server = 33-TLS 1.2 Ed448 Client Auth-server
|
||||
client = 33-TLS 1.2 Ed448 Client Auth-client
|
||||
|
||||
[33-TLS 1.2 Ed448 Client Auth-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[33-TLS 1.2 Ed448 Client Auth-client]
|
||||
CipherString = DEFAULT
|
||||
Ed448.Certificate = ${ENV::TEST_CERTS_DIR}/client-ed448-cert.pem
|
||||
Ed448.PrivateKey = ${ENV::TEST_CERTS_DIR}/client-ed448-key.pem
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-33]
|
||||
ExpectedClientCertType = Ed448
|
||||
ExpectedClientSignType = Ed448
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[34-Only RSA-PSS Certificate, TLS v1.1]
|
||||
ssl_conf = 34-Only RSA-PSS Certificate, TLS v1.1-ssl
|
||||
|
||||
[34-Only RSA-PSS Certificate, TLS v1.1-ssl]
|
||||
server = 34-Only RSA-PSS Certificate, TLS v1.1-server
|
||||
client = 34-Only RSA-PSS Certificate, TLS v1.1-client
|
||||
|
||||
[34-Only RSA-PSS Certificate, TLS v1.1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-pss-cert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-pss-key.pem
|
||||
|
||||
[34-Only RSA-PSS Certificate, TLS v1.1-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-34]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[35-TLS 1.3 ECDSA Signature Algorithm Selection]
|
||||
ssl_conf = 35-TLS 1.3 ECDSA Signature Algorithm Selection-ssl
|
||||
|
||||
[35-TLS 1.3 ECDSA Signature Algorithm Selection-ssl]
|
||||
server = 35-TLS 1.3 ECDSA Signature Algorithm Selection-server
|
||||
client = 35-TLS 1.3 ECDSA Signature Algorithm Selection-client
|
||||
|
||||
[35-TLS 1.3 ECDSA Signature Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1016,13 +1152,13 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[30-TLS 1.3 ECDSA Signature Algorithm Selection-client]
|
||||
[35-TLS 1.3 ECDSA Signature Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-30]
|
||||
[test-35]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCANames = empty
|
||||
ExpectedServerCertType = P-256
|
||||
@@ -1032,14 +1168,14 @@ ExpectedServerSignType = EC
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[31-TLS 1.3 ECDSA Signature Algorithm Selection compressed point]
|
||||
ssl_conf = 31-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-ssl
|
||||
[36-TLS 1.3 ECDSA Signature Algorithm Selection compressed point]
|
||||
ssl_conf = 36-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-ssl
|
||||
|
||||
[31-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-ssl]
|
||||
server = 31-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-server
|
||||
client = 31-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-client
|
||||
[36-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-ssl]
|
||||
server = 36-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-server
|
||||
client = 36-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-client
|
||||
|
||||
[31-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-server]
|
||||
[36-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-cecdsa-cert.pem
|
||||
@@ -1048,13 +1184,13 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[31-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-client]
|
||||
[36-TLS 1.3 ECDSA Signature Algorithm Selection compressed point-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-31]
|
||||
[test-36]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCANames = empty
|
||||
ExpectedServerCertType = P-256
|
||||
@@ -1064,14 +1200,14 @@ ExpectedServerSignType = EC
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[32-TLS 1.3 ECDSA Signature Algorithm Selection SHA1]
|
||||
ssl_conf = 32-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-ssl
|
||||
[37-TLS 1.3 ECDSA Signature Algorithm Selection SHA1]
|
||||
ssl_conf = 37-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-ssl
|
||||
|
||||
[32-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-ssl]
|
||||
server = 32-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-server
|
||||
client = 32-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-client
|
||||
[37-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-ssl]
|
||||
server = 37-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-server
|
||||
client = 37-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-client
|
||||
|
||||
[32-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-server]
|
||||
[37-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1084,26 +1220,26 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[32-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-client]
|
||||
[37-TLS 1.3 ECDSA Signature Algorithm Selection SHA1-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-32]
|
||||
[test-37]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[33-TLS 1.3 ECDSA Signature Algorithm Selection with PSS]
|
||||
ssl_conf = 33-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-ssl
|
||||
[38-TLS 1.3 ECDSA Signature Algorithm Selection with PSS]
|
||||
ssl_conf = 38-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-ssl
|
||||
|
||||
[33-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-ssl]
|
||||
server = 33-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-server
|
||||
client = 33-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-client
|
||||
[38-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-ssl]
|
||||
server = 38-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-server
|
||||
client = 38-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-client
|
||||
|
||||
[33-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-server]
|
||||
[38-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1116,14 +1252,14 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[33-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-client]
|
||||
[38-TLS 1.3 ECDSA Signature Algorithm Selection with PSS-client]
|
||||
CipherString = DEFAULT
|
||||
RequestCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
SignatureAlgorithms = ECDSA+SHA256:RSA-PSS+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-33]
|
||||
[test-38]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCANames = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
ExpectedServerCertType = P-256
|
||||
@@ -1133,14 +1269,14 @@ ExpectedServerSignType = EC
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[34-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS]
|
||||
ssl_conf = 34-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-ssl
|
||||
[39-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS]
|
||||
ssl_conf = 39-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-ssl
|
||||
|
||||
[34-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-ssl]
|
||||
server = 34-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-server
|
||||
client = 34-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-client
|
||||
[39-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-ssl]
|
||||
server = 39-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-server
|
||||
client = 39-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-client
|
||||
|
||||
[34-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-server]
|
||||
[39-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1153,13 +1289,13 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[34-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-client]
|
||||
[39-TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA384:RSA-PSS+SHA384
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-34]
|
||||
[test-39]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = RSA
|
||||
ExpectedServerSignHash = SHA384
|
||||
@@ -1168,40 +1304,40 @@ ExpectedServerSignType = RSA-PSS
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[35-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate]
|
||||
ssl_conf = 35-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-ssl
|
||||
[40-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate]
|
||||
ssl_conf = 40-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-ssl
|
||||
|
||||
[35-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-ssl]
|
||||
server = 35-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-server
|
||||
client = 35-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-client
|
||||
[40-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-ssl]
|
||||
server = 40-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-server
|
||||
client = 40-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-client
|
||||
|
||||
[35-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-server]
|
||||
[40-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[35-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-client]
|
||||
[40-TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ECDSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-35]
|
||||
[test-40]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[36-TLS 1.3 RSA Signature Algorithm Selection, no PSS]
|
||||
ssl_conf = 36-TLS 1.3 RSA Signature Algorithm Selection, no PSS-ssl
|
||||
[41-TLS 1.3 RSA Signature Algorithm Selection, no PSS]
|
||||
ssl_conf = 41-TLS 1.3 RSA Signature Algorithm Selection, no PSS-ssl
|
||||
|
||||
[36-TLS 1.3 RSA Signature Algorithm Selection, no PSS-ssl]
|
||||
server = 36-TLS 1.3 RSA Signature Algorithm Selection, no PSS-server
|
||||
client = 36-TLS 1.3 RSA Signature Algorithm Selection, no PSS-client
|
||||
[41-TLS 1.3 RSA Signature Algorithm Selection, no PSS-ssl]
|
||||
server = 41-TLS 1.3 RSA Signature Algorithm Selection, no PSS-server
|
||||
client = 41-TLS 1.3 RSA Signature Algorithm Selection, no PSS-client
|
||||
|
||||
[36-TLS 1.3 RSA Signature Algorithm Selection, no PSS-server]
|
||||
[41-TLS 1.3 RSA Signature Algorithm Selection, no PSS-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1214,26 +1350,26 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[36-TLS 1.3 RSA Signature Algorithm Selection, no PSS-client]
|
||||
[41-TLS 1.3 RSA Signature Algorithm Selection, no PSS-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = RSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-36]
|
||||
[test-41]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[37-TLS 1.3 RSA-PSS Signature Algorithm Selection]
|
||||
ssl_conf = 37-TLS 1.3 RSA-PSS Signature Algorithm Selection-ssl
|
||||
[42-TLS 1.3 RSA-PSS Signature Algorithm Selection]
|
||||
ssl_conf = 42-TLS 1.3 RSA-PSS Signature Algorithm Selection-ssl
|
||||
|
||||
[37-TLS 1.3 RSA-PSS Signature Algorithm Selection-ssl]
|
||||
server = 37-TLS 1.3 RSA-PSS Signature Algorithm Selection-server
|
||||
client = 37-TLS 1.3 RSA-PSS Signature Algorithm Selection-client
|
||||
[42-TLS 1.3 RSA-PSS Signature Algorithm Selection-ssl]
|
||||
server = 42-TLS 1.3 RSA-PSS Signature Algorithm Selection-server
|
||||
client = 42-TLS 1.3 RSA-PSS Signature Algorithm Selection-client
|
||||
|
||||
[37-TLS 1.3 RSA-PSS Signature Algorithm Selection-server]
|
||||
[42-TLS 1.3 RSA-PSS Signature Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1246,13 +1382,13 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[37-TLS 1.3 RSA-PSS Signature Algorithm Selection-client]
|
||||
[42-TLS 1.3 RSA-PSS Signature Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = RSA-PSS+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-37]
|
||||
[test-42]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = RSA
|
||||
ExpectedServerSignHash = SHA256
|
||||
@@ -1261,14 +1397,14 @@ ExpectedServerSignType = RSA-PSS
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[38-TLS 1.3 Ed25519 Signature Algorithm Selection]
|
||||
ssl_conf = 38-TLS 1.3 Ed25519 Signature Algorithm Selection-ssl
|
||||
[43-TLS 1.3 Ed25519 Signature Algorithm Selection]
|
||||
ssl_conf = 43-TLS 1.3 Ed25519 Signature Algorithm Selection-ssl
|
||||
|
||||
[38-TLS 1.3 Ed25519 Signature Algorithm Selection-ssl]
|
||||
server = 38-TLS 1.3 Ed25519 Signature Algorithm Selection-server
|
||||
client = 38-TLS 1.3 Ed25519 Signature Algorithm Selection-client
|
||||
[43-TLS 1.3 Ed25519 Signature Algorithm Selection-ssl]
|
||||
server = 43-TLS 1.3 Ed25519 Signature Algorithm Selection-server
|
||||
client = 43-TLS 1.3 Ed25519 Signature Algorithm Selection-client
|
||||
|
||||
[38-TLS 1.3 Ed25519 Signature Algorithm Selection-server]
|
||||
[43-TLS 1.3 Ed25519 Signature Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1281,13 +1417,13 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[38-TLS 1.3 Ed25519 Signature Algorithm Selection-client]
|
||||
[43-TLS 1.3 Ed25519 Signature Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ed25519
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-38]
|
||||
[test-43]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = Ed25519
|
||||
ExpectedServerSignType = Ed25519
|
||||
@@ -1295,14 +1431,14 @@ ExpectedServerSignType = Ed25519
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[39-TLS 1.3 Ed448 Signature Algorithm Selection]
|
||||
ssl_conf = 39-TLS 1.3 Ed448 Signature Algorithm Selection-ssl
|
||||
[44-TLS 1.3 Ed448 Signature Algorithm Selection]
|
||||
ssl_conf = 44-TLS 1.3 Ed448 Signature Algorithm Selection-ssl
|
||||
|
||||
[39-TLS 1.3 Ed448 Signature Algorithm Selection-ssl]
|
||||
server = 39-TLS 1.3 Ed448 Signature Algorithm Selection-server
|
||||
client = 39-TLS 1.3 Ed448 Signature Algorithm Selection-client
|
||||
[44-TLS 1.3 Ed448 Signature Algorithm Selection-ssl]
|
||||
server = 44-TLS 1.3 Ed448 Signature Algorithm Selection-server
|
||||
client = 44-TLS 1.3 Ed448 Signature Algorithm Selection-client
|
||||
|
||||
[39-TLS 1.3 Ed448 Signature Algorithm Selection-server]
|
||||
[44-TLS 1.3 Ed448 Signature Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1315,13 +1451,13 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[39-TLS 1.3 Ed448 Signature Algorithm Selection-client]
|
||||
[44-TLS 1.3 Ed448 Signature Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = ed448
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-39]
|
||||
[test-44]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = Ed448
|
||||
ExpectedServerSignType = Ed448
|
||||
@@ -1329,14 +1465,14 @@ ExpectedServerSignType = Ed448
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[40-TLS 1.3 Ed25519 CipherString and Groups Selection]
|
||||
ssl_conf = 40-TLS 1.3 Ed25519 CipherString and Groups Selection-ssl
|
||||
[45-TLS 1.3 Ed25519 CipherString and Groups Selection]
|
||||
ssl_conf = 45-TLS 1.3 Ed25519 CipherString and Groups Selection-ssl
|
||||
|
||||
[40-TLS 1.3 Ed25519 CipherString and Groups Selection-ssl]
|
||||
server = 40-TLS 1.3 Ed25519 CipherString and Groups Selection-server
|
||||
client = 40-TLS 1.3 Ed25519 CipherString and Groups Selection-client
|
||||
[45-TLS 1.3 Ed25519 CipherString and Groups Selection-ssl]
|
||||
server = 45-TLS 1.3 Ed25519 CipherString and Groups Selection-server
|
||||
client = 45-TLS 1.3 Ed25519 CipherString and Groups Selection-client
|
||||
|
||||
[40-TLS 1.3 Ed25519 CipherString and Groups Selection-server]
|
||||
[45-TLS 1.3 Ed25519 CipherString and Groups Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1349,14 +1485,14 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[40-TLS 1.3 Ed25519 CipherString and Groups Selection-client]
|
||||
[45-TLS 1.3 Ed25519 CipherString and Groups Selection-client]
|
||||
CipherString = DEFAULT
|
||||
Groups = X25519
|
||||
SignatureAlgorithms = ECDSA+SHA256:ed25519
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-40]
|
||||
[test-45]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = P-256
|
||||
ExpectedServerSignType = EC
|
||||
@@ -1364,14 +1500,14 @@ ExpectedServerSignType = EC
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[41-TLS 1.3 Ed448 CipherString and Groups Selection]
|
||||
ssl_conf = 41-TLS 1.3 Ed448 CipherString and Groups Selection-ssl
|
||||
[46-TLS 1.3 Ed448 CipherString and Groups Selection]
|
||||
ssl_conf = 46-TLS 1.3 Ed448 CipherString and Groups Selection-ssl
|
||||
|
||||
[41-TLS 1.3 Ed448 CipherString and Groups Selection-ssl]
|
||||
server = 41-TLS 1.3 Ed448 CipherString and Groups Selection-server
|
||||
client = 41-TLS 1.3 Ed448 CipherString and Groups Selection-client
|
||||
[46-TLS 1.3 Ed448 CipherString and Groups Selection-ssl]
|
||||
server = 46-TLS 1.3 Ed448 CipherString and Groups Selection-server
|
||||
client = 46-TLS 1.3 Ed448 CipherString and Groups Selection-client
|
||||
|
||||
[41-TLS 1.3 Ed448 CipherString and Groups Selection-server]
|
||||
[46-TLS 1.3 Ed448 CipherString and Groups Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-cert.pem
|
||||
@@ -1384,14 +1520,14 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[41-TLS 1.3 Ed448 CipherString and Groups Selection-client]
|
||||
[46-TLS 1.3 Ed448 CipherString and Groups Selection-client]
|
||||
CipherString = DEFAULT
|
||||
Groups = X448
|
||||
SignatureAlgorithms = ECDSA+SHA256:ed448
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-41]
|
||||
[test-46]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerCertType = P-256
|
||||
ExpectedServerSignType = EC
|
||||
@@ -1399,14 +1535,14 @@ ExpectedServerSignType = EC
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[42-TLS 1.3 RSA Client Auth Signature Algorithm Selection]
|
||||
ssl_conf = 42-TLS 1.3 RSA Client Auth Signature Algorithm Selection-ssl
|
||||
[47-TLS 1.3 RSA Client Auth Signature Algorithm Selection]
|
||||
ssl_conf = 47-TLS 1.3 RSA Client Auth Signature Algorithm Selection-ssl
|
||||
|
||||
[42-TLS 1.3 RSA Client Auth Signature Algorithm Selection-ssl]
|
||||
server = 42-TLS 1.3 RSA Client Auth Signature Algorithm Selection-server
|
||||
client = 42-TLS 1.3 RSA Client Auth Signature Algorithm Selection-client
|
||||
[47-TLS 1.3 RSA Client Auth Signature Algorithm Selection-ssl]
|
||||
server = 47-TLS 1.3 RSA Client Auth Signature Algorithm Selection-server
|
||||
client = 47-TLS 1.3 RSA Client Auth Signature Algorithm Selection-client
|
||||
|
||||
[42-TLS 1.3 RSA Client Auth Signature Algorithm Selection-server]
|
||||
[47-TLS 1.3 RSA Client Auth Signature Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientSignatureAlgorithms = PSS+SHA256
|
||||
@@ -1414,7 +1550,7 @@ PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[42-TLS 1.3 RSA Client Auth Signature Algorithm Selection-client]
|
||||
[47-TLS 1.3 RSA Client Auth Signature Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/ee-ecdsa-client-chain.pem
|
||||
ECDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-ecdsa-key.pem
|
||||
@@ -1425,7 +1561,7 @@ RSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-42]
|
||||
[test-47]
|
||||
ExpectedClientCANames = empty
|
||||
ExpectedClientCertType = RSA
|
||||
ExpectedClientSignHash = SHA256
|
||||
@@ -1435,14 +1571,14 @@ ExpectedResult = Success
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[43-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names]
|
||||
ssl_conf = 43-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-ssl
|
||||
[48-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names]
|
||||
ssl_conf = 48-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-ssl
|
||||
|
||||
[43-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-ssl]
|
||||
server = 43-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-server
|
||||
client = 43-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-client
|
||||
[48-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-ssl]
|
||||
server = 48-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-server
|
||||
client = 48-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-client
|
||||
|
||||
[43-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-server]
|
||||
[48-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientSignatureAlgorithms = PSS+SHA256
|
||||
@@ -1451,7 +1587,7 @@ RequestCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[43-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-client]
|
||||
[48-TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names-client]
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/ee-ecdsa-client-chain.pem
|
||||
ECDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-ecdsa-key.pem
|
||||
@@ -1462,7 +1598,7 @@ RSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-43]
|
||||
[test-48]
|
||||
ExpectedClientCANames = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
ExpectedClientCertType = RSA
|
||||
ExpectedClientSignHash = SHA256
|
||||
@@ -1472,14 +1608,14 @@ ExpectedResult = Success
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[44-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection]
|
||||
ssl_conf = 44-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-ssl
|
||||
[49-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection]
|
||||
ssl_conf = 49-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-ssl
|
||||
|
||||
[44-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-ssl]
|
||||
server = 44-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-server
|
||||
client = 44-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-client
|
||||
[49-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-ssl]
|
||||
server = 49-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-server
|
||||
client = 49-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-client
|
||||
|
||||
[44-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-server]
|
||||
[49-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientSignatureAlgorithms = ECDSA+SHA256
|
||||
@@ -1487,7 +1623,7 @@ PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[44-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-client]
|
||||
[49-TLS 1.3 ECDSA Client Auth Signature Algorithm Selection-client]
|
||||
CipherString = DEFAULT
|
||||
ECDSA.Certificate = ${ENV::TEST_CERTS_DIR}/ee-ecdsa-client-chain.pem
|
||||
ECDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-ecdsa-key.pem
|
||||
@@ -1498,7 +1634,7 @@ RSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-44]
|
||||
[test-49]
|
||||
ExpectedClientCertType = P-256
|
||||
ExpectedClientSignHash = SHA256
|
||||
ExpectedClientSignType = EC
|
||||
@@ -1507,21 +1643,21 @@ ExpectedResult = Success
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[45-TLS 1.3 Ed25519 Client Auth]
|
||||
ssl_conf = 45-TLS 1.3 Ed25519 Client Auth-ssl
|
||||
[50-TLS 1.3 Ed25519 Client Auth]
|
||||
ssl_conf = 50-TLS 1.3 Ed25519 Client Auth-ssl
|
||||
|
||||
[45-TLS 1.3 Ed25519 Client Auth-ssl]
|
||||
server = 45-TLS 1.3 Ed25519 Client Auth-server
|
||||
client = 45-TLS 1.3 Ed25519 Client Auth-client
|
||||
[50-TLS 1.3 Ed25519 Client Auth-ssl]
|
||||
server = 50-TLS 1.3 Ed25519 Client Auth-server
|
||||
client = 50-TLS 1.3 Ed25519 Client Auth-client
|
||||
|
||||
[45-TLS 1.3 Ed25519 Client Auth-server]
|
||||
[50-TLS 1.3 Ed25519 Client Auth-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[45-TLS 1.3 Ed25519 Client Auth-client]
|
||||
[50-TLS 1.3 Ed25519 Client Auth-client]
|
||||
CipherString = DEFAULT
|
||||
EdDSA.Certificate = ${ENV::TEST_CERTS_DIR}/client-ed25519-cert.pem
|
||||
EdDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/client-ed25519-key.pem
|
||||
@@ -1530,7 +1666,7 @@ MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-45]
|
||||
[test-50]
|
||||
ExpectedClientCertType = Ed25519
|
||||
ExpectedClientSignType = Ed25519
|
||||
ExpectedResult = Success
|
||||
@@ -1538,21 +1674,21 @@ ExpectedResult = Success
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[46-TLS 1.3 Ed448 Client Auth]
|
||||
ssl_conf = 46-TLS 1.3 Ed448 Client Auth-ssl
|
||||
[51-TLS 1.3 Ed448 Client Auth]
|
||||
ssl_conf = 51-TLS 1.3 Ed448 Client Auth-ssl
|
||||
|
||||
[46-TLS 1.3 Ed448 Client Auth-ssl]
|
||||
server = 46-TLS 1.3 Ed448 Client Auth-server
|
||||
client = 46-TLS 1.3 Ed448 Client Auth-client
|
||||
[51-TLS 1.3 Ed448 Client Auth-ssl]
|
||||
server = 51-TLS 1.3 Ed448 Client Auth-server
|
||||
client = 51-TLS 1.3 Ed448 Client Auth-client
|
||||
|
||||
[46-TLS 1.3 Ed448 Client Auth-server]
|
||||
[51-TLS 1.3 Ed448 Client Auth-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[46-TLS 1.3 Ed448 Client Auth-client]
|
||||
[51-TLS 1.3 Ed448 Client Auth-client]
|
||||
CipherString = DEFAULT
|
||||
EdDSA.Certificate = ${ENV::TEST_CERTS_DIR}/client-ed448-cert.pem
|
||||
EdDSA.PrivateKey = ${ENV::TEST_CERTS_DIR}/client-ed448-key.pem
|
||||
@@ -1561,7 +1697,7 @@ MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-46]
|
||||
[test-51]
|
||||
ExpectedClientCertType = Ed448
|
||||
ExpectedClientSignType = Ed448
|
||||
ExpectedResult = Success
|
||||
@@ -1569,20 +1705,20 @@ ExpectedResult = Success
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[47-TLS 1.3 ECDSA with brainpool]
|
||||
ssl_conf = 47-TLS 1.3 ECDSA with brainpool-ssl
|
||||
[52-TLS 1.3 ECDSA with brainpool]
|
||||
ssl_conf = 52-TLS 1.3 ECDSA with brainpool-ssl
|
||||
|
||||
[47-TLS 1.3 ECDSA with brainpool-ssl]
|
||||
server = 47-TLS 1.3 ECDSA with brainpool-server
|
||||
client = 47-TLS 1.3 ECDSA with brainpool-client
|
||||
[52-TLS 1.3 ECDSA with brainpool-ssl]
|
||||
server = 52-TLS 1.3 ECDSA with brainpool-server
|
||||
client = 52-TLS 1.3 ECDSA with brainpool-client
|
||||
|
||||
[47-TLS 1.3 ECDSA with brainpool-server]
|
||||
[52-TLS 1.3 ECDSA with brainpool-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-ecdsa-brainpoolP256r1-cert.pem
|
||||
CipherString = DEFAULT
|
||||
Groups = brainpoolP256r1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-ecdsa-brainpoolP256r1-key.pem
|
||||
|
||||
[47-TLS 1.3 ECDSA with brainpool-client]
|
||||
[52-TLS 1.3 ECDSA with brainpool-client]
|
||||
CipherString = DEFAULT
|
||||
Groups = brainpoolP256r1
|
||||
MaxProtocol = TLSv1.3
|
||||
@@ -1591,20 +1727,20 @@ RequestCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-47]
|
||||
[test-52]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[48-TLS 1.2 DSA Certificate Test]
|
||||
ssl_conf = 48-TLS 1.2 DSA Certificate Test-ssl
|
||||
[53-TLS 1.2 DSA Certificate Test]
|
||||
ssl_conf = 53-TLS 1.2 DSA Certificate Test-ssl
|
||||
|
||||
[48-TLS 1.2 DSA Certificate Test-ssl]
|
||||
server = 48-TLS 1.2 DSA Certificate Test-server
|
||||
client = 48-TLS 1.2 DSA Certificate Test-client
|
||||
[53-TLS 1.2 DSA Certificate Test-ssl]
|
||||
server = 53-TLS 1.2 DSA Certificate Test-server
|
||||
client = 53-TLS 1.2 DSA Certificate Test-client
|
||||
|
||||
[48-TLS 1.2 DSA Certificate Test-server]
|
||||
[53-TLS 1.2 DSA Certificate Test-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ALL
|
||||
DHParameters = ${ENV::TEST_CERTS_DIR}/dhp2048.pem
|
||||
@@ -1614,26 +1750,26 @@ MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[48-TLS 1.2 DSA Certificate Test-client]
|
||||
[53-TLS 1.2 DSA Certificate Test-client]
|
||||
CipherString = ALL
|
||||
SignatureAlgorithms = DSA+SHA256:DSA+SHA1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-48]
|
||||
[test-53]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[49-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms]
|
||||
ssl_conf = 49-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-ssl
|
||||
[54-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms]
|
||||
ssl_conf = 54-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-ssl
|
||||
|
||||
[49-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-ssl]
|
||||
server = 49-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-server
|
||||
client = 49-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-client
|
||||
[54-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-ssl]
|
||||
server = 54-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-server
|
||||
client = 54-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-client
|
||||
|
||||
[49-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-server]
|
||||
[54-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientSignatureAlgorithms = ECDSA+SHA1:DSA+SHA256:RSA+SHA256
|
||||
@@ -1641,25 +1777,25 @@ PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[49-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-client]
|
||||
[54-TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-49]
|
||||
[test-54]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[50-TLS 1.3 DSA Certificate Test]
|
||||
ssl_conf = 50-TLS 1.3 DSA Certificate Test-ssl
|
||||
[55-TLS 1.3 DSA Certificate Test]
|
||||
ssl_conf = 55-TLS 1.3 DSA Certificate Test-ssl
|
||||
|
||||
[50-TLS 1.3 DSA Certificate Test-ssl]
|
||||
server = 50-TLS 1.3 DSA Certificate Test-server
|
||||
client = 50-TLS 1.3 DSA Certificate Test-client
|
||||
[55-TLS 1.3 DSA Certificate Test-ssl]
|
||||
server = 55-TLS 1.3 DSA Certificate Test-server
|
||||
client = 55-TLS 1.3 DSA Certificate Test-client
|
||||
|
||||
[50-TLS 1.3 DSA Certificate Test-server]
|
||||
[55-TLS 1.3 DSA Certificate Test-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ALL
|
||||
DSA.Certificate = ${ENV::TEST_CERTS_DIR}/server-dsa-cert.pem
|
||||
@@ -1668,13 +1804,13 @@ MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[50-TLS 1.3 DSA Certificate Test-client]
|
||||
[55-TLS 1.3 DSA Certificate Test-client]
|
||||
CipherString = ALL
|
||||
SignatureAlgorithms = DSA+SHA1:DSA+SHA256:ECDSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-50]
|
||||
[test-55]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
@@ -36,6 +36,12 @@ my $server_pss_only = {
|
||||
"PrivateKey" => test_pem("server-pss-key.pem"),
|
||||
};
|
||||
|
||||
my $server_pss_restrict_only = {
|
||||
"Certificate" => test_pem("server-pss-restrict-cert.pem"),
|
||||
"PrivateKey" => test_pem("server-pss-restrict-key.pem"),
|
||||
};
|
||||
|
||||
|
||||
my $server_rsa_all = {
|
||||
"PSS.Certificate" => test_pem("server-pss-cert.pem"),
|
||||
"PSS.PrivateKey" => test_pem("server-pss-key.pem"),
|
||||
@@ -379,6 +385,19 @@ our @tests = (
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Only RSA-PSS Certificate Valid Signature Algorithms",
|
||||
server => $server_pss_only,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "rsa_pss_pss_sha512",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA-PSS",
|
||||
"ExpectedServerSignHash" => "SHA512",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Certificate, no PSS signature algorithms",
|
||||
server => $server_pss_only,
|
||||
@@ -389,6 +408,53 @@ our @tests = (
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Only RSA-PSS Restricted Certificate",
|
||||
server => $server_pss_restrict_only,
|
||||
client => {},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA-PSS",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Restricted Certificate Valid Signature Algorithms",
|
||||
server => $server_pss_restrict_only,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "rsa_pss_pss_sha256:rsa_pss_pss_sha512",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA-PSS",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Restricted Cert client prefers invalid Signature Algorithm",
|
||||
server => $server_pss_restrict_only,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "rsa_pss_pss_sha512:rsa_pss_pss_sha256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA-PSS",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Restricted Certificate Invalid Signature Algorithms",
|
||||
server => $server_pss_restrict_only,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "rsa_pss_pss_sha512",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA key exchange with all RSA certificate types",
|
||||
server => $server_rsa_all,
|
||||
|
||||
+318
-71
@@ -45,6 +45,7 @@ static int find_session_cb_cnt = 0;
|
||||
static SSL_SESSION *create_a_psk(SSL *ssl);
|
||||
#endif
|
||||
|
||||
static char *certsdir = NULL;
|
||||
static char *cert = NULL;
|
||||
static char *privkey = NULL;
|
||||
static char *srpvfile = NULL;
|
||||
@@ -3742,50 +3743,92 @@ static int test_ciphersuite_change(void)
|
||||
|
||||
/*
|
||||
* Test TLSv1.3 Key exchange
|
||||
* Test 0 = Test ECDHE Key exchange
|
||||
* Test 1 = Test ECDHE with TLSv1.2 client and TLSv1.2 server
|
||||
* Test 2 = Test FFDHE Key exchange
|
||||
* Test 3 = Test FFDHE with TLSv1.2 client and TLSv1.2 server
|
||||
* Test 0 = Test all ECDHE Key exchange with TLSv1.3 client and server
|
||||
* Test 1 = Test NID_X9_62_prime256v1 with TLSv1.3 client and server
|
||||
* Test 2 = Test NID_secp384r1 with TLSv1.3 client and server
|
||||
* Test 3 = Test NID_secp521r1 with TLSv1.3 client and server
|
||||
* Test 4 = Test NID_X25519 with TLSv1.3 client and server
|
||||
* Test 5 = Test NID_X448 with TLSv1.3 client and server
|
||||
* Test 6 = Test all FFDHE Key exchange with TLSv1.3 client and server
|
||||
* Test 7 = Test NID_ffdhe2048 with TLSv1.3 client and server
|
||||
* Test 8 = Test NID_ffdhe3072 with TLSv1.3 client and server
|
||||
* Test 9 = Test NID_ffdhe4096 with TLSv1.3 client and server
|
||||
* Test 10 = Test NID_ffdhe6144 with TLSv1.3 client and server
|
||||
* Test 11 = Test NID_ffdhe8192 with TLSv1.3 client and server
|
||||
* Test 12 = Test all ECDHE with TLSv1.2 client and server
|
||||
* Test 13 = Test all FFDHE with TLSv1.2 client and server
|
||||
*/
|
||||
static int test_tls13_key_exchange(int idx)
|
||||
static int test_key_exchange(int idx)
|
||||
{
|
||||
SSL_CTX *sctx = NULL, *cctx = NULL;
|
||||
SSL *serverssl = NULL, *clientssl = NULL;
|
||||
int testresult = 0;
|
||||
#ifndef OPENSSL_NO_EC
|
||||
int ecdhe_kexch_groups[] = {NID_X9_62_prime256v1, NID_secp384r1, NID_secp521r1,
|
||||
NID_X25519, NID_X448};
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DH
|
||||
# ifndef OPENSSL_NO_EC
|
||||
int ecdhe_kexch_groups[] = {NID_X9_62_prime256v1, NID_secp384r1,
|
||||
NID_secp521r1, NID_X25519, NID_X448};
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DH
|
||||
int ffdhe_kexch_groups[] = {NID_ffdhe2048, NID_ffdhe3072, NID_ffdhe4096,
|
||||
NID_ffdhe6144, NID_ffdhe8192};
|
||||
#endif
|
||||
int *kexch_groups = NULL;
|
||||
int kexch_groups_size = 0;
|
||||
# endif
|
||||
int kexch_alg;
|
||||
int *kexch_groups = &kexch_alg;
|
||||
int kexch_groups_size = 1;
|
||||
int max_version = TLS1_3_VERSION;
|
||||
int want_err = SSL_ERROR_NONE;
|
||||
int expected_err_func = 0;
|
||||
int expected_err_reason = 0;
|
||||
|
||||
switch (idx) {
|
||||
#ifndef OPENSSL_NO_DH
|
||||
case 3:
|
||||
max_version = TLS1_2_VERSION;
|
||||
/* Fall through */
|
||||
case 2:
|
||||
kexch_groups = ffdhe_kexch_groups;
|
||||
kexch_groups_size = OSSL_NELEM(ffdhe_kexch_groups);
|
||||
break;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_EC
|
||||
case 1:
|
||||
# ifndef OPENSSL_NO_EC
|
||||
# ifndef OPENSSL_NO_TLS1_2
|
||||
case 12:
|
||||
max_version = TLS1_2_VERSION;
|
||||
# endif
|
||||
/* Fall through */
|
||||
case 0:
|
||||
kexch_groups = ecdhe_kexch_groups;
|
||||
kexch_groups_size = OSSL_NELEM(ecdhe_kexch_groups);
|
||||
break;
|
||||
#endif
|
||||
case 1:
|
||||
kexch_alg = NID_X9_62_prime256v1;
|
||||
break;
|
||||
case 2:
|
||||
kexch_alg = NID_secp384r1;
|
||||
break;
|
||||
case 3:
|
||||
kexch_alg = NID_secp521r1;
|
||||
break;
|
||||
case 4:
|
||||
kexch_alg = NID_X25519;
|
||||
break;
|
||||
case 5:
|
||||
kexch_alg = NID_X448;
|
||||
break;
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DH
|
||||
# ifndef OPENSSL_NO_TLS1_2
|
||||
case 13:
|
||||
max_version = TLS1_2_VERSION;
|
||||
# endif
|
||||
/* Fall through */
|
||||
case 6:
|
||||
kexch_groups = ffdhe_kexch_groups;
|
||||
kexch_groups_size = OSSL_NELEM(ffdhe_kexch_groups);
|
||||
break;
|
||||
case 7:
|
||||
kexch_alg = NID_ffdhe2048;
|
||||
break;
|
||||
case 8:
|
||||
kexch_alg = NID_ffdhe3072;
|
||||
break;
|
||||
case 9:
|
||||
kexch_alg = NID_ffdhe4096;
|
||||
break;
|
||||
case 10:
|
||||
kexch_alg = NID_ffdhe6144;
|
||||
break;
|
||||
case 11:
|
||||
kexch_alg = NID_ffdhe8192;
|
||||
break;
|
||||
# endif
|
||||
default:
|
||||
/* We're skipping this test */
|
||||
return 1;
|
||||
@@ -3796,23 +3839,28 @@ static int test_tls13_key_exchange(int idx)
|
||||
&sctx, &cctx, cert, privkey)))
|
||||
goto end;
|
||||
|
||||
if (!TEST_true(SSL_CTX_set_ciphersuites(sctx, TLS1_3_RFC_AES_128_GCM_SHA256)))
|
||||
if (!TEST_true(SSL_CTX_set_ciphersuites(sctx,
|
||||
TLS1_3_RFC_AES_128_GCM_SHA256)))
|
||||
goto end;
|
||||
|
||||
if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, TLS1_3_RFC_AES_128_GCM_SHA256)))
|
||||
if (!TEST_true(SSL_CTX_set_ciphersuites(cctx,
|
||||
TLS1_3_RFC_AES_128_GCM_SHA256)))
|
||||
goto end;
|
||||
|
||||
if (!TEST_true(SSL_CTX_set_cipher_list(sctx, TLS1_TXT_RSA_WITH_AES_128_SHA)))
|
||||
if (!TEST_true(SSL_CTX_set_cipher_list(sctx,
|
||||
TLS1_TXT_RSA_WITH_AES_128_SHA)))
|
||||
goto end;
|
||||
|
||||
/*
|
||||
* Must include an EC ciphersuite so that we send supported groups in
|
||||
* TLSv1.2
|
||||
*/
|
||||
# ifndef OPENSSL_NO_TLS1_2
|
||||
if (!TEST_true(SSL_CTX_set_cipher_list(cctx,
|
||||
TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM ":"
|
||||
TLS1_TXT_RSA_WITH_AES_128_SHA)))
|
||||
goto end;
|
||||
# endif
|
||||
|
||||
if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl,
|
||||
NULL, NULL)))
|
||||
@@ -3822,30 +3870,159 @@ static int test_tls13_key_exchange(int idx)
|
||||
|| !TEST_true(SSL_set1_groups(clientssl, kexch_groups, kexch_groups_size)))
|
||||
goto end;
|
||||
|
||||
if (!TEST_true(create_ssl_connection(serverssl, clientssl, want_err))) {
|
||||
/* Fail only if no error is expected in handshake */
|
||||
if (expected_err_func == 0)
|
||||
if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)))
|
||||
goto end;
|
||||
|
||||
/*
|
||||
* If Handshake succeeds the negotiated kexch alg should be the first one in
|
||||
* configured, except in the case of FFDHE groups (idx 13), which are
|
||||
* TLSv1.3 only so we expect no shared group to exist.
|
||||
*/
|
||||
if (!TEST_int_eq(SSL_get_shared_group(serverssl, 0),
|
||||
idx == 13 ? 0 : kexch_groups[0]))
|
||||
goto end;
|
||||
if (max_version == TLS1_3_VERSION) {
|
||||
if (!TEST_int_eq(SSL_get_negotiated_group(serverssl), kexch_groups[0]))
|
||||
goto end;
|
||||
if (!TEST_int_eq(SSL_get_negotiated_group(clientssl), kexch_groups[0]))
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* Fail if expected error is not happening for failure testcases */
|
||||
if (expected_err_func) {
|
||||
unsigned long err_code = ERR_get_error();
|
||||
ERR_print_errors_fp(stdout);
|
||||
if (TEST_int_eq(ERR_GET_FUNC(err_code), expected_err_func)
|
||||
&& TEST_int_eq(ERR_GET_REASON(err_code), expected_err_reason))
|
||||
testresult = 1;
|
||||
goto end;
|
||||
testresult = 1;
|
||||
end:
|
||||
SSL_free(serverssl);
|
||||
SSL_free(clientssl);
|
||||
SSL_CTX_free(sctx);
|
||||
SSL_CTX_free(cctx);
|
||||
return testresult;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test TLSv1.3 Cipher Suite
|
||||
* Test 0 = Set TLS1.3 cipher on context
|
||||
* Test 1 = Set TLS1.3 cipher on SSL
|
||||
* Test 2 = Set TLS1.3 and TLS1.2 cipher on context
|
||||
* Test 3 = Set TLS1.3 and TLS1.2 cipher on SSL
|
||||
*/
|
||||
static int test_tls13_ciphersuite(int idx)
|
||||
{
|
||||
SSL_CTX *sctx = NULL, *cctx = NULL;
|
||||
SSL *serverssl = NULL, *clientssl = NULL;
|
||||
static const char *t13_ciphers[] = {
|
||||
TLS1_3_RFC_AES_128_GCM_SHA256,
|
||||
TLS1_3_RFC_AES_256_GCM_SHA384,
|
||||
TLS1_3_RFC_AES_128_CCM_SHA256,
|
||||
# if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
|
||||
TLS1_3_RFC_CHACHA20_POLY1305_SHA256,
|
||||
TLS1_3_RFC_AES_256_GCM_SHA384 ":" TLS1_3_RFC_CHACHA20_POLY1305_SHA256,
|
||||
# endif
|
||||
TLS1_3_RFC_AES_128_CCM_8_SHA256 ":" TLS1_3_RFC_AES_128_CCM_SHA256
|
||||
};
|
||||
const char *t13_cipher = NULL;
|
||||
const char *t12_cipher = NULL;
|
||||
const char *negotiated_scipher;
|
||||
const char *negotiated_ccipher;
|
||||
int set_at_ctx = 0;
|
||||
int set_at_ssl = 0;
|
||||
int testresult = 0;
|
||||
int max_ver;
|
||||
size_t i;
|
||||
|
||||
switch (idx) {
|
||||
case 0:
|
||||
set_at_ctx = 1;
|
||||
break;
|
||||
case 1:
|
||||
set_at_ssl = 1;
|
||||
break;
|
||||
case 2:
|
||||
set_at_ctx = 1;
|
||||
t12_cipher = TLS1_TXT_RSA_WITH_AES_128_SHA256;
|
||||
break;
|
||||
case 3:
|
||||
set_at_ssl = 1;
|
||||
t12_cipher = TLS1_TXT_RSA_WITH_AES_128_SHA256;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If Handshake succeeds the negotiated kexch alg should the first one in
|
||||
* configured, except in the case of FFDHE groups which are TLSv1.3 only
|
||||
* so we expect no shared group to exist.
|
||||
*/
|
||||
if (!TEST_int_eq(SSL_get_shared_group(serverssl, 0),
|
||||
idx == 3 ? 0 : kexch_groups[0]))
|
||||
goto end;
|
||||
for (max_ver = TLS1_2_VERSION; max_ver <= TLS1_3_VERSION; max_ver++) {
|
||||
# ifdef OPENSSL_NO_TLS1_2
|
||||
if (max_ver == TLS1_2_VERSION)
|
||||
continue;
|
||||
# endif
|
||||
for (i = 0; i < OSSL_NELEM(t13_ciphers); i++) {
|
||||
t13_cipher = t13_ciphers[i];
|
||||
if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(),
|
||||
TLS_client_method(),
|
||||
TLS1_VERSION, max_ver,
|
||||
&sctx, &cctx, cert, privkey)))
|
||||
goto end;
|
||||
|
||||
if (set_at_ctx) {
|
||||
if (!TEST_true(SSL_CTX_set_ciphersuites(sctx, t13_cipher))
|
||||
|| !TEST_true(SSL_CTX_set_ciphersuites(cctx, t13_cipher)))
|
||||
goto end;
|
||||
if (t12_cipher != NULL) {
|
||||
if (!TEST_true(SSL_CTX_set_cipher_list(sctx, t12_cipher))
|
||||
|| !TEST_true(SSL_CTX_set_cipher_list(cctx,
|
||||
t12_cipher)))
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl,
|
||||
&clientssl, NULL, NULL)))
|
||||
goto end;
|
||||
|
||||
if (set_at_ssl) {
|
||||
if (!TEST_true(SSL_set_ciphersuites(serverssl, t13_cipher))
|
||||
|| !TEST_true(SSL_set_ciphersuites(clientssl, t13_cipher)))
|
||||
goto end;
|
||||
if (t12_cipher != NULL) {
|
||||
if (!TEST_true(SSL_set_cipher_list(serverssl, t12_cipher))
|
||||
|| !TEST_true(SSL_set_cipher_list(clientssl,
|
||||
t12_cipher)))
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (!TEST_true(create_ssl_connection(serverssl, clientssl,
|
||||
SSL_ERROR_NONE)))
|
||||
goto end;
|
||||
|
||||
negotiated_scipher = SSL_CIPHER_get_name(SSL_get_current_cipher(
|
||||
serverssl));
|
||||
negotiated_ccipher = SSL_CIPHER_get_name(SSL_get_current_cipher(
|
||||
clientssl));
|
||||
if (!TEST_str_eq(negotiated_scipher, negotiated_ccipher))
|
||||
goto end;
|
||||
|
||||
/*
|
||||
* TEST_strn_eq is used below because t13_cipher can contain
|
||||
* multiple ciphersuites
|
||||
*/
|
||||
if (max_ver == TLS1_3_VERSION
|
||||
&& !TEST_strn_eq(t13_cipher, negotiated_scipher,
|
||||
strlen(negotiated_scipher)))
|
||||
goto end;
|
||||
|
||||
# ifndef OPENSSL_NO_TLS1_2
|
||||
/* Below validation is not done when t12_cipher is NULL */
|
||||
if (max_ver == TLS1_2_VERSION && t12_cipher != NULL
|
||||
&& !TEST_str_eq(t12_cipher, negotiated_scipher))
|
||||
goto end;
|
||||
# endif
|
||||
|
||||
SSL_free(serverssl);
|
||||
serverssl = NULL;
|
||||
SSL_free(clientssl);
|
||||
clientssl = NULL;
|
||||
SSL_CTX_free(sctx);
|
||||
sctx = NULL;
|
||||
SSL_CTX_free(cctx);
|
||||
cctx = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
testresult = 1;
|
||||
end:
|
||||
@@ -6241,7 +6418,10 @@ static int cert_cb(SSL *s, void *arg)
|
||||
SSL_CTX *ctx = (SSL_CTX *)arg;
|
||||
BIO *in = NULL;
|
||||
EVP_PKEY *pkey = NULL;
|
||||
X509 *x509 = NULL;
|
||||
X509 *x509 = NULL, *rootx = NULL;
|
||||
STACK_OF(X509) *chain = NULL;
|
||||
char *rootfile = NULL, *ecdsacert = NULL, *ecdsakey = NULL;
|
||||
int ret = 0;
|
||||
|
||||
if (cert_cb_cnt == 0) {
|
||||
/* Suspend the handshake */
|
||||
@@ -6264,38 +6444,58 @@ static int cert_cb(SSL *s, void *arg)
|
||||
return 1;
|
||||
} else if (cert_cb_cnt == 3) {
|
||||
int rv;
|
||||
|
||||
rootfile = test_mk_file_path(certsdir, "rootcert.pem");
|
||||
ecdsacert = test_mk_file_path(certsdir, "server-ecdsa-cert.pem");
|
||||
ecdsakey = test_mk_file_path(certsdir, "server-ecdsa-key.pem");
|
||||
if (!TEST_ptr(rootfile) || !TEST_ptr(ecdsacert) || !TEST_ptr(ecdsakey))
|
||||
goto out;
|
||||
chain = sk_X509_new_null();
|
||||
if (!TEST_ptr(chain))
|
||||
goto out;
|
||||
if (!TEST_ptr(in = BIO_new(BIO_s_file()))
|
||||
|| !TEST_int_ge(BIO_read_filename(in, cert), 0)
|
||||
|| !TEST_int_ge(BIO_read_filename(in, rootfile), 0)
|
||||
|| !TEST_ptr(rootx = PEM_read_bio_X509(in, NULL, NULL, NULL))
|
||||
|| !TEST_true(sk_X509_push(chain, rootx)))
|
||||
goto out;
|
||||
rootx = NULL;
|
||||
BIO_free(in);
|
||||
if (!TEST_ptr(in = BIO_new(BIO_s_file()))
|
||||
|| !TEST_int_ge(BIO_read_filename(in, ecdsacert), 0)
|
||||
|| !TEST_ptr(x509 = PEM_read_bio_X509(in, NULL, NULL, NULL)))
|
||||
goto out;
|
||||
BIO_free(in);
|
||||
if (!TEST_ptr(in = BIO_new(BIO_s_file()))
|
||||
|| !TEST_int_ge(BIO_read_filename(in, privkey), 0)
|
||||
|| !TEST_int_ge(BIO_read_filename(in, ecdsakey), 0)
|
||||
|| !TEST_ptr(pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, NULL)))
|
||||
goto out;
|
||||
rv = SSL_check_chain(s, x509, pkey, NULL);
|
||||
rv = SSL_check_chain(s, x509, pkey, chain);
|
||||
/*
|
||||
* If the cert doesn't show as valid here (e.g., because we don't
|
||||
* have any shared sigalgs), then we will not set it, and there will
|
||||
* be no certificate at all on the SSL or SSL_CTX. This, in turn,
|
||||
* will cause tls_choose_sigalgs() to fail the connection.
|
||||
*/
|
||||
if ((rv & CERT_PKEY_VALID)) {
|
||||
if ((rv & (CERT_PKEY_VALID | CERT_PKEY_CA_SIGNATURE))
|
||||
== (CERT_PKEY_VALID | CERT_PKEY_CA_SIGNATURE)) {
|
||||
if (!SSL_use_cert_and_key(s, x509, pkey, NULL, 1))
|
||||
goto out;
|
||||
}
|
||||
BIO_free(in);
|
||||
EVP_PKEY_free(pkey);
|
||||
X509_free(x509);
|
||||
return 1;
|
||||
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
/* Abort the handshake */
|
||||
out:
|
||||
OPENSSL_free(ecdsacert);
|
||||
OPENSSL_free(ecdsakey);
|
||||
OPENSSL_free(rootfile);
|
||||
BIO_free(in);
|
||||
EVP_PKEY_free(pkey);
|
||||
X509_free(x509);
|
||||
return 0;
|
||||
X509_free(rootx);
|
||||
sk_X509_pop_free(chain, X509_free);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6303,6 +6503,10 @@ static int cert_cb(SSL *s, void *arg)
|
||||
* Test 0: Callback fails
|
||||
* Test 1: Success - no SSL_set_SSL_CTX() in the callback
|
||||
* Test 2: Success - SSL_set_SSL_CTX() in the callback
|
||||
* Test 3: Success - Call SSL_check_chain from the callback
|
||||
* Test 4: Failure - SSL_check_chain fails from callback due to bad cert in the
|
||||
* chain
|
||||
* Test 5: Failure - SSL_check_chain fails from callback due to bad ee cert
|
||||
*/
|
||||
static int test_cert_cb_int(int prot, int tst)
|
||||
{
|
||||
@@ -6310,6 +6514,12 @@ static int test_cert_cb_int(int prot, int tst)
|
||||
SSL *clientssl = NULL, *serverssl = NULL;
|
||||
int testresult = 0, ret;
|
||||
|
||||
#ifdef OPENSSL_NO_EC
|
||||
/* We use an EC cert in these tests, so we skip in a no-ec build */
|
||||
if (tst >= 3)
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(),
|
||||
TLS_client_method(),
|
||||
TLS1_VERSION,
|
||||
@@ -6319,10 +6529,11 @@ static int test_cert_cb_int(int prot, int tst)
|
||||
|
||||
if (tst == 0)
|
||||
cert_cb_cnt = -1;
|
||||
else if (tst == 3)
|
||||
else if (tst >= 3)
|
||||
cert_cb_cnt = 3;
|
||||
else
|
||||
cert_cb_cnt = 0;
|
||||
|
||||
if (tst == 2)
|
||||
snictx = SSL_CTX_new(TLS_server_method());
|
||||
SSL_CTX_set_cert_cb(sctx, cert_cb, snictx);
|
||||
@@ -6331,8 +6542,26 @@ static int test_cert_cb_int(int prot, int tst)
|
||||
NULL, NULL)))
|
||||
goto end;
|
||||
|
||||
if (tst == 4) {
|
||||
/*
|
||||
* We cause SSL_check_chain() to fail by specifying sig_algs that
|
||||
* the chain doesn't meet (the root uses an RSA cert)
|
||||
*/
|
||||
if (!TEST_true(SSL_set1_sigalgs_list(clientssl,
|
||||
"ecdsa_secp256r1_sha256")))
|
||||
goto end;
|
||||
} else if (tst == 5) {
|
||||
/*
|
||||
* We cause SSL_check_chain() to fail by specifying sig_algs that
|
||||
* the ee cert doesn't meet (the ee uses an ECDSA cert)
|
||||
*/
|
||||
if (!TEST_true(SSL_set1_sigalgs_list(clientssl,
|
||||
"rsa_pss_rsae_sha256:rsa_pkcs1_sha256")))
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE);
|
||||
if (!TEST_true(tst == 0 ? !ret : ret)
|
||||
if (!TEST_true(tst == 0 || tst == 4 || tst == 5 ? !ret : ret)
|
||||
|| (tst > 0
|
||||
&& !TEST_int_eq((cert_cb_cnt - 2) * (cert_cb_cnt - 3), 0))) {
|
||||
goto end;
|
||||
@@ -6598,10 +6827,9 @@ OPT_TEST_DECLARE_USAGE("certfile privkeyfile srpvfile tmpfile\n")
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
if (!TEST_ptr(cert = test_get_argument(0))
|
||||
|| !TEST_ptr(privkey = test_get_argument(1))
|
||||
|| !TEST_ptr(srpvfile = test_get_argument(2))
|
||||
|| !TEST_ptr(tmpfilename = test_get_argument(3)))
|
||||
if (!TEST_ptr(certsdir = test_get_argument(0))
|
||||
|| !TEST_ptr(srpvfile = test_get_argument(1))
|
||||
|| !TEST_ptr(tmpfilename = test_get_argument(2)))
|
||||
return 0;
|
||||
|
||||
if (getenv("OPENSSL_TEST_GETCOUNTS") != NULL) {
|
||||
@@ -6620,6 +6848,16 @@ int setup_tests(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
cert = test_mk_file_path(certsdir, "servercert.pem");
|
||||
if (cert == NULL)
|
||||
return 0;
|
||||
|
||||
privkey = test_mk_file_path(certsdir, "serverkey.pem");
|
||||
if (privkey == NULL) {
|
||||
OPENSSL_free(cert);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(OPENSSL_NO_TLS1_2) && !defined(OPENSSL_NO_KTLS) \
|
||||
&& !defined(OPENSSL_NO_SOCK)
|
||||
ADD_TEST(test_ktls_no_txrx_client_no_txrx_server);
|
||||
@@ -6693,12 +6931,19 @@ int setup_tests(void)
|
||||
#ifndef OPENSSL_NO_TLS1_3
|
||||
ADD_ALL_TESTS(test_set_ciphersuite, 10);
|
||||
ADD_TEST(test_ciphersuite_change);
|
||||
#ifdef OPENSSL_NO_PSK
|
||||
ADD_ALL_TESTS(test_tls13_ciphersuite, 4);
|
||||
# ifdef OPENSSL_NO_PSK
|
||||
ADD_ALL_TESTS(test_tls13_psk, 1);
|
||||
#else
|
||||
# else
|
||||
ADD_ALL_TESTS(test_tls13_psk, 4);
|
||||
#endif /* OPENSSL_NO_PSK */
|
||||
ADD_ALL_TESTS(test_tls13_key_exchange, 4);
|
||||
# endif /* OPENSSL_NO_PSK */
|
||||
# ifndef OPENSSL_NO_TLS1_2
|
||||
/* Test with both TLSv1.3 and 1.2 versions */
|
||||
ADD_ALL_TESTS(test_key_exchange, 14);
|
||||
# else
|
||||
/* Test with only TLSv1.3 versions */
|
||||
ADD_ALL_TESTS(test_key_exchange, 12);
|
||||
# endif
|
||||
ADD_ALL_TESTS(test_custom_exts, 5);
|
||||
ADD_TEST(test_stateless);
|
||||
ADD_TEST(test_pha_key_update);
|
||||
@@ -6722,7 +6967,7 @@ int setup_tests(void)
|
||||
ADD_ALL_TESTS(test_ssl_get_shared_ciphers, OSSL_NELEM(shared_ciphers_data));
|
||||
ADD_ALL_TESTS(test_ticket_callbacks, 12);
|
||||
ADD_ALL_TESTS(test_shutdown, 7);
|
||||
ADD_ALL_TESTS(test_cert_cb, 4);
|
||||
ADD_ALL_TESTS(test_cert_cb, 6);
|
||||
ADD_ALL_TESTS(test_client_cert_cb, 2);
|
||||
ADD_ALL_TESTS(test_ca_names, 3);
|
||||
return 1;
|
||||
@@ -6730,6 +6975,8 @@ int setup_tests(void)
|
||||
|
||||
void cleanup_tests(void)
|
||||
{
|
||||
OPENSSL_free(cert);
|
||||
OPENSSL_free(privkey);
|
||||
bio_s_mempacket_test_free();
|
||||
bio_s_always_retry_free();
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#include "../ssl/packet_locl.h"
|
||||
#include "internal/packet.h"
|
||||
|
||||
#include "ssltestlib.h"
|
||||
#include "testutil.h"
|
||||
|
||||
+1
-1
@@ -491,7 +491,7 @@ static int test_single_eval(void)
|
||||
&& TEST_ptr_eq(p, buf + 1)
|
||||
&& TEST_ptr_null(p = NULL)
|
||||
/* strings */
|
||||
&& TEST_str_eq(p = "123456" + 1, "23456")
|
||||
&& TEST_str_eq(p = &("123456"[1]), "23456")
|
||||
&& TEST_str_eq("3456", ++p)
|
||||
&& TEST_str_ne(p++, "456")
|
||||
/* memory */
|
||||
|
||||
@@ -537,4 +537,15 @@ void test_clearstanza(STANZA *s);
|
||||
*/
|
||||
char *glue_strings(const char *list[], size_t *out_len);
|
||||
|
||||
/*
|
||||
* Pseudo random number generator of low quality but having repeatability
|
||||
* across platforms. The two calls are replacements for random(3) and
|
||||
* srandom(3).
|
||||
*/
|
||||
uint32_t test_random(void);
|
||||
void test_random_seed(uint32_t sd);
|
||||
|
||||
/* Create a file path from a directory and a filename */
|
||||
char *test_mk_file_path(const char *dir, const char *file);
|
||||
|
||||
#endif /* HEADER_TESTUTIL_H */
|
||||
+24
-6
@@ -114,7 +114,7 @@ static void set_seed(int s)
|
||||
seed = (int)time(NULL);
|
||||
test_printf_stdout("%*s# RAND SEED %d\n", subtest_level(), "", seed);
|
||||
test_flush_stdout();
|
||||
srand(seed);
|
||||
test_random_seed(seed);
|
||||
}
|
||||
|
||||
|
||||
@@ -162,10 +162,10 @@ static int check_single_test_params(char *name, char *testname, char *itname)
|
||||
if (strcmp(name, all_tests[i].test_case_name) == 0) {
|
||||
single_test = 1 + i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i >= num_tests)
|
||||
single_test = atoi(name);
|
||||
if (i >= num_tests)
|
||||
single_test = atoi(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ int run_tests(const char *test_prog_name)
|
||||
permute[i] = i;
|
||||
if (seed != 0)
|
||||
for (i = num_tests - 1; i >= 1; i--) {
|
||||
j = rand() % (1 + i);
|
||||
j = test_random() % (1 + i);
|
||||
ii = permute[j];
|
||||
permute[j] = permute[i];
|
||||
permute[i] = ii;
|
||||
@@ -373,7 +373,7 @@ int run_tests(const char *test_prog_name)
|
||||
jstep = 1;
|
||||
else
|
||||
do
|
||||
jstep = rand() % all_tests[i].num;
|
||||
jstep = test_random() % all_tests[i].num;
|
||||
while (jstep == 0 || gcd(all_tests[i].num, jstep) != 1);
|
||||
|
||||
for (jj = 0; jj < all_tests[i].num; jj++) {
|
||||
@@ -439,3 +439,21 @@ char *glue_strings(const char *list[], size_t *out_len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *test_mk_file_path(const char *dir, const char *file)
|
||||
{
|
||||
# ifndef OPENSSL_SYS_VMS
|
||||
const char *sep = "/";
|
||||
# else
|
||||
const char *sep = "";
|
||||
# endif
|
||||
size_t len = strlen(dir) + strlen(sep) + strlen(file) + 1;
|
||||
char *full_file = OPENSSL_zalloc(len);
|
||||
|
||||
if (full_file != NULL) {
|
||||
OPENSSL_strlcpy(full_file, dir, len);
|
||||
OPENSSL_strlcat(full_file, sep, len);
|
||||
OPENSSL_strlcat(full_file, file, len);
|
||||
}
|
||||
|
||||
return full_file;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "../testutil.h"
|
||||
|
||||
/*
|
||||
* This is an implementation of the algorithm used by the GNU C library's
|
||||
* random(3) pseudorandom number generator as described:
|
||||
* https://www.mscs.dal.ca/~selinger/random/
|
||||
*/
|
||||
static uint32_t test_random_state[31];
|
||||
|
||||
uint32_t test_random(void) {
|
||||
static unsigned int pos = 3;
|
||||
|
||||
if (pos == 31)
|
||||
pos = 0;
|
||||
test_random_state[pos] += test_random_state[(pos + 28) % 31];
|
||||
return test_random_state[pos++] / 2;
|
||||
}
|
||||
|
||||
void test_random_seed(uint32_t sd) {
|
||||
int i;
|
||||
int32_t s;
|
||||
const unsigned int mod = (1u << 31) - 1;
|
||||
|
||||
test_random_state[0] = sd;
|
||||
for (i = 1; i < 31; i++) {
|
||||
s = (int32_t)test_random_state[i - 1];
|
||||
test_random_state[i] = (uint32_t)((16807 * (int64_t)s) % mod);
|
||||
}
|
||||
for (i = 34; i < 344; i++)
|
||||
test_random();
|
||||
}
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
#include <string.h>
|
||||
#include "ssltestlib.h"
|
||||
#include "testutil.h"
|
||||
#include "../ssl/packet_locl.h"
|
||||
#include "internal/packet.h"
|
||||
|
||||
static char *cert = NULL;
|
||||
static char *privkey = NULL;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <openssl/buffer.h>
|
||||
#include "../ssl/packet_locl.h"
|
||||
#include "internal/packet.h"
|
||||
#include "testutil.h"
|
||||
|
||||
static const unsigned char simple1[] = { 0xff };
|
||||
|
||||
Reference in New Issue
Block a user