summaryrefslogtreecommitdiff
path: root/lib/freebl/freebl.gyp
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1636389 - Relocate deprecated seed algorithm. r=kjacobsBenjamin Beurdouche2020-05-141-0/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D74384
* Bug 1613238 - POWER SHA-2 digest vector acceleration. r=jcj,kjacobsLauri Kasanen2020-04-211-2/+56
| | | | Differential Revision: https://phabricator.services.mozilla.com/D70519
* Bug 1620799 - Introduce NSS_DISABLE_ARM32_NEON r=jcjGiulio Benetti2020-04-011-2/+12
| | | | | | | Only some Arm32 supports neon, so let's introduce NSS_DISABLE_ARM32_NEON to allow disabling Neon acceleration when building for Arm32. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
* Bug 1624377 - Replace freebl flag -msse4 by -msse4.1 -msse4.2 which are ↵Benjamin Beurdouche2020-03-261-6/+12
| | | | | | supported by older compilers r=kjacobs Differential Revision: https://phabricator.services.mozilla.com/D68407
* Bug 1612493 - Support for HACL* AVX2 code for Chacha20, Poly1305 and ↵Benjamin Beurdouche2020-02-281-7/+76
| | | | | | | | | | | | | | | | | Chacha20Poly1305. r=kjacobs *** Bug 1612493 - Import AVX2 code from HACL* *** Bug 1612493 - Add CPU detection for AVX2, BMI1, BMI2, FMA, MOVBE *** Bug 1612493 - New flag NSS_DISABLE_AVX2 for freebl/Makefile and freebl.gyp *** Bug 1612493 - Disable use of AVX2 on GCC 4.4 which doesn’t support -mavx2 *** Bug 1612493 - Disable tests when the platform doesn't have support for AVX2 Differential Revision: https://phabricator.services.mozilla.com/D64718
* Bug 1612177 - Set -march=armv7 when compiling gcm-arm32-neon, in order to ↵Mikael Urankar2020-02-121-0/+1
| | | | enable NEON code generation.
* Bug 1608151 - Introduce NSS_DISABLE_ALTIVEC and disable_altivec r=jcjGiulio Benetti2020-01-271-2/+12
| | | | | | | | At the moment NSS assumes that every PowerPC64 architecture supports Altivec but it's not true and this leads to build failure. So add NSS_DISABLE_ALTIVEC environment variable(and disable_altivec for gyp) to disable Altivec extension on PowerPC build that don't support Altivec.
* Bug 1608327 - Fix freebl arm NEON code use on tier3 platforms. r=jcjMike Hommey2020-01-141-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Despite the code having runtime detection of NEON and crypto extensions, the optimized code using those instructions is disabled at build time on platforms where the compiler doesn't enable NEON by default of with the flags it's given for the caller code. In the case of gcm, this goes as far as causing a build error. What is needed is for the optimized code to be enabled in every case, letting the caller code choose whether to use that code based on the existing runtime checks. But this can't be simply done either, because those optimized parts of the code need to be built with NEON enabled, unconditionally, but that is not compatible with platforms using the softfloat ABI. For those, we need to use the softfp ABI, which is compatible. However, the softfp ABI is not compatible with the hardfp ABI, so we also can't unconditionally use the softfp ABI, so we do so only when the compiler targets the softfloat ABI, which confusingly enough is advertized via the `__SOFTFP__` define. Differential Revision: https://phabricator.services.mozilla.com/D59451
* Bug 1574643 - NSS changes for haclv2 r=jcj,kjacobsFranziskus Kiefer2020-01-141-7/+41
| | | | | | | | | | This patch contains the changes in NSS, necessary to pick up HACL*v2 in D55413. It has a couple of TODOs: * The chacha20 saw verification fails for some reason; it's disabled pending Bug 1604130. * The hacl task on CI requires Bug 1593647 to get fixed. Depends on D55413. Differential Revision: https://phabricator.services.mozilla.com/D55414
* Backed out changeset ac51d2490f9c (Bug 1574643) for crashes on early SSE4 CPUsJ.C. Jones2019-12-201-41/+7
|
* Bug 1588714 - Implement CheckARMSupport for Win64/aarch64. r=kjacobsMakoto Kato2019-12-121-1/+6
| | | | | | | | aarch64 doesn't have `cpuid` like instruction set. Actually, we use getauxval system call on Linux/aarch64 to check CPU features. Windows has `IsProcessorFeaturePresent` API to get CPU features, so we should use it to check whether current CPU supports ARM Crypto extension. Differential Revision: https://phabricator.services.mozilla.com/D55270
* Bug 1574643 - NSS changes for haclv2 r=jcj,kjacobsFranziskus Kiefer2019-12-181-7/+41
| | | | | | | | | | This patch contains the changes in NSS, necessary to pick up HACL*v2 in D55413. It has a couple of TODOs: * The chacha20 saw verification fails for some reason; it's disabled pending Bug 1604130. * The hacl task on CI requires Bug 1593647 to get fixed. Depends on D55413. Differential Revision: https://phabricator.services.mozilla.com/D55414
* Bug 1562548 - Improve GCM perfomance on aarch32 using NEON. r=kjacobsMakoto Kato2019-12-031-0/+26
| | | | | | Optimize GCM perfomance using https://conradoplg.cryptoland.net/files/2010/12/gcm14.pdf via ARM's NEON. Differential Revision: https://phabricator.services.mozilla.com/D40403
* Bug 1566126 - freebl: POWER GHASH Vector Acceleration, r=mtLauri Kasanen2019-11-061-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation for POWER8 adapted from the ARM paper: https://conradoplg.cryptoland.net/files/2010/12/gcm14.pdf Benchmark of `bltest -E -m aes_gcm -i tests/aes_gcm/plaintext10 \ -v tests/aes_gcm/iv10 -k tests/aes_gcm/key10 -5 10` on POWER8 3.3GHz. NSS_DISABLE_HW_CRYPTO=1 mode in symmkey opreps cxreps context op time(sec) thrgput aes_gcm_e 309Mb 192 5M 0 0.000 10000.000 10.001 30Mb mode in symmkey opreps cxreps context op time(sec) thrgput aes_gcm_e 829Mb 192 14M 0 0.000 10000.000 10.001 82Mb Notable operf results, sw: samples % image name symbol name 226033 59.3991 libfreeblpriv3.so bmul 80606 21.1824 libfreeblpriv3.so rijndael_encryptBlock128 28851 7.5817 libfreeblpriv3.so gcm_HashMult_sftw hw: 213899 56.2037 libfreeblpriv3.so rijndael_encryptBlock128 45233 11.8853 libfreeblpriv3.so gcm_HashMult_hw So the ghash part is ~5.6x faster. Signed-off-by: Lauri Kasanen <cand@gmx.com>
* Bug 1590972 - Use -std=c99 for all C code, r=jcjMartin Thomson2019-10-281-17/+0
| | | | | | | | | | | | | | | | | | | This switches to using -std=c99 for compiling all C code. Previously, we only enabled this option for lib/freebl and lib/ssl. For Linux, this means we need to define _DEFAULT_SOURCE to access some of the functions we use. On glibc 2.12 (our oldest supported version), we also need to define _BSD_SOURCE to access these functions. The only tricky part is dealing with partial C99 implementation in gcc 4.4. From what I've seen, the only problem is that - in that mode - it doesn't support nesting of unnamed fields: https://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/Unnamed-Fields.html This also switches from -std=c++0x to -std=c++11 as the 0x variant, though identical in meaning, is deprecated. Differential Revision: https://phabricator.services.mozilla.com/D50421
* Bug 1152625 - Add gyp flag for disabling ARM HW AES r=jcjKevin Jacobs2019-10-111-3/+2
| | | | | | | | Adds an option to disable ARMv8 HW AES, if `-Ddisable_arm_hw_aes=1` is passed to build.sh. Depends on D34473 Differential Revision: https://phabricator.services.mozilla.com/D44018
* Bug 1152625 - Support AES HW acceleration on ARMv8. r=kjacobs,jcjMakoto Kato2019-10-111-0/+43
| | | | Differential Revision: https://phabricator.services.mozilla.com/D34473
* Backed out changeset 009a7163c80a (Bug 1152625) for crash in ↵J.C. Jones2019-08-021-43/+0
| | | | | | arm_aes_encrypt_cbc_128 on Android 8.0 Pixel2 pgo See bug 1570991
* Bug 1152625 - Support AES HW acceleration on ARMv8. r=KevinJacobs,jcjMakoto Kato2019-07-301-0/+43
| | | | Differential Revision: https://phabricator.services.mozilla.com/D34473
* Bug 1559012 - Improve GCM perfomance using PMULL2 r=KevinJacobs,jcjMakoto Kato2019-07-051-0/+26
| | | | | | | | | | | | | | | | | | This implementation is from the paper of https://conradoplg.cryptoland.net/files/2010/12/gcm14.pdf benchmark of `bltest -E -m aes_gcm -i tests/aes_gcm/plaintext10 -v tests/aes_gcm/iv10 -k tests/aes_gcm/key10 -5 10` on Cortex-A72 (AWS a1) ### Before ``` # mode in symmkey opreps cxreps context op time(sec) thrgput aes_gcm_e 265Mb 192 4M 0 0.000 10000.000 10.000 26Mb ``` ### After ``` # mode in symmkey opreps cxreps context op time(sec) thrgput aes_gcm_e 659Mb 192 11M 0 0.000 10000.000 10.000 65Mb ``` Differential Revision: https://phabricator.services.mozilla.com/D34995
* Bug 1550708 - NSS gyp build system should produce libfreebl_64fpu_3.so for ↵Petr Sumbera2019-06-051-0/+37
| | | | | | Solaris SPARC r=jcj Differential Revision: https://phabricator.services.mozilla.com/D30628
* Bug 1550022 - Include nssutil3 in freebl Android builds. r=jcj,KevinJacobsEdouard Oger2019-05-151-2/+3
| | | | Differential Revision: https://phabricator.services.mozilla.com/D30380
* Bug 1548179 - Remove --test (test_build) option from build.sh (replaced by ↵Kevin Jacobs2019-05-151-4/+4
| | | | | | --static), remove Test builds from taskcluster since we exercise pk11_gtest and mpi_gtests in non-static builds already. r=mt,jcj Differential Revision: https://phabricator.services.mozilla.com/D30998
* Bug 1550041 - Pass -mpclmul to iOS targets. r=jcj,KevinJacobsEdouard Oger2019-05-081-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D30383
* Bug 1501542 - Part 1. Use -mfpu=neon to compile NEON code. r=mtMakoto Kato2019-03-201-5/+5
| | | | | | | | | | | | | | | Summary: To compile ARM's NEON code, compiler may require -mfpu=neon. Actually, since Gecko always turn on NEON (Bug 1469790), it already uses -mfpu. But tier-3 platform such as Linux/armeabi doesn't set -mfpu=neon as default. So it might require this command line option. Reviewers: mt Bug #: 1501542 Differential Revision: https://phabricator.services.mozilla.com/D11430
* Bug 1471566 - fix OSS fuzzing build, r=mtFranziskus Kiefer2018-10-081-2/+33
| | | | Differential Revision: https://phabricator.services.mozilla.com/D9493
* Backed out changeset 77ae602f995a for gecko build failures.Martin Thomson2018-10-161-33/+2
| | | | See https://bugzilla.mozilla.org/show_bug.cgi?id=1471566#c4
* Bug 1471566 - fix OSS fuzzing build, r=mtFranziskus Kiefer2018-10-081-2/+33
| | | | Differential Revision: https://phabricator.services.mozilla.com/D7996
* Bug 1432455 - Build FStar.c when not building with int128 support. r=fkieferMike Hommey2018-05-271-12/+17
|
* Bug 1448748 Disable a bunch of optimized stuff to fix the MinGW x64 Build, ↵Tom Ritter2018-03-301-6/+1
| | | | r=franziskus
* Bug 1424663 - vectorized ChaCha20 from HACL* for SSSE3 and ARM NEON, r=ttaubertFranziskus Kiefer2018-02-191-3/+37
| | | | | | | | | | | | | | Summary: This adds the vectorized ChaCha20 implementation from HACL* to NSS and replaces the old vectorized code. Note that this is not used on Android as we currently have no way of testing this for Android or use it on Android for Firefox. Reviewers: ttaubert Reviewed By: ttaubert Bug #: 1424663 Differential Revision: https://phabricator.services.mozilla.com/D467
* Bug 1346932 - set -std=gnu99 on BSDs too in lib/freebl, r=franziskusLandry Breuil2018-02-091-0/+5
|
* Bug 1419173 - fix uint128 defines, r=ttaubertFranziskus Kiefer2017-11-221-8/+5
| | | | | | | | | | | | | | Summary: We accidentally disabled uint128_t for the HACL curve in GYP builds. This is less nice but works. Reviewers: ttaubert Reviewed By: ttaubert Bug #: 1419173 Differential Revision: https://phabricator.services.mozilla.com/D274
* Bug 1419173 - New version of HACL* base and Curve25519, r=franziskusBenjamin Beurdouche2017-11-211-0/+11
| | | | | | | | | | Summary: This patch moves NSS to track HACL* master instead of the nss-production branch. It also contains a new version of the Curve25519 HACL* code that resolved many of the style issues of the old version. Reviewers: franziskus Differential Revision: https://phabricator.services.mozilla.com/D268
* Bug 1400603 - freebl: Reorganize AES-GCM source code based on hw/sw ↵Daiki Ueno2017-09-221-24/+41
| | | | | | | | | | | | implementation, r=franziskus Reviewers: franziskus Reviewed By: franziskus Bug #: 1400603 Differential Revision: https://phabricator.services.mozilla.com/D65
* Bug 1376975 - Formally verified Curve25519 (64 bits) from HaCl* r=mt,franziskusBenjamin Beurdouche2017-08-311-5/+2
| | | | | | | | | | | | Summary: This patch replaces the legacy curve25519_64.c code by the formally verified HaCl* code. The new code has been proven to have functional correctness, memory safety and a set of side-channel resistance properties. Note: All files from the new `verified` folder are formally verified in F* but for 'kremlib.h' that remains in the trusted code base. Reviewers: franziskus, ekr, ttaubert, mt Differential Revision: https://nss-review.dev.mozaws.net/D395
* Bug 1387779 - make NSS build again on BSD (add -maes and -mpclmul), r=ttaubertFranziskus Kiefer2017-08-071-0/+8
|
* Bug 1386077 - Compile freebl using -std=gnu99 for all C compilers on Linux. ↵Benjamin Beurdouche2017-08-011-0/+4
| | | | | | | | | | | | | | | r=mt,kaie Summary: Compilation of the HaCl* formally verified C code requires C99 syntax for loops. This patch enables GNU C99 syntax on all C compilers for Linux by passing -std=gnu99. Reviewers: kaie, franziskus Subscribers: mt, bbeurdouche Differential Revision: https://nss-review.dev.mozaws.net/D388
* Bug 868948 - let firefox know about cflags, r=ttaubertFranziskus Kiefer2017-06-131-12/+6
| | | | Differential Revision: https://nss-review.dev.mozaws.net/D353
* Bug 868948 - let firefox know about cflags, r=ttaubertFranziskus Kiefer2017-06-011-0/+12
| | | | Differential Revision: https://nss-review.dev.mozaws.net/D345
* Bug 868948 - new ct software and hardware accelarated gcm implementations, ↵Franziskus Kiefer2017-05-041-0/+18
| | | | | | r=mt,ttaubert Differential Revision: https://nss-review.dev.mozaws.net/D291
* Bug 1350362 - Support building NSS in Firefox with MinGW on Linux, r=franziskusTom Ritter2017-05-111-0/+12
|
* Bug 1356191 - follow-up, remove USE_64 from freebl.gyp, r=tedFranziskus Kiefer2017-04-251-11/+0
|
* Bug 1356191 - better platform detection for gyp, r=mtFranziskus Kiefer2017-04-131-12/+5
|
* Bug 1333361 - Fix static fuzzing builds r=franziskusTim Taubert2017-01-251-205/+44
| | | | Differential Revision: https://nss-review.dev.mozaws.net/D170
* Bug 1330655 - Make NSS build within OSS-Fuzz r=franziskusTim Taubert2017-01-201-2/+2
| | | | Differential Revision: https://nss-review.dev.mozaws.net/D161
* Bug 1330944 - GYP: Don't require Valgrind (ct_verif) for -Dtest_build=1 r=mtTim Taubert2017-01-161-1/+1
| | | | Differential Revision: https://nss-review.dev.mozaws.net/D149
* Bug 1325547 - MPI assembler isn't compiled on Android after moving to GYP. r=tedMakoto Kato2016-12-221-1/+9
|
* Bug 1322447 - fix aarch64 support and docker image, r=ttaubertFranziskus Kiefer2016-12-281-1/+1
| | | | Differential Revision: https://nss-review.dev.mozaws.net/D131
* Bug 1322447 - fix ARM64 build, r=tedFranziskus Kiefer2016-12-221-0/+5
| | | | patch originally by sk <sk.alvin.x>