5548 Commits

Author SHA1 Message Date
Andy Polyakov
d8a23532dd crypto/modes/modes_lcl.h: let STRICT_ALIGNMENT be on ARMv7.
While ARMv7 in general is capable of unaligned access, not all instructions
actually are. And trouble is that compiler doesn't seem to differentiate
those capable and incapable of unaligned access. Side effect is that kernel
goes into endless loop retrying same instruction triggering unaligned trap.
Problem was observed in xts128.c and ccm128.c modules. It's possible to
resolve it by using (volatile u32*) casts, but letting STRICT_ALIGNMENT
be feels more appropriate.

(cherry picked from commit 3bdd80521a81d50ade4214053cd9b293f920a77b)
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-20 09:18:57 +02:00
Andy Polyakov
80b1e89bbc Add iOS-specific armv4cpud.S module.
Normally it would be generated from a perlasm module, but doing so
would affect existing armv4cpuid.S, which in turn would formally void
previously validated platforms. Hense separate module is generated.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 5837e90f08ffcf5ad84933793bc285630018ce26)
2015-05-13 18:00:07 +02:00
Andy Polyakov
bb98f6bef6 Adapt ARM assembly pack for iOS.
This is achieved by filtering perlasm output through arm-xlate.pl. But note
that it's done only if "flavour" argument is not 'void'. As 'void' is
default value for other ARM targets, permasm output is not actually
filtered on previously validated platforms.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 874faf2ffb22187ad5483d9691a3a2eb7112f161)
2015-05-13 17:59:22 +02:00
Andy Polyakov
3b3114770a Engage ARMv8 assembly pack.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 083ed53defb42ab4d3488bc7f80d9170d22293e7)
2015-05-13 17:49:37 +02:00
Andy Polyakov
9b5db104ec Add ARMv8 assembly pack.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit b84813ec017cb03b8dd0b85bce2bb3e021c45685)
2015-05-13 17:49:18 +02:00
Dr. Stephen Henson
551ed53b2a Fix copy for CCM, GCM and XTS.
Internal pointers in CCM, GCM and XTS contexts should either be
NULL or set to point to the appropriate key schedule. This needs
to be adjusted when copying contexts.

Combination of 2 commits:
370bf1d708e6d7af42e1752fb078d0822c9bc73d
c2fd5d79ffc4fc9d120a0faad579ce96473e6a2f
2014-07-11 21:44:47 +01:00
Alan Hryngle
114216bca0 Check return smaller of ret and f.
PR#3418.
(cherry picked from commit d4909f9a8dbbda9c5d140476b34a8f80b02b51f3)
2014-07-05 22:27:42 +01:00
Andy Polyakov
493119b1a8 cryptlib.c: fix typo in WIN32 version of OPENSSL_showfatal. 2014-04-02 21:48:56 +02:00
Dr. Stephen Henson
add13802cf Don't require tag before ciphertext in AESGCM mode 2012-10-16 22:47:00 +00:00
Dr. Stephen Henson
b6c1d4b7f0 e_aes.c: uninitialized variable in aes_ccm_init_key.
PR: 2874
Submitted by: Tomas Mraz
(backport from HEAD)
2012-10-15 11:28:59 +00:00
Dr. Stephen Henson
aaf8b56fc8 sha1-armv4-large.pl: comply with ABI.
(backport from HEAD)
2012-10-14 12:30:12 +00:00
Dr. Stephen Henson
799602e489 gcm128.c: fix AAD-only case with AAD length not divisible by 16.
PR: 2859
Submitted by: John Foley
(backport from HEAD)
2012-10-14 12:29:25 +00:00
Dr. Stephen Henson
82607b291f optimize make_kn (from HEAD, by Andy) 2012-10-14 12:26:02 +00:00
Dr. Stephen Henson
fd9d2eaf16 CMAC reset fix (from HEAD) 2012-10-14 12:24:24 +00:00
Dr. Stephen Henson
ea11fc17cf Add support for Windows CE and C64+ to FIPS module. (from fips2-stable) 2012-10-04 14:27:39 +00:00
Dr. Stephen Henson
4972d50da0 add comment 2012-05-23 11:47:01 +00:00
Dr. Stephen Henson
35b412322f fix typo 2012-05-23 11:45:21 +00:00
Dr. Stephen Henson
b440c25d36 Changes needed to support WinCE compilation:
Don't try to raise SIGABRT if not defined.
Return from fips_dhvs.c main instead of calling exit.
Workaround for lack of GetSystemFileAsFileTime.
Disable optimisation for part of bn_nist.c to avoid compiler bug.
Remove /WX flag so we don't exist on warnings.
2012-05-22 23:57:22 +00:00
Dr. Stephen Henson
ac381944ac give a hand old assemblers assembling loop instruction. (original by Andy) 2012-01-18 14:54:20 +00:00
Dr. Stephen Henson
61c3085d47 Workaround for VxWorks 2011-12-04 15:11:44 +00:00
Dr. Stephen Henson
efd031abca Fix x86cpuid so it doesn't fail for some (currently theoretical) virtual
machines.
2011-12-03 21:47:48 +00:00
Dr. Stephen Henson
dd4eefdb7b Change EVP_MAXCHUNK so it doesn't wraparound to 0 on some platforms (IP32L64). 2011-12-03 21:44:01 +00:00
Dr. Stephen Henson
5e900f3cef functions aren't unused: revert 2011-12-03 19:19:34 +00:00
Dr. Stephen Henson
75b250a4ed remove unused functions from module 2011-12-03 18:27:31 +00:00
Dr. Stephen Henson
44cb365eaf bn/asm/mips.pl: fix typos [from HEAD], original by Andy 2011-12-03 18:26:26 +00:00
Dr. Stephen Henson
31bf5f13e0 return error if counter exceeds limit and seed value supplied 2011-11-25 16:03:27 +00:00
Dr. Stephen Henson
7dcdc0d94d check counter value against 4 * L, not 4096 2011-11-25 15:00:20 +00:00
Dr. Stephen Henson
f6385248f6 Add flag to support cofactor ECDH 2011-11-19 17:03:44 +00:00
Dr. Stephen Henson
901b9b5c36 In EC_KEY_set_public_key_affine_coordinates include explicit check to see passed components do not exceed field order 2011-11-16 13:28:11 +00:00
Andy Polyakov
68b2f55b90 e_aes.c: fold aesni_xts_cipher and [most importantly] fix aes_xts_cipher's
return value after custom flag was rightly reverted [from HEAD].
2011-11-06 19:49:58 +00:00
Andy Polyakov
04c8062636 armv4cpuid.S, armv4-gf2m.pl: make newest code compilable by older assembler [from HEAD]. 2011-11-05 13:57:02 +00:00
Andy Polyakov
6fcc2bbce8 x86cpuid.pl: don't punish "last-year" OSes on "this-year" CPUs [from HEAD].
PR: 2633
2011-11-05 13:56:10 +00:00
Andy Polyakov
f2b0cf9178 ppc.pl: fix bug in bn_mul_comba4 [from HEAD].
PR: 2636
Submitted by: Charles Bryant
2011-11-05 13:55:20 +00:00
Dr. Stephen Henson
485ef852ac Add single call public key sign and verify functions. 2011-11-05 01:32:52 +00:00
Dr. Stephen Henson
9ab6d6813e PR: 2632
Submitted by: emmanuel.azencot@bull.net
Reviewed by: steve

Return -1 immediately if not affine coordinates as BN_CTX has not been
set up.
2011-10-26 16:46:20 +00:00
Dr. Stephen Henson
319c7264b0 typo 2011-10-24 13:24:28 +00:00
Andy Polyakov
f2784994ec e_aes.c: fold even aesni_ccm_cipher. 2011-10-24 06:00:06 +00:00
Andy Polyakov
507b0d9d38 e_aes.c: prevent potential DoS in aes_gcm_tls_cipher. 2011-10-23 22:58:40 +00:00
Andy Polyakov
181fbb77f3 cryptlib.c: remove stdio dependency in Windows fipscanister.lib. 2011-10-23 19:41:00 +00:00
Dr. Stephen Henson
f59a5d6079 No need for custom flag in XTS mode: block length is 1. 2011-10-23 17:06:28 +00:00
Dr. Stephen Henson
5fd722600b Check for selftest failure in various places. 2011-10-22 17:24:27 +00:00
Andy Polyakov
5b198d5eea x86gas.pl: relax .init segment alignment. 2011-10-22 10:49:52 +00:00
Dr. Stephen Henson
8d742dd561 Update error codes. 2011-10-21 11:46:16 +00:00
Andy Polyakov
033a25cef5 armcap.c: auto-setup processor capability vector. 2011-10-20 20:52:26 +00:00
Andy Polyakov
d528caa725 sha1-mips.pl: fix typo. 2011-10-20 08:39:29 +00:00
Dr. Stephen Henson
5e4eb9954b add authentication parameter to FIPS_module_mode_set 2011-10-19 22:34:53 +00:00
Andy Polyakov
227a822ab6 vxworks-mips: unify and add assembler. 2011-10-19 21:49:20 +00:00
Andy Polyakov
a9cf0b81fa Remove superseded MIPS assembler modules. 2011-10-19 21:42:21 +00:00
Andy Polyakov
3ee4d41fe1 arm_arch.h: add missing pre-defined macro, __ARM_ARCH_5TEJ__. 2011-10-19 18:57:03 +00:00
Bodo Möller
e5641d7f05 BN_BLINDING multi-threading fix.
Submitted by: Emilia Kasper (Google)
2011-10-19 14:59:27 +00:00