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

12 Commits

Author SHA1 Message Date
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
51c0bb09d8
make salt constant in pbkdf2 2016-05-12 20:57:55 +02:00
Pavol Rusnak
242a5de275
simplify pbkdf2 (support only klen == hashlen) and split it 2016-05-01 01:18:50 +02:00
Pavol Rusnak
08219ea77a
pbkdf2 now uses new hmac api 2016-04-26 17:43:13 +02:00
Pavol Rusnak
fbc0df736a
call progress callback at the beginning of pbkdf2 calculation 2016-01-19 15:34:31 +01:00
Pavol Rusnak
21d0bb437a cleanup coding style 2015-04-13 18:19:33 +02:00
netanelkl
3fd32df8ed More of the same. 2015-04-09 15:05:28 -04:00
Pavol Rusnak
f6560c7d13 split pbkdf2 into pbkdf2_hmac_sha256 and pbkdf2_hmac_sha512 2014-10-30 01:35:13 +01:00
Pavol Rusnak
612f5ab050 fix copyright headers 2014-05-22 20:54:58 +02:00
Pavol Rusnak
393c298c35 add progress_callback to mnemonic/pbkdf2 functions 2014-03-11 20:14:06 +01:00
Pavol Rusnak
97067c918e extract some pbkdf2 constants into macros 2013-12-09 18:16:33 +01:00
Pavol Rusnak
352bc42be2 use PBKDF2 for BIP39, add unit tests 2013-12-09 16:25:03 +01:00