diff options
| author | miod <> | 2015-03-18 05:26:10 +0000 |
|---|---|---|
| committer | miod <> | 2015-03-18 05:26:10 +0000 |
| commit | 5018b21486fe3d91084c0d32a86d1240d832e25e (patch) | |
| tree | e1d52e8097383e7013cf5ce2bd929fe8f0cfaa67 | |
| parent | 09abc5bf0229b90d3588a393613e09d669ec3581 (diff) | |
| download | openbsd-5018b21486fe3d91084c0d32a86d1240d832e25e.tar.gz openbsd-5018b21486fe3d91084c0d32a86d1240d832e25e.tar.bz2 openbsd-5018b21486fe3d91084c0d32a86d1240d832e25e.zip | |
In the neverending saga of enabling and disabling assembler code for sha
routines on hppa, the cause for sha512-parisc subtly misbehaving has been
found: despite having fallback pa1.1 code when running on a 32-bit cpu, the
shift constants used in the sigma computations in sha512 are >= 32 and are
silently truncated to 5 bits by the assembler, so there is no chance of
getting this code to work on a non-pa2.0 processor.
However, the pa1.1 fallback code for sha256 is safe, as it never attempts to
shift by more than 31, so reenable it again.
| -rw-r--r-- | src/lib/libcrypto/arch/hppa/Makefile.inc | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto/arch/hppa/Makefile.inc | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/libcrypto/arch/hppa/Makefile.inc b/src/lib/libcrypto/arch/hppa/Makefile.inc index d8ca1065d6..0e18de2074 100644 --- a/src/lib/libcrypto/arch/hppa/Makefile.inc +++ b/src/lib/libcrypto/arch/hppa/Makefile.inc | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile.inc,v 1.8 2015/03/05 20:35:28 miod Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.9 2015/03/18 05:26:10 miod Exp $ |
| 2 | 2 | ||
| 3 | # hppa-specific libcrypto build rules | 3 | # hppa-specific libcrypto build rules |
| 4 | 4 | ||
| @@ -30,12 +30,8 @@ SRCS+= rc4_enc.c rc4_skey.c | |||
| 30 | # sha | 30 | # sha |
| 31 | CFLAGS+= -DSHA1_ASM | 31 | CFLAGS+= -DSHA1_ASM |
| 32 | SSLASM+= sha sha1-parisc sha1-parisc | 32 | SSLASM+= sha sha1-parisc sha1-parisc |
| 33 | .if 0 # sha512 subtly broken, sha256 probably as well | ||
| 34 | CFLAGS+= -DSHA256_ASM | 33 | CFLAGS+= -DSHA256_ASM |
| 35 | SSLASM+= sha sha512-parisc sha256-parisc | 34 | SSLASM+= sha sha512-parisc sha256-parisc |
| 36 | CFLAGS+= -DSHA512_ASM | ||
| 37 | SSLASM+= sha sha512-parisc sha512-parisc | ||
| 38 | .endif | ||
| 39 | # whrlpool | 35 | # whrlpool |
| 40 | SRCS+= wp_block.c | 36 | SRCS+= wp_block.c |
| 41 | 37 | ||
diff --git a/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc b/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc index d8ca1065d6..0e18de2074 100644 --- a/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile.inc,v 1.8 2015/03/05 20:35:28 miod Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.9 2015/03/18 05:26:10 miod Exp $ |
| 2 | 2 | ||
| 3 | # hppa-specific libcrypto build rules | 3 | # hppa-specific libcrypto build rules |
| 4 | 4 | ||
| @@ -30,12 +30,8 @@ SRCS+= rc4_enc.c rc4_skey.c | |||
| 30 | # sha | 30 | # sha |
| 31 | CFLAGS+= -DSHA1_ASM | 31 | CFLAGS+= -DSHA1_ASM |
| 32 | SSLASM+= sha sha1-parisc sha1-parisc | 32 | SSLASM+= sha sha1-parisc sha1-parisc |
| 33 | .if 0 # sha512 subtly broken, sha256 probably as well | ||
| 34 | CFLAGS+= -DSHA256_ASM | 33 | CFLAGS+= -DSHA256_ASM |
| 35 | SSLASM+= sha sha512-parisc sha256-parisc | 34 | SSLASM+= sha sha512-parisc sha256-parisc |
| 36 | CFLAGS+= -DSHA512_ASM | ||
| 37 | SSLASM+= sha sha512-parisc sha512-parisc | ||
| 38 | .endif | ||
| 39 | # whrlpool | 35 | # whrlpool |
| 40 | SRCS+= wp_block.c | 36 | SRCS+= wp_block.c |
| 41 | 37 | ||
