From 12455d6eff265f95b0a7e20595630321799f50a2 Mon Sep 17 00:00:00 2001 From: miod <> Date: Sun, 9 Nov 2014 19:17:13 +0000 Subject: GOST crypto algorithms (well, most of them), ported from the removed GOST engine to regular EVP citizens, contributed by Dmitry Eremin-Solenikov; libcrypto bits only for now. This is a verbatim import of Dmitry's work, and does not compile in this state; the forthcoming commits will address these issues. None of the GOST code is enabled in libcrypto yet, for it still gets compiled with OPENSSL_NO_GOST defined. However, the public header gost.h will be installed. --- src/lib/libcrypto/objects/obj_mac.num | 12 ++++++++++++ src/lib/libcrypto/objects/obj_xref.h | 6 +++++- src/lib/libcrypto/objects/obj_xref.txt | 2 ++ src/lib/libcrypto/objects/objects.txt | 15 +++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/objects') diff --git a/src/lib/libcrypto/objects/obj_mac.num b/src/lib/libcrypto/objects/obj_mac.num index bcdda5163e..d3a658e59c 100644 --- a/src/lib/libcrypto/objects/obj_mac.num +++ b/src/lib/libcrypto/objects/obj_mac.num @@ -935,3 +935,15 @@ brainpoolP512r1 934 brainpoolP512t1 935 FRP256v1 936 chacha20 937 +gost89_ecb 938 +gost89_cbc 939 +tc26 940 +id_tc26_gost3411_2012_256 941 +id_tc26_gost3411_2012_512 942 +id_tc26_gost_3410_2012_512_paramSetA 943 +id_tc26_gost_3410_2012_512_paramSetB 944 +id_tc26_gost_28147_param_Z 945 +id_tc26_gost3410_2012_256 946 +id_tc26_gost3410_2012_512 947 +id_tc26_signwithdigest_gost3410_2012_256 948 +id_tc26_signwithdigest_gost3410_2012_512 949 diff --git a/src/lib/libcrypto/objects/obj_xref.h b/src/lib/libcrypto/objects/obj_xref.h index fec28d1127..4499456694 100644 --- a/src/lib/libcrypto/objects/obj_xref.h +++ b/src/lib/libcrypto/objects/obj_xref.h @@ -1,4 +1,4 @@ -/* $OpenBSD: obj_xref.h,v 1.2 2014/06/12 15:49:30 deraadt Exp $ */ +/* $OpenBSD: obj_xref.h,v 1.3 2014/11/09 19:17:13 miod Exp $ */ /* AUTOGENERATED BY objxref.pl, DO NOT EDIT */ typedef struct @@ -40,6 +40,8 @@ static const nid_triple sigoid_srt[] = {NID_id_GostR3411_94_with_GostR3410_94_cc, NID_id_GostR3411_94, NID_id_GostR3410_94_cc}, {NID_id_GostR3411_94_with_GostR3410_2001_cc, NID_id_GostR3411_94, NID_id_GostR3410_2001_cc}, {NID_rsassaPss, NID_undef, NID_rsaEncryption}, + {NID_id_tc26_signwithdigest_gost3410_2012_256, NID_id_tc26_gost3411_2012_256, NID_id_GostR3410_2001}, + {NID_id_tc26_signwithdigest_gost3410_2012_512, NID_id_tc26_gost3411_2012_512, NID_id_GostR3410_2001}, }; static const nid_triple * const sigoid_srt_xref[] = @@ -74,5 +76,7 @@ static const nid_triple * const sigoid_srt_xref[] = &sigoid_srt[26], &sigoid_srt[27], &sigoid_srt[28], + &sigoid_srt[30], + &sigoid_srt[31], }; diff --git a/src/lib/libcrypto/objects/obj_xref.txt b/src/lib/libcrypto/objects/obj_xref.txt index cb917182ee..dde52d8143 100644 --- a/src/lib/libcrypto/objects/obj_xref.txt +++ b/src/lib/libcrypto/objects/obj_xref.txt @@ -44,3 +44,5 @@ id_GostR3411_94_with_GostR3410_2001 id_GostR3411_94 id_GostR3410_2001 id_GostR3411_94_with_GostR3410_94 id_GostR3411_94 id_GostR3410_94 id_GostR3411_94_with_GostR3410_94_cc id_GostR3411_94 id_GostR3410_94_cc id_GostR3411_94_with_GostR3410_2001_cc id_GostR3411_94 id_GostR3410_2001_cc +id_tc26_signwithdigest_gost3410_2012_256 id_tc26_gost3411_2012_256 id_tc26_gost3410_2012_256 +id_tc26_signwithdigest_gost3410_2012_512 id_tc26_gost3411_2012_512 id_tc26_gost3410_2012_512 diff --git a/src/lib/libcrypto/objects/objects.txt b/src/lib/libcrypto/objects/objects.txt index bb44aa77a3..1ce73cc984 100644 --- a/src/lib/libcrypto/objects/objects.txt +++ b/src/lib/libcrypto/objects/objects.txt @@ -1313,3 +1313,18 @@ brainpool 1 14 : brainpoolP512t1 # ChaCha Stream Cipher !Cname chacha20 : ChaCha : chacha + : gost89-ecb + : gost89-cbc + +member-body 643 7 1 : tc26 +!Cname id-tc26-gost3411-2012-256 +tc26 1 2 2 : streebog256 : GOST R 34.11-2012 (256 bit) +!Cname id-tc26-gost3411-2012-512 +tc26 1 2 3 : streebog512 : GOST R 34-11-2012 (512 bit) +tc26 2 1 2 1 : id-tc26-gost-3410-2012-512-paramSetA +tc26 2 1 2 2 : id-tc26-gost-3410-2012-512-paramSetB +tc26 2 5 1 1 : id-tc26-gost-28147-param-Z +tc26 1 1 1 : id-tc26-gost3410-2012-256 : GOST R 34.10-2012 (256 bit) +tc26 1 1 2 : id-tc26-gost3410-2012-512 : GOST R 34.10-2012 (512 bit) +tc26 1 3 2 : id-tc26-signwithdigest-gost3410-2012-256 : GOST R 34.11-2012 with GOST R 34.10-2012 (256 bit) +tc26 1 3 3 : id-tc26-signwithdigest-gost3410-2012-512 : GOST R 34.11-2012 with GOST R 34.10-2012 (512 bit) -- cgit v1.2.3-55-g6feb