1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-28 00:58:09 +00:00
Commit Graph

17 Commits

Author SHA1 Message Date
Pavol Rusnak
bb4c3d0525
introduce and use memzero instead of explicit_bzero 2018-01-18 15:18:09 +01:00
Pavol Rusnak
b7f73ee3ff
use explicit_bzero 2018-01-16 19:41:27 +01:00
Jan Pochyla
20bb7e9b5c sha1: fix context zeroing 2016-11-06 16:02:10 +01:00
Saleem Rashid
19efbeef8d sha2: add sha1_Raw 2016-11-05 15:14:37 +01:00
Saleem Rashid
d812c7209f sha2: import SHA1 implementation 2016-11-05 15:14:37 +01:00
Saleem Rashid
1b79c93bbc sha2: NIST FIPS 180-2 naming conventions 2016-11-05 15:14:37 +01:00
Jochen Hoenicke
19a1f501c4
Simplified sha256_Final/sha512_Last
- Fix the bug where we zero too many bytes in sha512_Last
  (SHORT_BLOCK_LENGTH != BLOCK_LENGTH -2).
- Get rid of an if branch.
- Don't reverse the last two words in 512_Last that are written later.
- make 256_Final and 512_Last look the same.
2016-08-29 21:55:57 +02:00
Jochen Hoenicke
b3e6eecfce
sha2: Fix unaligned access 2016-08-29 21:55:11 +02:00
Jochen Hoenicke
32bda8d1d9
Faster PBKDF2 by reusing intermediate results.
The old implementation needed 6 sha transformations per iterations:

- 2 for computing sha512 of seed,
- 2 for computing digests of ipads/opads,
- 2 for computing digests of intermediate hashes.

The first 4 transformations are the same in every iteration so we cache
them.  A new function hmac_sha512_prepare computes these digests.
We made sha512_Transform visible in pbkdf2 and prevent unneccessary
big/little endian conversions back and forth.
2016-07-13 22:17:23 +02:00
Pavol Rusnak
9e5d03a1fc
fix alignment in sha functions 2016-05-12 16:16:01 +02:00
Pavol Rusnak
ed6debf8c4
reorder parameters of hash_final methods 2016-04-26 11:50:04 +02:00
Adam Mackler
cb6f976b0d Remove unused static variable sha384_initial_hash_value. 2015-01-27 19:22:42 -05:00
Pavol Rusnak
612f5ab050 fix copyright headers 2014-05-22 20:54:58 +02:00
Pavol Rusnak
b08d44d39e fix prefixes in internal functions as well 2014-02-19 21:42:14 +01:00
Pavol Rusnak
d0e152a088 replace SHA256/SHA512 prefix with sha256/sha512 (OpenSSL clash) 2014-02-19 21:26:42 +01:00
Pavol Rusnak
07d1c22730 refactor code -> bignum.c/h 2013-09-12 03:18:35 +02:00
Pavol Rusnak
40fa3f52e4 use sha2 implementation by Aaron D. Gifford 2013-09-10 21:10:07 +02:00