1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-05-22 08:48:46 +00:00

Update documentation regarding ECDSA curves support

This commit is contained in:
Roman Zeyde 2015-07-07 10:38:16 +03:00
parent f2ef64228a
commit 587d6a65ea
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ These include:
- Big Number (256 bit) Arithmetics - Big Number (256 bit) Arithmetics
- BIP32 Hierarchical Deterministic Wallets - BIP32 Hierarchical Deterministic Wallets
- BIP39 Mnemonic code - BIP39 Mnemonic code
- ECDSA signing/verifying (only hardcoded secp256k1 curve, - ECDSA signing/verifying (supports secp256k1 and nist256p1 curves,
uses RFC6979 for deterministic signatures) uses RFC6979 for deterministic signatures)
- ECDSA public key derivation + Base58 address representation - ECDSA public key derivation + Base58 address representation
- HMAC-SHA256 and HMAC-SHA512 - HMAC-SHA256 and HMAC-SHA512

View File

@ -364,7 +364,7 @@ void bn_inverse(bignum256 *x, const bignum256 *prime)
// res = old(x)^((prime-2) % 2^(i*30)) // res = old(x)^((prime-2) % 2^(i*30))
// get the i-th limb of prime - 2 // get the i-th limb of prime - 2
limb = prime->val[i]; limb = prime->val[i];
// this is not enough in general but fine for secp256k1 because prime->val[0] > 1 // this is not enough in general but fine for secp256k1 & nist256p1 because prime->val[0] > 1
if (i == 0) limb -= 2; if (i == 0) limb -= 2;
for (j = 0; j < 30; j++) { for (j = 0; j < 30; j++) {
// invariants: // invariants:

View File

@ -6,9 +6,9 @@
#include "rand.h" #include "rand.h"
/* /*
* This program prints the contents of the secp256k1_cp array. * This program prints the contents of the ecdsa_curve.cp array.
* The entry secp256k1_cp[i][j] contains the number (2*j+1)*16^i*G, * The entry cp[i][j] contains the number (2*j+1)*16^i*G,
* where G is the generator of secp256k1. * where G is the generator of the specified elliptic curve.
*/ */
int main(int argc, char **argv) { int main(int argc, char **argv) {
int i,j,k; int i,j,k;