Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37730055
en ru br
Репозитории ALT
S:1.10.2-alt1
5.1: 1.4.6-alt0.M51.1
4.1: 1.4.1-alt1
4.0: 1.2.4-alt1
3.0: 1.2.1-alt1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: libgcrypt

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: libgcrypt-1.8.5-curves-2012.patch
Скачать


 cipher/ecc-curves.c | 29 ++++++++++++++++++++++++-----
 tests/benchmark.c   |  2 +-
 tests/curves.c      |  2 +-
 3 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/cipher/ecc-curves.c b/cipher/ecc-curves.c
index 39bad1a..02c09f9 100644
--- a/cipher/ecc-curves.c
+++ b/cipher/ecc-curves.c
@@ -82,8 +82,15 @@ static const struct
     { "GOST2001-CryptoPro-A", "1.2.643.2.2.36.0" },
     { "GOST2001-CryptoPro-C", "1.2.643.2.2.36.1" },
 
-    { "GOST2012-tc26-A", "1.2.643.7.1.2.1.2.1" },
-    { "GOST2012-tc26-B", "1.2.643.7.1.2.1.2.2" },
+    { "GOST2012-256-A", "1.2.643.7.1.2.1.1.1" },
+    { "GOST2001-CryptoPro-A", "1.2.643.7.1.2.1.1.2" },
+    { "GOST2001-CryptoPro-A", "GOST2012-256-B" },
+    { "GOST2001-CryptoPro-B", "1.2.643.7.1.2.1.1.3" },
+    { "GOST2001-CryptoPro-B", "GOST2012-256-C" },
+    { "GOST2001-CryptoPro-C", "1.2.643.7.1.2.1.1.4" },
+    { "GOST2001-CryptoPro-C", "GOST2012-256-D" },
+    { "GOST2012-512-A", "1.2.643.7.1.2.1.2.1" },
+    { "GOST2012-512-B", "1.2.643.7.1.2.1.2.2" },
 
     { "secp256k1", "1.3.132.0.10" },
 
@@ -372,7 +379,19 @@ static const ecc_domain_parms_t domain_parms[] =
       "0x01"
     },
     {
-      "GOST2012-test", 511, 0,
+      "GOST2012-256-A", 256, 0,
+      MPI_EC_WEIERSTRASS, ECC_DIALECT_STANDARD,
+      //irr
+      "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd97",
+      "0xc2173f1513981673af4892c23035a27ce25e2013bf95aa33b22c656f277e7335",
+      "0x295f9bae7428ed9ccc20e7c359a9d41a22fccd9108e17bf7ba9337a6f8ae9513",
+      "0x400000000000000000000000000000000fd8cddfc87b6635c115af556c360c67",
+      "0x91e38443a5e82c0d880923425712b2bb658b9196932e02c78b2582fe742daa28",
+      "0x32879423ab1a0375895786c4bb46e9565fde0b5344766740af268adb32322e5c",
+      "0x01"
+    },
+    {
+      "GOST2012-512-test", 511, 0,
       MPI_EC_WEIERSTRASS, ECC_DIALECT_STANDARD,
       "0x4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15d"
       "f1d852741af4704a0458047e80e4546d35b8336fac224dd81664bbf528be6373",
@@ -389,7 +408,7 @@ static const ecc_domain_parms_t domain_parms[] =
       "0x01"
     },
     {
-      "GOST2012-tc26-A", 512, 0,
+      "GOST2012-512-A", 512, 0,
       MPI_EC_WEIERSTRASS, ECC_DIALECT_STANDARD,
       "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
         "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc7",
@@ -406,7 +425,7 @@ static const ecc_domain_parms_t domain_parms[] =
       "0x01"
     },
     {
-      "GOST2012-tc26-B", 512, 0,
+      "GOST2012-512-B", 512, 0,
       MPI_EC_WEIERSTRASS, ECC_DIALECT_STANDARD,
       "0x8000000000000000000000000000000000000000000000000000000000000000"
         "000000000000000000000000000000000000000000000000000000000000006f",
diff --git a/tests/benchmark.c b/tests/benchmark.c
index 44a8711..6a5e10e 100644
--- a/tests/benchmark.c
+++ b/tests/benchmark.c
@@ -1453,7 +1453,7 @@ ecc_bench (int iterations, int print_header)
       else if (is_gost)
         err = gcry_sexp_build (&key_spec, NULL,
                                "(genkey (ecdsa (curve %s)))",
-                               p_size == 256 ? "GOST2001-test" : "GOST2012-test");
+                               p_size == 256 ? "GOST2001-test" : "GOST2012-512-test");
       else
         err = gcry_sexp_build (&key_spec, NULL,
                                "(genkey (ECDSA (nbits %d)))", p_size);
diff --git a/tests/curves.c b/tests/curves.c
index 9e75fd5..845e91a 100644
--- a/tests/curves.c
+++ b/tests/curves.c
@@ -33,7 +33,7 @@
 #include "t-common.h"
 
 /* Number of curves defined in ../cipger/ecc.c */
-#define N_CURVES 22
+#define N_CURVES 23
 
 /* A real world sample public key.  */
 static char const sample_key_1[] =
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin