riastradh
808c0b52c7
Sort includes.
2015-04-21 12:47:33 +00:00
justin
6324ab4097
On big endian machines needs to include sys/endian.h for le32dec
...
Mainly affects cross builds on big endian; tested on FreeBSD mips
and Linux ppc.
2015-04-15 08:31:05 +00:00
rmind
ecc1424a7c
murmurhash2: add an optimised path for the aligned pointer case.
2013-10-26 21:06:38 +00:00
rmind
4080fc40d9
RUMP fix: ifdef weak alias. Pointed out by martin@.
2013-06-30 12:20:32 +00:00
christos
b9d62bd6aa
no need for the local defs of he enc functions; compat_defs.h provides them.
2013-06-09 19:46:56 +00:00
christos
af7cd4f35f
Use be{32,64}enc, suggested by joerg.
2013-06-09 02:58:58 +00:00
christos
ff7cb014e8
PR/47908: Gary Grebus: SHA256_Transform and SHA512_Transform are called
...
by openssl with unaligned buffers. All other Transforms can handle unaligned
buffers so make these handle them too.
XXX[1]: any better fixes are welcome
XXX[2]: pullup-5, pullup-6
2013-06-07 22:40:34 +00:00
christos
d290d1674e
Fix kernel compilation: no namespace.h
...
Fix libc RCSID protection.
Remove useless cast.
2012-07-10 17:05:38 +00:00
rmind
6461e5c133
Add weak symbol for murmurhash2.
2012-07-09 21:25:46 +00:00
rmind
5811facfd9
Shut up lint.
2012-07-08 13:42:29 +00:00
rmind
ea196989a7
Add MurmurHash2 -- a non-cryptographic hash function by Austin Appleby.
...
The code is taken from the upstream and is in the public domain.
OK christos@
2012-07-08 01:21:11 +00:00
joerg
85b087f151
Fix unaligned access in *_Final for SHA224/SHA256/SHA384.
...
Remaining part of PR 42273. Tested by snj.
2010-01-24 21:11:18 +00:00
joerg
e51ee4c474
Fix unaligned access as reported in PR port-sparc/42273
2009-11-06 20:31:17 +00:00
joerg
0c6bb30e0c
Improve portability and clarity by using uint8_t for the byte data
...
and expanding u_int to not depend on the !POSIX types.
2009-11-06 20:31:17 +00:00
skrll
b1aca4e8f5
Don't define weak aliases if _STANDALONE.
2009-08-21 09:40:51 +00:00
joerg
faf14618b6
Fix initialisation of SHA224.
2009-06-25 14:05:18 +00:00
tsutsui
ab35397894
- move #include <sys/param.h> inside #if defined(_KERNEL) section
...
where it's actually required
- add XXX comments that notes <sys/param.h> is required for vax memset(9)
2009-06-19 05:09:09 +00:00
he
b1946a6b32
Back out the addition of memset.c to the vax libkern, and instead do
...
as tsutsui@ suggested, and include <sys/param.h> in sha2.c instead.
On the vax, this causes <machine/macros.h> to be included, and it contains
that machine's memset() macro+inline.
2009-06-18 15:22:24 +00:00
martin
cd4c43c910
Fix copy&paste errors
2009-06-14 14:04:07 +00:00
joerg
94cd590d07
Provide fallback definitions of be[32|64]toh and htobe[32|64] for
...
systems without sys/endian.h.
2009-06-11 22:40:42 +00:00
christos
13573b1916
use memcpy for bitcount writes to the buffer to avoid type punning issues.
2009-06-11 20:43:00 +00:00
christos
46f23cedb2
- fix sha224 functions that used sha256 ctx, and add casts.
...
- fix sha224 function lengths.
- wrap long lines
- use NULL
- fix whitespace
- put all 224 functions together in the same spirit as 384
2009-06-11 20:35:29 +00:00
joerg
02c4298092
KNF
2009-06-11 19:05:17 +00:00
joerg
8c33577af1
De-uglify:
...
- drop useless asserts
- use uintXX_t directly
- use NULL
2009-06-11 19:02:04 +00:00
joerg
c8f28eff97
Simplify by using sys/endian.h functions. Fixes Big Endian case for SHA2.
2009-06-11 18:46:37 +00:00
joerg
09d5d44150
Add SHA224 implementation to libc.
...
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
2009-05-26 08:04:11 +00:00
cegger
962766853c
ansify function definitions
2009-03-16 05:59:21 +00:00
apb
267197ec1e
For all files under src/common, as well as related man pages under
...
src/lib/libc, or related headers under src/sys/sys: change u_intNN_t to
uintNN_t.
2008-02-16 17:37:13 +00:00
apb
cf01a0f8c8
C99 is no longer "very recent". Adjust a comment accordingly, and
...
start using uintNN_t instead of u_intNN_t in the definitions of
sha2_{byte,word32,word64}.
2008-02-16 17:15:32 +00:00
drochner
de07feb28f
cast to void* to avoid a fatal warning
2007-07-18 16:58:14 +00:00
joerg
17c77a58f0
Fix SIGBUS issues on strict alignment issues. Use le32dec in RMD160
...
as the data pointer to RMD160_Update doesn't have to be aligned.
In SHA256_Update and SHA512_Update, only operate directly on the passed
in data if no left-over in the context exists and the data is correctly
aligned. The problem was exposed by the audit-packages rewrite in C
and reported for the libnbcompat version in PR pkg/36662.
2007-07-18 13:57:54 +00:00
christos
ace49726e7
Make SHA512_Last static since it is not part of the API. Suggested by
...
Matthias Scheler
2007-02-18 18:13:38 +00:00
christos
5feb51ff2c
make SHA512_Last weak.
2007-02-17 17:15:43 +00:00
he
80b96f1aa4
Add include of <sys/param.h>, to allow vax kernels to build again.
...
For vax, this causes <machine/macros.h> to be included and the
redefine of memset() to take effect.
2006-11-01 11:29:08 +00:00
christos
d029b25938
restruct the include files to look like the other hash functions.
2006-10-27 21:25:21 +00:00
christos
77c9e41904
this is shared with the kernel now.
2006-10-27 21:23:15 +00:00
christos
275e8bb92d
add files I forgot to commit.
2005-12-20 20:29:40 +00:00