summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_nist.c
AgeCommit message (Collapse)Author
2019-09-28Reorganize local header filesDr. Matthias St. Pierre
Apart from public and internal header files, there is a third type called local header files, which are located next to source files in the source directory. Currently, they have different suffixes like '*_lcl.h', '*_local.h', or '*_int.h' This commit changes the different suffixes to '*_local.h' uniformly. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
2018-12-06Following the license change, modify the boilerplates in crypto/bn/Richard Levitte
[skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7777)
2018-09-11Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7176)
2018-07-14bn/bn_lcl.h,bn_nist.c: addres strict warnings with -DBN_DEBUG.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-08-21Remove OPENSSL_assert() usage from crypto/bnMatt Caswell
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3740)
2016-05-17Copyright consolidation 06/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte
There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-03Add OSSL_NELEM macro.Dr. Stephen Henson
Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08Remove fips_constseg references.Dr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-09-30crypto/bn/bn_nist.c: bring original failing code back for reference.Andy Polyakov
RT: 3541 Reviewed-by: Emilia Kasper <emilia@openssl.org>
2014-09-25crypto/bn/bn_nist.c: work around MSC ARM compiler bug.Andy Polyakov
RT: 3541 Reviewed-by: Emilia Kasper <emilia@openssl.org>
2013-02-14bn_nist.c: work around clang 3.0 bug.Andy Polyakov
2012-07-02bn_nist.c: compensate for VC bug [with optimization off!].Andy Polyakov
PR: 2837
2012-02-02bn_nist.c: make new optimized code dependent on BN_LLONG.Andy Polyakov
2012-01-06bn_nist.c: harmonize buf in BN_nist_mod_256 with other mod functions.Andy Polyakov
2011-11-13bn_nist.c: fix strict-aliasing compiler warning.Andy Polyakov
2011-09-14Allow for dynamic base in Win64 FIPS module.Andy Polyakov
2011-05-11bn_nist.c: fix shadowing warnings.Andy Polyakov
2011-05-09Optimized bn_nist.c. Performance improvement varies from one benchmarkAndy Polyakov
and platform to another. It was measured to deliver 20-30% better performance on x86 platforms and 30-40% on x86_64, on nistp384 benchmark.
2011-03-19After some adjustments, apply the changes OpenSSL 1.0.0d on OpenVMSRichard Levitte
submitted by Steven M. Schweda <sms@antinode.info>
2011-02-14New function BN_nist_mod_func which returns an appropriate functionDr. Stephen Henson
if the passed prime is a NIST prime.
2008-12-29Fix "possible loss of data" Win64 compiler warnings.Andy Polyakov
2008-11-12Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe
knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
2008-11-01size_tification.Ben Laurie
2008-10-16Fix argument order in BN_nnmod call and implement rigorous boundaryAndy Polyakov
condition check.
2008-10-15Remove redundant BN_ucmp, fix boundary condition in BN_nist_mod_224 andAndy Polyakov
reimplement BN_nist_mod_521.
2008-09-15Fix build warnings.Geoff Thorpe
2008-09-14Some precautions to avoid potential security-relevant problems.Bodo Möller
2008-04-24Add 64-bit support to BN_nist_mod_244 and engage BN_nist_mod_* on 64-bitAndy Polyakov
platforms.
2008-04-23Takanori Yanagisawa has shown how to correctly use pre-computed values.Andy Polyakov
So in a sense this commit reverts few latest ones fixing bugs in original code and improving it, most notably adding 64-bit support [though not in BN_nist_mod_224 yet]. PR: 1593
2008-04-18Resolve __DECC warning and keep disclaiming support for 16-bit platforms.Andy Polyakov
2008-04-18Fix remaining BN_nist_mod_*.Andy Polyakov
PR: 1593
2008-04-09Clarifying comment.Andy Polyakov
2008-04-09Do BN_nist_mod_384 by the book, as cheating doesn't work. Other functionsAndy Polyakov
will be revised too. PR: 1593
2008-04-01Fix fast reduction on NIST curves (as well BN_NIST_ADD_ONE macro).Andy Polyakov
PR: 1593
2005-06-29Brought forward from 0.9.8 - 64 bit warning fixes and fussy compiler fixes.Ben Laurie
2005-05-29TypoRichard Levitte
2005-05-24DEC C complains about bad subscript, but we know better, so let's shut it up.Richard Levitte
2005-05-03rewrite of bn_nist.c, disable support for some curves on 64 bit platformsNils Larsch
for now (it was broken anyway)
2004-03-13Convert openssl code not to assume the deprecated form of BN_zero().Geoff Thorpe
Remove certain redundant BN_zero() initialisations, because BN_CTX_get(), BN_init(), [etc] already initialise to zero. Correct error checking in bn_sqr.c, and be less wishy-wash about how/why the result's 'top' value is set (note also, 'max' is always > 0 at this point).
2004-03-09Minimise the amount of code dependent on BN_DEBUG_RAND. In particular,Geoff Thorpe
redefine bn_clear_top2max() to be a NOP in the non-debugging case, and remove some unnecessary usages in bn_nist.c. Submitted by: Nils Larsch Reviewed by: Geoff Thorpe, Ulf Möller
2004-01-25Even though C specification explicitly says that constant type "stretches"Andy Polyakov
automatically to accomodate the value, some compilers fail to do so. Most notably 0x0123456789ABCDEF should come out as long long in 32-bit context, but HP compiler truncates it to 32-bit value. Which in turn breaks GF(2^m) arithmetics in hpux-parisc2-cc build. Therefore this fix...
2003-11-05This is a revert of my previous commit to "improve" the declaration ofGeoff Thorpe
constant BIGNUMs. It turns out that this trips up different but equally useful compiler warnings to -Wcast-qual, and so wasn't worth the ugliness it created. (Thanks to Ulf for the forehead-slap.)
2003-11-05typo in commentUlf Möller
2003-11-04Put the first stage of my bignum debugging adventures into CVS. This codeGeoff Thorpe
is itself experimental, and in addition may cause execution to break on existing openssl "bugs" that previously were harmless or at least invisible.
2003-11-04This is the least unacceptable way I've found for declaring the bignum dataGeoff Thorpe
and structures as constant without having to cast away const at any point. There is still plenty of other code that makes gcc's "-Wcast-qual" unhappy, but crypto/bn/ is now ok. Purists are welcome to suggest alternatives.
2003-10-29Some provisional bignum debugging has begun to detect inconsistent BIGNUMGeoff Thorpe
structures being passed in to or out of API functions, and this corrects a couple of cases found so far. Also, lop off a couple of bytes of white-space.