Andy Polyakov
9447da5065
crypto/bn/asm/s390x.S: drop redundant instructions [from HEAD].
2010-09-10 14:55:34 +00:00
Dr. Stephen Henson
e97359435e
Fix warnings (From HEAD, original patch by Ben).
2010-06-15 17:25:15 +00:00
Andy Polyakov
b620447dcc
alpha-mont.pl: comply with stack alignment requirement [from HEAD].
2010-04-10 13:33:46 +00:00
Andy Polyakov
1244d5b713
ARMv4 assembler: [unconfirmed] fix for compilation failure [from HEAD].
2010-03-29 09:59:58 +00:00
Ben Laurie
bcd9d12a8d
Fix warning.
2010-02-28 13:38:16 +00:00
Bodo Möller
7fe747d1eb
Always check bn_wexpend() return values for failure (CVE-2009-3245).
...
(The CHANGES entry covers the change from PR #2111 as well, submitted by
Martin Olsson.)
Submitted by: Neel Mehta
2010-02-23 10:36:30 +00:00
Dr. Stephen Henson
7b1856e5a1
PR: 2111
...
Submitted by: Martin Olsson <molsson@opera.com>
Check for bn_wexpand errors in bn_mul.c
2009-12-02 15:28:05 +00:00
Dr. Stephen Henson
50d70c01d6
PR: 2062
...
Submitted by: Julia Lawall <julia@diku.dk>
Approved by: steve@openssl.org
Correct BN_rand error handling in bntest.c
2009-10-01 00:21:55 +00:00
Dr. Stephen Henson
27713e3fc2
Check t too.
2009-06-17 11:47:54 +00:00
Dr. Stephen Henson
8280b43a62
Update from HEAD.
2009-06-17 11:26:09 +00:00
Ben Laurie
7de819237d
Two digits is not wide enough.
2009-06-14 10:23:29 +00:00
Dr. Stephen Henson
477fd4596f
PR: 1835
...
Submitted by: Damien Miller <djm@mindrot.org>
Approved by: steve@openssl.org
Fix various typos.
2009-02-14 21:49:38 +00:00
Andy Polyakov
0f529cbdc3
s390x-mont.pl: optimize prologue.
2009-02-10 08:46:48 +00:00
Andy Polyakov
8626230a02
s390x assembler pack update.
2009-02-09 15:42:04 +00:00
Dr. Stephen Henson
41b7619596
Fix missing prototype warnings then fix different prototype warnings ;-)
2009-01-11 16:17:26 +00:00
Andy Polyakov
a68c7b9171
bn_lib.c: [re-]fix Win64 compiler warning.
2008-12-29 12:44:33 +00:00
Andy Polyakov
5cabcf96e7
Fix "possible loss of data" Win64 compiler warnings.
2008-12-29 12:35:49 +00:00
Andy Polyakov
be01f79d3d
x86_64 assembler pack: add support for Win64 SEH.
2008-12-19 11:17:29 +00:00
Andy Polyakov
3ebbe8853f
Bring C bn_mul_mont template closer to assembler.
2008-12-16 07:28:38 +00:00
Andy Polyakov
93c4ba07d7
x86_64-xlate.pl update, engage x86_64 assembler in mingw64.
2008-11-14 16:40:37 +00:00
Andy Polyakov
1416aec60d
Update make rules for x86_64 assembler pack.
2008-11-12 08:19:04 +00:00
Andy Polyakov
aa8f38e49b
x86_64 assembler pack to comply with updated styling x86_64-xlate.pl rules.
2008-11-12 08:15:52 +00:00
Andy Polyakov
2fbc8a2aad
Revert commit #17603 , it should have been part of #17617 .
2008-11-12 07:27:36 +00:00
Geoff Thorpe
6343829a39
Revert the size_t modifications from HEAD that had led to more
...
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-12 03:58:08 +00:00
Bodo Möller
0a8c9f7de1
symbol deobnoxification
2008-11-11 07:08:59 +00:00
Dr. Stephen Henson
0afc9f5bc0
PR: 1777
...
Submitted by: "Alon Bar-Lev" <alon.barlev@gmail.com>
Approved by: steve@openssl.org
Fix some size_t issues.
2008-11-05 23:14:32 +00:00
Dr. Stephen Henson
e6e0c9018c
Fix prototypes.
2008-11-02 18:12:36 +00:00
Dr. Stephen Henson
9619b730b4
Use stddef.h to pick up size_t def.
2008-11-02 16:56:13 +00:00
Dr. Stephen Henson
c76fd290be
Fix warnings about mismatched prototypes, undefined size_t and value computed
...
not used.
2008-11-02 12:50:48 +00:00
Ben Laurie
4d6e1e4f29
size_tification.
2008-11-01 14:37:00 +00:00
Andy Polyakov
122396f2db
Fix SHA512 and optimize BN for mingw64.
2008-11-01 12:46:18 +00:00
Andy Polyakov
f1455b3063
Minor clean-up in bn_lib.c: constification and optimization.
2008-10-28 13:52:51 +00:00
Andy Polyakov
b764f82c64
Fix crash in BN_rshift.
...
PR: 1663
2008-10-28 13:46:14 +00:00
Geoff Thorpe
ae7ec4c71d
Apparently '__top' is also risky, obfuscate further. (All this to
...
avoid inlines...)
2008-10-22 12:00:15 +00:00
Geoff Thorpe
3fdc6c11aa
Use of a 'top' var creates "shadow variable" warnings.
2008-10-22 01:25:45 +00:00
Ben Laurie
0d6f9c7181
Constification.
2008-10-19 22:51:27 +00:00
Andy Polyakov
aff8259510
Fix argument order in BN_nnmod call and implement rigorous boundary
...
condition check.
2008-10-16 07:54:41 +00:00
Andy Polyakov
256b3e9c5f
Optimize bn_correct_top.
2008-10-15 10:48:52 +00:00
Andy Polyakov
762a2e3cab
Remove redundant BN_ucmp, fix boundary condition in BN_nist_mod_224 and
...
reimplement BN_nist_mod_521.
2008-10-15 10:47:48 +00:00
Geoff Thorpe
fa0f834c20
Fix build warnings.
2008-09-15 04:02:37 +00:00
Bodo Möller
f8d6be3f81
Some precautions to avoid potential security-relevant problems.
2008-09-14 13:42:34 +00:00
Andy Polyakov
492279f6f3
AIX build updates.
2008-09-12 14:45:54 +00:00
Geoff Thorpe
4c3296960d
Remove the dual-callback scheme for numeric and pointer thread IDs,
...
deprecate the original (numeric-only) scheme, and replace with the
CRYPTO_THREADID object. This hides the platform-specifics and should reduce
the possibility for programming errors (where failing to explicitly check
both thread ID forms could create subtle, platform-specific bugs).
Thanks to Bodo, for invaluable review and feedback.
2008-08-06 15:54:15 +00:00
Geoff Thorpe
5f834ab123
Revert my earlier CRYPTO_THREADID commit, I will commit a reworked
...
version some time soon.
2008-07-03 19:59:25 +00:00
Bodo Möller
8228fd89fc
avoid potential infinite loop in final reduction round of BN_GF2m_mod_arr()
...
Submitted by: Huang Ying
Reviewed by: Douglas Stebila
2008-06-23 20:46:24 +00:00
Bodo Möller
fabe640f5e
Clarifying comment.
2008-05-02 18:47:48 +00:00
Bodo Möller
d05a474556
Montgomery-related minor cleanups/documentation
2008-05-01 18:48:20 +00:00
Andy Polyakov
ba6f95e81b
Add 64-bit support to BN_nist_mod_244 and engage BN_nist_mod_* on 64-bit
...
platforms.
2008-04-24 10:04:26 +00:00
Andy Polyakov
830b8877ba
Takanori Yanagisawa has shown how to correctly use pre-computed values.
...
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-23 08:10:25 +00:00
Andy Polyakov
9912ab6770
Resolve __DECC warning and keep disclaiming support for 16-bit platforms.
2008-04-18 15:47:30 +00:00
Andy Polyakov
299ab428ce
Fix remaining BN_nist_mod_*.
...
PR: 1593
2008-04-18 15:40:57 +00:00
Lutz Jänicke
4c1a6e004a
Apply mingw patches as supplied by Roumen Petrov an Alon Bar-Lev
...
PR: 1552
Submitted by: Roumen Petrov <openssl@roumenpetrov.info>, "Alon Bar-Lev" <alon.barlev@gmail.com>
2008-04-17 10:19:16 +00:00
Andy Polyakov
d4122504a2
Clarifying comment.
2008-04-09 12:06:42 +00:00
Andy Polyakov
2c4226c42b
Do BN_nist_mod_384 by the book, as cheating doesn't work. Other functions
...
will be revised too.
PR: 1593
2008-04-09 11:36:04 +00:00
Andy Polyakov
2819ffb520
Fix fast reduction on NIST curves (as well BN_NIST_ADD_ONE macro).
...
PR: 1593
2008-04-01 08:39:08 +00:00
Dr. Stephen Henson
e2a29d49ca
Update dependencies.
2008-03-29 21:11:25 +00:00
Geoff Thorpe
f7ccba3edf
There was a need to support thread ID types that couldn't be reliably cast
...
to 'unsigned long' (ie. odd platforms/compilers), so a pointer-typed
version was added but it required portable code to check *both* modes to
determine equality. This commit maintains the availability of both thread
ID types, but deprecates the type-specific accessor APIs that invoke the
callbacks - instead a single type-independent API is used. This simplifies
software that calls into this interface, and should also make it less
error-prone - as forgetting to call and compare *both* thread ID accessors
could have led to hard-to-debug/infrequent bugs (that might only affect
certain platforms or thread implementations). As the CHANGES note says,
there were corresponding deprecations and replacements in the
thread-related functions for BN_BLINDING and ERR too.
2008-03-28 02:49:43 +00:00
Dr. Stephen Henson
56c7754cab
Avoid warnings.
2008-02-28 14:05:01 +00:00
Andy Polyakov
61b05a0025
Make x86_64-mont.pl work with debug Win64 build.
2008-02-27 20:09:28 +00:00
Bodo Möller
7c9882eb24
fix BIGNUM flag handling
2008-02-27 06:01:28 +00:00
Andy Polyakov
089458b096
ppc64-mont optimization.
2008-02-05 13:10:14 +00:00
Andy Polyakov
676517e08e
crypto/rc5/Makefile was erroneously omitted from last perlasm unification.
...
Also remove obsolete and now misleading comments.
2008-01-15 11:27:06 +00:00
Andy Polyakov
addd641f3a
Unify ppc assembler make rules.
2008-01-13 22:01:30 +00:00
Andy Polyakov
fa8e921f66
Unify x86 perlasm make rules.
2008-01-11 13:15:11 +00:00
Dr. Stephen Henson
4d1f3f7a6c
Update perl asm scripts include paths for perlasm.
2008-01-05 22:28:38 +00:00
Andy Polyakov
c8ec4a1b0b
Final (for this commit series) optimized version and with commentary section.
2007-12-29 20:30:09 +00:00
Andy Polyakov
699e1a3a82
This is also informational commit exposing loop modulo scheduling "factor."
2007-12-29 20:28:01 +00:00
Andy Polyakov
64214a2183
New Montgomery multiplication module, ppc64-mont.pl. Reference, non-optimized
...
implementation. This is essentially informational commit.
2007-12-29 20:26:46 +00:00
Andy Polyakov
ca64056836
Engage x86 assembler in Mac OS X build.
2007-12-18 17:33:49 +00:00
Andy Polyakov
70ba4ee5d5
Commit #16325 fixed one thing but broke DH with certain moduli.
2007-11-03 20:09:04 +00:00
Andy Polyakov
0023adb47a
Switch to bn-s390x (it's faster on keys longer than 512 bits) and mention
...
s390x assembler pack in CHANAGES.
2007-10-01 07:38:32 +00:00
Andy Polyakov
7722e53f12
Yet another ARM update. It appears to be more appropriate to make
...
developers responsible for -march choice.
2007-09-27 16:27:03 +00:00
Andy Polyakov
75a8e30f4f
Minimize stack utilization in probable_prime.
2007-09-18 20:52:05 +00:00
Bodo Möller
08b229e13f
Make sure that BN_from_montgomery keeps the BIGNUMS in proper format
2007-09-18 16:35:28 +00:00
Dr. Stephen Henson
710069c19e
Fix warnings.
2007-08-12 17:44:32 +00:00
Andy Polyakov
35295bdbee
bn_mul_recursive doesn't handle all cases correctly, which results in
...
BN_mul failures at certain key-length mixes.
PR: 1427
2007-07-08 18:53:03 +00:00
Andy Polyakov
62aa5dd415
Fix build problem on Tru64.
2007-06-29 13:11:45 +00:00
Andy Polyakov
673c55a2fe
Latest bn_mont.c modification broke ECDSA test. I've got math wrong, which
...
is fixed now.
2007-06-29 13:10:19 +00:00
Andy Polyakov
5b89f78a89
Typo in x86_64-mont.pl.
...
PR: 1549
2007-06-21 11:38:52 +00:00
Andy Polyakov
1c7f8707fd
bn_asm for s390x.
2007-06-20 14:10:16 +00:00
Andy Polyakov
2329694222
SPARC Solaris and Linux assemblers treat .align directive differently.
...
PR: 1547
2007-06-20 12:24:22 +00:00
Dr. Stephen Henson
9677bf0f30
Update .cvsignore
2007-06-18 12:40:24 +00:00
Andy Polyakov
7d9cf7c0bb
Eliminate conditional final subtraction in Montgomery assembler modules.
2007-06-17 17:10:03 +00:00
Andy Polyakov
55525742f4
Privatize BN_*_no_branch.
2007-06-11 16:33:03 +00:00
Andy Polyakov
c693b5a55c
Commentary updates and minor optimization for bn_mont.c.
2007-06-11 08:53:52 +00:00
Andy Polyakov
6b6443dead
Eliminate conditional final subtraction in Montgomery multiplication.
2007-06-10 19:34:38 +00:00
Andy Polyakov
b900df5258
Engage s390x assembler modules.
2007-04-30 09:22:27 +00:00
Andy Polyakov
a2a54ffc5f
s390x assembler pack.
2007-04-30 08:42:54 +00:00
Bodo Möller
24a8c25ab5
fix error codes
2007-04-19 15:14:21 +00:00
Bodo Möller
d1e7d1d96c
don't violate the bn_check_top assertion in BN_mod_inverse_no_branch()
2007-04-19 14:45:57 +00:00
Bodo Möller
b002265ee3
make BN_FLG_CONSTTIME semantics more fool-proof
2007-03-28 18:41:23 +00:00
Bodo Möller
bd31fb2145
Change to mitigate branch prediction attacks
...
Submitted by: Matthew D Wood
Reviewed by: Bodo Moeller
2007-03-28 00:15:28 +00:00
Andy Polyakov
8b71d35458
nasm fixes.
2007-03-20 08:55:58 +00:00
Andy Polyakov
760e353528
sparcv9a-mont was modified to handle 32-bit aligned input, but check
...
for 64-bit alignment was not removed.
2007-03-20 08:54:51 +00:00
Dr. Stephen Henson
af32f9fdda
Update from fips2 branch.
2007-02-03 17:32:49 +00:00
Dr. Stephen Henson
560b79cbff
Constify version strings and some structures.
2007-01-21 13:07:17 +00:00
Andy Polyakov
64aecc6720
Make armv4t-mont module backward binary compatible with armv4 and rename it
...
accordingly.
2007-01-17 20:12:41 +00:00
Andy Polyakov
43b8fe1cd0
Montgomery multiplication for ARMv4.
2007-01-11 21:43:25 +00:00
Andy Polyakov
8876e58f34
Montgomery multiplication for MIPS III/IV. Not engaged.
2006-12-29 11:09:33 +00:00
Andy Polyakov
7321a84d4c
Minor clean-up in crypto/bn/asm.
2006-12-29 11:05:20 +00:00