summaryrefslogtreecommitdiff
path: root/mpi/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* Update m4 files and Makefiles.NIIBE Yutaka2023-04-271-2/+2
| | | | | | | | | | | | | * acinclude.m4: Use URL and add SPDX identifier. * m4/noexecstack.m4: Likewise. * Makefile.am: Likewise. * doc/Makefile.am: Likewise. * mpi/Makefile.am: Likewise. * tests/Makefile.am: Likewise. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* mpi: Add missing header file to the tarballJakub Jelen2022-01-251-1/+1
| | | | | | | * mpi/Makefile.am: Add missing header file. -- Signed-off-by: Jakub Jelen <jjelen@redhat.com>
* ec: add zSeries/s390x accelerated scalar multiplicationJussi Kivilinna2021-07-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cipher/asm-inline-s390x.h (PCC_FUNCTION_*): New. (pcc_query, pcc_scalar_multiply): New. * mpi/Makefile.am: Add 'ec-hw-s390x.c'. * mpi/ec-hw-s390x.c: New. * mpi/ec-internal.h (_gcry_s390x_ec_hw_mul_point) (mpi_ec_hw_mul_point): New. * mpi/ec.c (_gcry_mpi_ec_mul_point): Call 'mpi_ec_hw_mul_point'. * src/g10lib.h (HWF_S390X_MSA_9): New. * src/hwf-s390x.c (s390x_features): Add MSA9. * src/hwfeatures.c (hwflist): Add 's390x-msa-9'. -- Patch adds ECC scalar multiplication acceleration using s390x's PCC instruction. Following curves are supported: - Ed25519 - Ed448 - X25519 - X448 - NIST curves P-256, P-384 and P-521 Benchmark on z15 (5.2Ghz): Before: Ed25519 | nanosecs/iter cycles/iter mult | 389791 2026916 keygen | 572017 2974487 sign | 636603 3310336 verify | 1189097 6183305 = X25519 | nanosecs/iter cycles/iter mult | 296805 1543385 = Ed448 | nanosecs/iter cycles/iter mult | 1693373 8805541 keygen | 2382473 12388858 sign | 2609562 13569725 verify | 5177606 26923552 = X448 | nanosecs/iter cycles/iter mult | 1136178 5908127 = NIST-P256 | nanosecs/iter cycles/iter mult | 792620 4121625 keygen | 4627835 24064740 sign | 1528268 7946991 verify | 1678205 8726664 = NIST-P384 | nanosecs/iter cycles/iter mult | 1766418 9185373 keygen | 10158485 52824123 sign | 3341172 17374095 verify | 3694750 19212700 = NIST-P521 | nanosecs/iter cycles/iter mult | 3172566 16497346 keygen | 18184747 94560683 sign | 6039956 31407771 verify | 6480882 33700588 After: Ed25519 | nanosecs/iter cycles/iter speed-up mult | 25913 134746 15x keygen | 44447 231124 12x sign | 106928 556028 6x verify | 164681 856341 7x = X25519 | nanosecs/iter cycles/iter speed-up mult | 17761 92358 16x = Ed448 | nanosecs/iter cycles/iter speed-up mult | 50808 264199 33x keygen | 68644 356951 34x sign | 317446 1650720 8x verify | 457115 2376997 11x = X448 | nanosecs/iter cycles/iter speed-up mult | 35637 185313 31x = NIST-P256 | nanosecs/iter cycles/iter speed-up mult | 30678 159528 25x keygen | 323722 1683356 14x sign | 114176 593713 13x verify | 169901 883487 9x = NIST-P384 | nanosecs/iter cycles/iter speed-up mult | 59966 311822 29x keygen | 607778 3160445 16x sign | 209832 1091128 16x verify | 329506 1713431 11x = NIST-P521 | nanosecs/iter cycles/iter speed-up mult | 98230 510797 32x keygen | 1131686 5884765 16x sign | 397777 2068442 15x verify | 623076 3239998 10x Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
* mpi/ec: add fast reduction functions for NIST curvesJussi Kivilinna2021-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (ASM_DISABLED): New. * mpi/Makefile.am: Add 'ec-nist.c' and 'ec-inline.h'. * mpi/ec-nist.c: New. * mpi/ec-inline.h: New. * mpi/ec-internal.h (_gcry_mpi_ec_nist192_mod) (_gcry_mpi_ec_nist224_mod, _gcry_mpi_ec_nist256_mod) (_gcry_mpi_ec_nist384_mod, _gcry_mpi_ec_nist521_mod): New. * mpi/ec.c (ec_addm, ec_subm, ec_mulm, ec_mul2): Use 'ctx->mod'. (field_table): Add 'mod' function; Add NIST reduction functions. (ec_p_init): Setup ctx->mod; Setup function pointers from field_table only if pointer is not NULL; Resize ctx->a and ctx->b only if set. * mpi/mpi-internal.h (RESIZE_AND_CLEAR_IF_NEEDED): New. * mpi/mpiutil.c (_gcry_mpi_resize): Clear all unused limbs also in realloc case. * src/ec-context.h (mpi_ec_ctx_s): Add 'mod' function. -- Benchmark on AMD Ryzen 7 5800X (x86_64): Before: NIST-P192 | nanosecs/iter cycles/iter auto Mhz mult | 283346 1369473 4833 keygen | 1688442 8185744 4848 sign | 549683 2662984 4845 verify | 615284 2984325 4850 = NIST-P224 | nanosecs/iter cycles/iter auto Mhz mult | 516443 2501173 4843 keygen | 2859746 13866802 4849 sign | 918472 4455043 4850 verify | 1057940 5131372 4850 = NIST-P256 | nanosecs/iter cycles/iter auto Mhz mult | 423536 2054040 4850 keygen | 2383097 11557572 4850 sign | 774346 3754243 4848 verify | 864934 4196315 4852 = NIST-P384 | nanosecs/iter cycles/iter auto Mhz mult | 929985 4511881 4852 keygen | 5230788 25367299 4850 sign | 1671432 8109726 4852 verify | 1902729 9228568 4850 = NIST-P521 | nanosecs/iter cycles/iter auto Mhz mult | 2123546 10300952 4851 keygen | 12019340 58297774 4850 sign | 3886988 18853054 4850 verify | 4507885 21864015 4850 After: NIST-P192 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 186679 905603 4851 +51% keygen | 1161423 5623822 4842 +46% sign | 389531 1887557 4846 +41% verify | 412936 2000461 4844 +49% = NIST-P224 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 260621 1256327 4821 +99% keygen | 1557845 7531677 4835 +84% sign | 521678 2527083 4844 +76% verify | 554084 2677949 4833 +92% = NIST-P256 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 319045 1542061 4833 +33% keygen | 1834822 8898950 4850 +30% sign | 612866 2972630 4850 +26% verify | 664821 3222597 4847 +30% = NIST-P384 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 593894 2875260 4841 +57% keygen | 3526600 17089717 4846 +48% sign | 1178098 5710151 4847 +42% verify | 1260185 6107449 4846 +51% = NIST-P521 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 1160220 5621946 4846 +83% keygen | 6862975 33247351 4844 +75%ยด sign | 2287366 11096711 4851 +70% verify | 2455858 11888045 4841 +84% Benchmark on AMD Ryzen 7 5800X (i386): Before: NIST-P192 | nanosecs/iter cycles/iter auto Mhz mult | 648039 3143236 4850 keygen | 3554452 17244822 4852 sign | 1163173 5641932 4850 verify | 1300076 6305673 4850 = NIST-P224 | nanosecs/iter cycles/iter auto Mhz mult | 798607 3874405 4851 keygen | 4657604 22589864 4850 sign | 1515803 7352049 4850 verify | 1635470 7935373 4852 = NIST-P256 | nanosecs/iter cycles/iter auto Mhz mult | 927033 4496283 4850 keygen | 5313601 25771983 4850 sign | 1735795 8418514 4850 verify | 1945804 9438212 4851 = NIST-P384 | nanosecs/iter cycles/iter auto Mhz mult | 2301781 11164473 4850 keygen | 12856001 62353242 4850 sign | 4161041 20180651 4850 verify | 4705961 22827478 4851 = NIST-P521 | nanosecs/iter cycles/iter auto Mhz mult | 6066635 29422721 4850 keygen | 32995868 160046407 4850 sign | 10503306 50945387 4850 verify | 12225252 59294323 4850 After: NIST-P192 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 413605 2007498 4854 +57% keygen | 2479429 12010926 4844 +44% sign | 825111 3997147 4844 +41% verify | 890206 4318723 4851 +46% = NIST-P224 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 551703 2676454 4851 +45% keygen | 3257022 15781844 4845 +43% sign | 1085678 5258894 4844 +40% verify | 1172195 5678499 4844 +40% = NIST-P256 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 720395 3497486 4855 +29% keygen | 4217758 20461257 4851 +26% sign | 1404350 6814131 4852 +24% verify | 1515136 7353955 4854 +28% = NIST-P384 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 1525742 7400771 4851 +51% keygen | 9046660 43877889 4850 +42% sign | 2974641 14408703 4844 +40% verify | 3265285 15834951 4849 +44% = NIST-P521 | nanosecs/iter cycles/iter auto Mhz speed-up mult | 3289348 15968678 4855 +84% keygen | 19354174 93873531 4850 +70% sign | 6351493 30830140 4854 +65% verify | 6979292 33854215 4851 +75% Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
* mpih: Expose const-time MPI helper functions.NIIBE Yutaka2020-04-161-1/+2
| | | | | | | | | | | * mpi/Makefile.am (libmpi_la_SOURCES): Add mpih-const-time.c. * mpi/ec.c (mpih_set_cond): Move to mpih-const-time.c. * mpi/mpi-internal.h: Add macros and declarations. * mpi/mpi-inv.c (mpih_add_n_cond): Likewise. (mpih_sub_n_cond, mpih_swap_cond, mpih_abs_cond): Likewise. * mpi/mpih-const-time.c: New. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* aarch64: mpi: Distribute the header file as a part of source.NIIBE Yutaka2018-11-021-0/+1
| | | | | | | | | * mpi/Makefile.am (EXTRA_libmpi_la_SOURCES): Add asm-common-aarch64.h. -- Fixes-commit: ec0a2f25c0f64a7b65b373508ce9081e10461965 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Remove the old Manifest filesWerner Koch2015-01-061-1/+1
| | | | | | | | -- The Manifest file have been part of an experiment a long time ago to implement source level integrity. I is not maintained for more than a decade and with the advent of git this is superfluous anyway.
* ecc: Prepare for future Ed25519 optimization.Werner Koch2013-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * mpi/ec-ed25519.c: New but empty file. * mpi/ec-internal.h: New. * mpi/ec.c: Include ec-internal.h. (ec_mod): New. (ec_addm): Use ec_mod. (ec_mulm): Remove commented code. Use ec_mod. (ec_subm): Call simple sub. (ec_pow2): Use ec_mulm. (ec_mul2): New. (dup_point_weierstrass): Use ec_mul2. (dup_point_twistededwards): Add special case for a == -1. Use ec_mul2. (add_points_weierstrass): Use ec_mul2. (add_points_twistededwards): Add special case for a == -1. (_gcry_mpi_ec_curve_point): Ditto. (ec_p_init): Add hack to test Barrett functions. * src/ec-context.h (mpi_ec_ctx_s): Add P_BARRETT. * mpi/mpi-mod.c (_gcry_mpi_mod_barrett): Fix sign problem. Signed-off-by: Werner Koch <wk@gnupg.org>
* Nuked almost all trailing whitespace.post-nuke-of-trailing-wsWerner Koch2011-02-041-9/+9
| | | | Check and install the standard git pre-commit hook.
* 2007-05-09 Marcus Brinkmann <marcus@g10code.de>Marcus Brinkmann2007-05-091-126/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (ac_cv_mpi_config_done): Unused variable removed. (ac_cv_mpi_mod_list, MPI_MOD_LIST_LO, MPI_MOD_LIST_O): Removed. (MPI_MOD_ASM_MPIH_ADD1, MPI_MOD_ASM_MPIH_SUB1, MPI_MOD_ASM_MPIH_MUL1, MPI_MOD_ASM_MPIH_MUL2, MPI_MOD_ASM_MPIH_MUL3, MPI_MOD_ASM_MPIH_LSHIFT, MPI_MOD_ASM_MPIH_RSHIFT, MPI_MOD_ASM_MPIH_UDIV, MPI_MOD_ASM_MPIH_UDIV_QRNND, MPI_MOD_C_MPIH_ADD1, MPI_MOD_C_MPIH_SUB1, MPI_MOD_C_MPIH_MUL1, MPI_MOD_C_MPIH_MUL2, MPI_MOD_C_MPIH_MUL3, MPI_MOD_C_MPIH_LSHIFT, MPI_MOD_C_MPIH_RSHIFT, MPI_MOD_C_MPIH_UDIV, MPI_MOD_C_MPIH_UDIV_QRNND): New automake variables. mpi/ 2007-05-09 Marcus Brinkmann <marcus@g10code.de> * config.links: Rename assembler file links by suffixing "-asm". * Makefile.am (CCASCOMPILE, LTCCASCOMPILE, CLEANFILES, libmpi_la_LIBADD, libmpi_la_DEPENDENCIES, SUFFIXES, .S.o, .S.obj, .S.lo): Removed variables and targets. (mpih_add1, mpih_sub1, mpih_mul1, mpih_mul2, mpih_mul3, mpih_lshift, mpih_rshift, mpih_udiv, mpih_udiv_qrnnd, nodist_libmpi_la_SOURCES): New variables. (DISTCLEANFILES): Rename assembler file links by suffixing "-asm". Add variants for C file links.
* ./Werner Koch2007-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | | * README.apichanges: Move to doc/. * Makefile.am (EXTRA_DIST): Removed that file. doc/ * HACKING: New. Two items by Marcus. * README.apichanges: Move from .. to here. * Makefile.am (EXTRA_DIST): Add new files. mpi/ * config.links: Create a file mod-source-info.h. * Makefile.am (DISTCLEANFILES): Add that file. * mpiutil.c (_gcry_mpi_get_hw_config): New. src/ * global.c (gcry_control): New. * gcrypt.h.in (GCRYCTL_DUMP_CONFIG): New. tests/ * version.c: New. * Makefile.am (TESTS): Add version.
* Rewrote the ECDSA implementation.Werner Koch2007-03-281-1/+2
|
* Did some performance experiments and added code for Barrett reduction.Werner Koch2007-03-231-0/+1
|
* * rndlinux.c (set_cloexec_flag): New.Werner Koch2006-12-181-5/+13
| | | | | | | | (open_device): Set close-on-exit flags. Suggested by Max Kellermann. Fixes Debian#403613. Cleaned up last Makefile changes.
* 2006-11-05 Moritz Schulte <moritz@g10code.com>Moritz Schulte2006-11-051-1/+1
| | | | | | | | | | | | | | | | * Makefile.am (AM_CFLAGS): Added -I$(top_builddir)/src so that the new gcrypt.h is used, not the one installed in the system. 2006-11-05 Moritz Schulte <moritz@g10code.com> * Makefile.am (AM_CFLAGS): Added -I$(top_builddir)/src so that the new gcrypt.h is used, not the one installed in the system. 2006-11-05 Moritz Schulte <moritz@g10code.com> * Makefile.am (AM_CFLAGS): Added -I$(top_builddir)/src so that the new gcrypt.h is used, not the one installed in the system.
* Collected changes - see ChangeLogsWerner Koch2006-07-261-0/+1
|
* ChangeLog:Moritz Schulte2005-04-221-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-04-23 Moritz Schulte <moritz@g10code.com> * acinclude.m4 (TYPE_SOCKLEN_T): New type definition test; provided by Albert Chin. * configure.ac: Don't use $(CMD) as it's not portable; use `CMD` nstead. Simpler -lnsl/-lsocket test. Use TYPE_SOCKLEN_T test. Don't forget to set `random_modules' correctly. 2005-04-22 Moritz Schulte <moritz@g10code.com> * configure.ac: Added support for pkgconfig; provided by Albert Chin. cipher/ChangeLog: 2005-04-12 Moritz Schulte <moritz@g10code.com> * ac.c (_gcry_ac_io_write, _gcry_ac_io_read): Initialize err to make the compiler happy. Always use errno, now that gcry_malloc() is guaranteed to set errno on failure. (_gcry_ac_data_to_sexp): Don't forget to goto out after error in loop. (_gcry_ac_data_to_sexp): Remove unused variable: mpi_list; (_gcry_ac_data_to_sexp): Always deallocate sexp_buffer. (_gcry_ac_data_from_sexp): Don't forget to initialize data_set_new. (_gcry_ac_data_from_sexp): Handle special case, which is necessary, since gcry_sexp_nth() does not distinguish between "element does not exist" and "element is the empty list". (_gcry_ac_io_init_va): Use assert to make sure that mode and type are correct. Use gcry_error_t types where gcry_err_code_t types have been used before. mpi/ChangeLog: 2005-04-23 Moritz Schulte <moritz@g10code.com> * Makefile.am: Don't assume the compiler will pre-process the .S files. Some compilers, like those from HP and IBM, don't do this. So, we use the same solution gnupg-1.4.0 does. Preprocess first and then compile. * hppa1.1/mpih-mul3.S: Add "level 1.1" directive to disable warning about using PA-RISC1.1 opcodes. * hppa1.1/mpih-mul2.S: Likewise. * hppa1.1/mpih-mul1.S: Likewise. * hppa1.1/udiv-qrnnd.S: Likewise. src/ChangeLog: 2005-04-22 Moritz Schulte <moritz@g10code.com> * Makefile.am (pkgconfigdir, pkgconfig_DATA): New; support for pkgconfig provided by Albert Chin. * libgcrypt.pc.in (Cflags): New file. 2005-04-16 Moritz Schulte <moritz@g10code.com> * g10lib.h (_gcry_ac_init): Declare. * global.c (global_init): Call _gcry_ac_init; don't forget to set err. tests/ChangeLog: 2005-04-22 Moritz Schulte <moritz@g10code.com> * tsexp.c: Include <config.h> in case HAVE_CONFIG_H is defined; thanks to Albert Chin. * testapi.c: Likewise. * register.c: Likewise. * pubkey.c: Likewise. * prime.c: Likewise. * pkbench.c: Likewise. * keygen.c: Likewise. * benchmark.c: Likewise. * basic.c: Likewise. * ac-schemes.c: Likewise. * ac-data.c: Likewise. * ac.c: Likewise. 2005-04-16 Moritz Schulte <moritz@g10code.com> * ac-data.c (check_run): Include new test.
* Added Manifest files.Werner Koch2003-12-191-3/+3
|
* 2003-08-19 Marcus Brinkmann <marcus@g10code.de>Moritz Schulte2003-08-271-11/+13
| | | | | | * Makefile.am (SUFFIXES): New variable. (.S.o, .S.lo, .S.obj): Rewritten.
* 2003-06-16 Moritz Schulte <moritz@g10code.com>Moritz Schulte2003-06-171-1/+1
| | | | | | | | | | | | | | | | | | * mpi-add.c: Replace last occurences of old type names with newer names (i.e. replace MPI with gcry_mpi_t). * mpi-bit.c: Likewise. * mpi-cmp.c: Likewise. * mpi-div.c: Likewise. * mpi-gcd.c: Likewise. * mpi-internal.h: Likewise. * mpi-inv.c: Likewise. * mpi-mpow.c: Likewise. * mpi-mul.c: Likewise. * mpi-pow.c: Likewise. * mpi-scan.c: Likewise. * mpicoder.c: Likewise. * mpiutil.c: Likewise.
* * longlong.h: Removed some spaces between backslashes and newlines.Werner Koch2003-01-151-2/+2
|
* * Makefile.am (DISTCLEANFILES): Include mpi-asm-defs.hWerner Koch2002-09-201-1/+2
|
* * Makefile.am (.S.lo): Pass -DPIC. i386, PPC and Sparc codeWerner Koch2002-09-181-1/+1
| | | | | require it. It worked for me because I am using the i586 code.
* * Makefile.am (.S.lo): Fixed for libtool build with --disable-shared.Werner Koch2002-08-231-4/+6
|
* * config.links: Chnage the way the mpi modules are determined.Werner Koch2002-05-151-43/+133
| | | | | | | * Makefile.am: Revamped to better handle modules * configure.ac: Adjusted for new MPI module stuff.
* Change the license to the LGPL.now-less-freedom-protectedWerner Koch2002-05-141-10/+40
|
* Changes mainly to fix automake problemsWerner Koch2001-11-151-1/+1
|
* The first libgcrypt only release.V1-1-3Werner Koch2001-05-311-1/+0
|
* CBC mode fixes for AESWerner Koch2001-01-111-2/+2
|
* Compiles againWerner Koch2000-12-191-3/+1
|
* Some configuration changesWerner Koch2000-11-141-3/+6
|
* See ChangeLog: Mon Jul 17 16:35:47 CEST 2000 Werner KochWerner Koch2000-07-171-1/+7
|
* See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner KochWerner Koch1999-12-081-3/+2
|
* See ChangeLog: Wed Jul 14 19:42:08 CEST 1999 Werner KochWerner Koch1999-07-141-14/+9
|
* See ChangeLog: Tue Jul 13 17:39:25 CEST 1999 Werner KochWerner Koch1999-07-131-2/+0
|
* See ChangeLog: Wed Jul 7 13:23:40 CEST 1999 Werner KochWerner Koch1999-07-071-12/+21
|
* See ChangeLog: Mon Apr 26 17:48:15 CEST 1999 Werner KochWerner Koch1999-04-261-2/+1
|
* See ChangeLog: Wed Apr 7 20:51:39 CEST 1999 Werner KochWerner Koch1999-04-071-3/+9
|
* See ChangeLog: Sat Feb 13 12:14:42 CET 1999 Werner KochWerner Koch1999-02-131-1/+1
|
* Not yet completed changes to support PPCWerner Koch1998-11-101-0/+1
|
* gnupg extension are now workingWerner Koch1998-06-131-1/+2
|
* add-key worksWerner Koch1998-05-261-2/+3
|
* v0.2.11Werner Koch1998-03-031-0/+2
|
* some import functionalityWerner Koch1998-02-161-2/+1
|
* a couple of changes; but some parts are now brokenWerner Koch1998-02-111-0/+1
|
* release 0.2.3Werner Koch1998-02-091-1/+1
|
* Fixed a few bugsWerner Koch1998-02-031-6/+13
|
* changed structure of trustdbWerner Koch1998-02-021-4/+4
|
* patch release 0.1.1Werner Koch1998-01-071-11/+1
|
* changed configuration stuff, replaced some Makefile.am by distfiles.Werner Koch1997-12-231-2/+1
|