1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

Merge pull request #28 from oleganza/master

Typo fix in RFC6979 implementation
This commit is contained in:
Pavol Rusnak 2015-03-30 17:32:38 +02:00
commit ad71a16e61

View File

@ -277,7 +277,7 @@ int generate_k_rfc6979(bignum256 *secret, const uint8_t *priv_key, const uint8_t
buf[sizeof(v)] = 0x01; buf[sizeof(v)] = 0x01;
memcpy(buf + sizeof(v) + 1, bx, 64); memcpy(buf + sizeof(v) + 1, bx, 64);
hmac_sha256(k, sizeof(k), buf, sizeof(buf), k); hmac_sha256(k, sizeof(k), buf, sizeof(buf), k);
hmac_sha256(k, sizeof(k), v, sizeof(k), v); hmac_sha256(k, sizeof(k), v, sizeof(v), v);
for (i = 0; i < 10000; i++) { for (i = 0; i < 10000; i++) {
hmac_sha256(k, sizeof(k), v, sizeof(v), v); hmac_sha256(k, sizeof(k), v, sizeof(v), v);