commit
c5943a8f33
@ -11,25 +11,25 @@ diff --git a/examples/ecc-benchmark.c b/examples/ecc-benchmark.c
|
||||
index 8e5e095..720d483 100644
|
||||
--- a/examples/ecc-benchmark.c
|
||||
+++ b/examples/ecc-benchmark.c
|
||||
@@ -330,8 +330,6 @@ bench_curve (const struct ecc_curve *ecc)
|
||||
@@ -307,8 +307,6 @@ bench_curve (const struct ecc_curve *ecc)
|
||||
}
|
||||
|
||||
const struct ecc_curve * const curves[] = {
|
||||
- &nettle_secp_192r1,
|
||||
- &nettle_secp_224r1,
|
||||
- &_nettle_secp_192r1,
|
||||
- &_nettle_secp_224r1,
|
||||
&_nettle_curve25519,
|
||||
&nettle_secp_256r1,
|
||||
&nettle_secp_384r1,
|
||||
&_nettle_secp_256r1,
|
||||
&_nettle_secp_384r1,
|
||||
diff --git a/examples/hogweed-benchmark.c b/examples/hogweed-benchmark.c
|
||||
index ebce903..f13ea18 100644
|
||||
--- a/examples/hogweed-benchmark.c
|
||||
+++ b/examples/hogweed-benchmark.c
|
||||
@@ -393,24 +393,6 @@ bench_ecdsa_init (unsigned size)
|
||||
@@ -412,24 +412,6 @@ bench_ecdsa_init (unsigned size)
|
||||
|
||||
switch (size)
|
||||
{
|
||||
- case 192:
|
||||
- ecc = &nettle_secp_192r1;
|
||||
- ecc = &_nettle_secp_192r1;
|
||||
- xs = "8e8e07360350fb6b7ad8370cfd32fa8c6bba785e6e200599";
|
||||
- ys = "7f82ddb58a43d59ff8dc66053002b918b99bd01bd68d6736";
|
||||
- zs = "f2e620e086d658b4b507996988480917640e4dc107808bdd";
|
||||
@ -37,7 +37,7 @@ index ebce903..f13ea18 100644
|
||||
- ctx->digest_size = 20;
|
||||
- break;
|
||||
- case 224:
|
||||
- ecc = &nettle_secp_224r1;
|
||||
- ecc = &_nettle_secp_224r1;
|
||||
- xs = "993bf363f4f2bc0f255f22563980449164e9c894d9efd088d7b77334";
|
||||
- ys = "b75fff9849997d02d135140e4d0030944589586e22df1fc4b629082a";
|
||||
- zs = "cdfd01838247f5de3cc70b688418046f10a2bfaca6de9ec836d48c27";
|
||||
@ -47,9 +47,9 @@ index ebce903..f13ea18 100644
|
||||
-
|
||||
- /* From RFC 4754 */
|
||||
case 256:
|
||||
ecc = &nettle_secp_256r1;
|
||||
ecc = &_nettle_secp_256r1;
|
||||
xs = "2442A5CC 0ECD015F A3CA31DC 8E2BBC70 BF42D60C BCA20085 E0822CB0 4235E970";
|
||||
@@ -581,16 +563,6 @@ bench_openssl_ecdsa_init (unsigned size)
|
||||
@@ -783,16 +765,6 @@ bench_openssl_ecdsa_init (unsigned size)
|
||||
|
||||
switch (size)
|
||||
{
|
||||
@ -66,7 +66,7 @@ index ebce903..f13ea18 100644
|
||||
case 256:
|
||||
ctx->key = EC_KEY_new_by_curve_name (NID_X9_62_prime256v1);
|
||||
ctx->digest_length = SHA256_DIGEST_SIZE;
|
||||
@@ -704,14 +676,10 @@ struct alg alg_list[] = {
|
||||
@@ -924,14 +896,10 @@ struct alg alg_list[] = {
|
||||
#if 0
|
||||
{ "dsa",2048, bench_dsa_init, bench_dsa_sign, bench_dsa_verify, bench_dsa_clear },
|
||||
#endif
|
||||
@ -85,11 +85,11 @@ diff --git a/testsuite/ecdh-test.c b/testsuite/ecdh-test.c
|
||||
index 5a2b39d..08870b1 100644
|
||||
--- a/testsuite/ecdh-test.c
|
||||
+++ b/testsuite/ecdh-test.c
|
||||
@@ -138,26 +138,6 @@ test_dh (const char *name, const struct ecc_curve *ecc,
|
||||
void
|
||||
test_main(void)
|
||||
{
|
||||
- test_dh ("secp-192r1", &nettle_secp_192r1,
|
||||
@@ -179,26 +179,6 @@ test_dh (const char *name, const struct ecc_curve *ecc,
|
||||
"5298249600854377235107392014200406283816103564916230704184",
|
||||
1);
|
||||
|
||||
- test_dh ("secp-192r1", &_nettle_secp_192r1,
|
||||
- "3406157206141798348095184987208239421004566462391397236532",
|
||||
- "1050363442265225480786760666329560655512990381040021438562",
|
||||
- "5298249600854377235107392014200406283816103564916230704184",
|
||||
@ -99,7 +99,7 @@ index 5a2b39d..08870b1 100644
|
||||
- "149293809021051532782730990145509724807636529827149481690",
|
||||
- "2891131861147398318714693938158856874319184314120776776192");
|
||||
-
|
||||
- test_dh ("secp-224r1", &nettle_secp_224r1,
|
||||
- test_dh ("secp-224r1", &_nettle_secp_224r1,
|
||||
- "1321072106881784386340709783538698930880431939595776773514895067682",
|
||||
- "6768311794185371282972144247871764855860666277647541840973645586477",
|
||||
- "2880077809069104378181313860274147139049600284805670362929579614547",
|
||||
@ -109,7 +109,7 @@ index 5a2b39d..08870b1 100644
|
||||
- "8330362698029245839097779050425944245826040430538860338085968752913",
|
||||
- "24167244512472228715617822000878192535267113543393576038737592837010");
|
||||
-
|
||||
test_dh ("secp-256r1", &nettle_secp_256r1,
|
||||
test_dh ("secp-256r1", &_nettle_secp_256r1,
|
||||
"94731533361265297353914491124013058635674217345912524033267198103710636378786",
|
||||
"22441589863306126152768848344973918725077248391248404659242620344938484650846",
|
||||
diff --git a/testsuite/ecdsa-sign-test.c b/testsuite/ecdsa-sign-test.c
|
||||
@ -120,7 +120,7 @@ index 559de8e..2e84ed7 100644
|
||||
{
|
||||
/* Test cases for the smaller groups, verified with a
|
||||
proof-of-concept implementation done for Yubico AB. */
|
||||
- test_ecdsa (&nettle_secp_192r1,
|
||||
- test_ecdsa (&_nettle_secp_192r1,
|
||||
- "DC51D3866A15BACDE33D96F992FCA99D"
|
||||
- "A7E6EF0934E70975", /* z */
|
||||
-
|
||||
@ -136,7 +136,7 @@ index 559de8e..2e84ed7 100644
|
||||
- "a91fb738f9f175d72f9c98527e881c36"
|
||||
- "8de68cb55ffe589"); /* s */
|
||||
-
|
||||
- test_ecdsa (&nettle_secp_224r1,
|
||||
- test_ecdsa (&_nettle_secp_224r1,
|
||||
- "446df0a771ed58403ca9cb316e617f6b"
|
||||
- "158420465d00a69601e22858", /* z */
|
||||
-
|
||||
@ -153,42 +153,46 @@ index 559de8e..2e84ed7 100644
|
||||
- "f2715c38a95c31a2b486995f"); /* s */
|
||||
-
|
||||
/* From RFC 4754 */
|
||||
test_ecdsa (&nettle_secp_256r1,
|
||||
test_ecdsa (&_nettle_secp_256r1,
|
||||
"DC51D386 6A15BACD E33D96F9 92FCA99D"
|
||||
diff --git a/testsuite/testutils.c b/testsuite/testutils.c
|
||||
index c965618..7f6745a 100644
|
||||
--- a/testsuite/testutils.c
|
||||
+++ b/testsuite/testutils.c
|
||||
@@ -1391,8 +1391,6 @@ test_dsa_key(const struct dsa_params *params,
|
||||
@@ -1656,8 +1656,6 @@ test_dsa_key(const struct dsa_params *params,
|
||||
}
|
||||
|
||||
const struct ecc_curve * const ecc_curves[] = {
|
||||
- &nettle_secp_192r1,
|
||||
- &nettle_secp_224r1,
|
||||
&nettle_secp_256r1,
|
||||
&nettle_secp_384r1,
|
||||
&nettle_secp_521r1,
|
||||
@@ -1449,20 +1447,6 @@ test_ecc_mul_a (unsigned curve, unsigned n, const mp_limb_t *p)
|
||||
{
|
||||
/* For each curve, the points 2 g, 3 g and 4 g */
|
||||
static const struct ecc_ref_point ref[6][3] = {
|
||||
- { { "dafebf5828783f2ad35534631588a3f629a70fb16982a888",
|
||||
- &_nettle_secp_192r1,
|
||||
- &_nettle_secp_224r1,
|
||||
&_nettle_secp_256r1,
|
||||
&_nettle_secp_384r1,
|
||||
&_nettle_secp_521r1,
|
||||
@@ -1714,24 +1712,6 @@ test_ecc_mul_a (unsigned curve, unsigned n, const mp_limb_t *p)
|
||||
|
||||
/* For each curve, the points g, 2 g, 3 g and 4 g */
|
||||
static const struct ecc_ref_point ecc_ref[9][4] = {
|
||||
- { { "188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",
|
||||
- "07192b95ffc8da78631011ed6b24cdd573f977a11e794811" },
|
||||
- { "dafebf5828783f2ad35534631588a3f629a70fb16982a888",
|
||||
- "dd6bda0d993da0fa46b27bbc141b868f59331afa5c7e93ab" },
|
||||
- { "76e32a2557599e6edcd283201fb2b9aadfd0d359cbb263da",
|
||||
- { "76e32a2557599e6edcd283201fb2b9aadfd0d359cbb263da",
|
||||
- "782c37e372ba4520aa62e0fed121d49ef3b543660cfd05fd" },
|
||||
- { "35433907297cc378b0015703374729d7a4fe46647084e4ba",
|
||||
- { "35433907297cc378b0015703374729d7a4fe46647084e4ba",
|
||||
- "a2649984f2135c301ea3acb0776cd4f125389b311db3be32" }
|
||||
- },
|
||||
- { { "706a46dc76dcb76798e60e6d89474788d16dc18032d268fd1a704fa6",
|
||||
- },
|
||||
- { { "b70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21",
|
||||
- "bd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34" },
|
||||
- { "706a46dc76dcb76798e60e6d89474788d16dc18032d268fd1a704fa6",
|
||||
- "1c2b76a7bc25e7702a704fa986892849fca629487acf3709d2e4e8bb" },
|
||||
- { "df1b1d66a551d0d31eff822558b9d2cc75c2180279fe0d08fd896d04",
|
||||
- { "df1b1d66a551d0d31eff822558b9d2cc75c2180279fe0d08fd896d04",
|
||||
- "a3f7f03cadd0be444c0aa56830130ddf77d317344e1af3591981a925" },
|
||||
- { "ae99feebb5d26945b54892092a8aee02912930fa41cd114e40447301",
|
||||
- { "ae99feebb5d26945b54892092a8aee02912930fa41cd114e40447301",
|
||||
- "482580a0ec5bc47e88bc8c378632cd196cb3fa058a7114eb03054c9" },
|
||||
- },
|
||||
{ { "7cf27b188d034f7e8a52380304b51ac3c08969e277f21b35a60b48fc47669978",
|
||||
"7775510db8ed040293d9ac69f7430dbba7dade63ce982299e04b79d227873d1" },
|
||||
{ "5ecbe4d1a6330a44c8f7ef951d4bf165e6c6b721efada985fb41661bc6e7fd6c",
|
||||
- },
|
||||
{ { "6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",
|
||||
"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" },
|
||||
{ "7cf27b188d034f7e8a52380304b51ac3c08969e277f21b35a60b48fc47669978",
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
Binary file not shown.
BIN
nettle-3.6.tar.gz
Normal file
BIN
nettle-3.6.tar.gz
Normal file
Binary file not shown.
25
nettle.spec
25
nettle.spec
@ -1,6 +1,6 @@
|
||||
Name: nettle
|
||||
Version: 3.4.1rc1
|
||||
Release: 4
|
||||
Version: 3.6
|
||||
Release: 5
|
||||
Summary: A low-level cryptographic library
|
||||
License: LGPLv3+ or GPLv2+
|
||||
URL: https://www.lysator.liu.se/~nisse/nettle/
|
||||
@ -8,7 +8,9 @@ Source0: https://www.lysator.liu.se/~nisse/archive/%{name}-%{version}.tar
|
||||
|
||||
Patch0: 0000-nettle-3.3-remove-ecc-testsuite.patch
|
||||
BuildRequires: automake autoconf fipscheck gcc gettext-devel gmp-devel libtool m4
|
||||
BuildRequires: nettle
|
||||
|
||||
Provides: libnettle.so.6()(64bit) libnettle.so.6(NETTLE_6)(64bit) libhogweed.so.4()(64bit) libhogweed.so.4(HOGWEED_4)(64bit)
|
||||
%description
|
||||
Nettle is a cryptographic library designed to fit any context:
|
||||
in crypto toolkits for object-oriented languages, in applications
|
||||
@ -24,7 +26,7 @@ The devel for %{name}
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-3.4.1 -p1
|
||||
%autosetup -n %{name}-3.6 -p1
|
||||
|
||||
sed s/ggdb3/g/ -i configure
|
||||
sed 's/ecc-192.c//g' -i Makefile.in
|
||||
@ -39,9 +41,11 @@ autoreconf -ifv
|
||||
%make_install
|
||||
make install-shared
|
||||
install -D -p -m0644 nettle.info "$RPM_BUILD_ROOT%{_infodir}/nettle.info"
|
||||
cp -p %{_libdir}/libnettle.so.6.* $RPM_BUILD_ROOT%{_libdir}/
|
||||
cp -p %{_libdir}/libhogweed.so.4.* $RPM_BUILD_ROOT%{_libdir}/
|
||||
|
||||
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libnettle.so.6.*
|
||||
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.4.*
|
||||
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libnettle.so.8.*
|
||||
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.6.*
|
||||
|
||||
%check
|
||||
make check
|
||||
@ -53,7 +57,8 @@ make check
|
||||
%{_infodir}/nettle.info.gz
|
||||
%{_libdir}/libnettle.so.6*
|
||||
%{_libdir}/libhogweed.so.4*
|
||||
%exclude %{_infodir}/dir
|
||||
%{_libdir}/libnettle.so.8*
|
||||
%{_libdir}/libhogweed.so.6*
|
||||
%exclude %{_bindir}/*
|
||||
|
||||
%files devel
|
||||
@ -66,12 +71,18 @@ make check
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%doc NEWS README TODO
|
||||
%doc NEWS README
|
||||
%doc nettle.html
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%changelog
|
||||
* Tue Jul 21 2020 cuibaobao <cuibaobao1@huawei.com> - 3.6-5
|
||||
- Type:update
|
||||
- Id:NA
|
||||
- SUG:NA
|
||||
- DESC:update to 3.6
|
||||
|
||||
* Mon Oct 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.4.1rc1-4
|
||||
- Type:enhancement
|
||||
- Id:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user