1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +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
- BIP32 Hierarchical Deterministic Wallets
- BIP39 Mnemonic code
- ECDSA signing/verifying (only hardcoded secp256k1 curve,
- ECDSA signing/verifying (supports secp256k1 and nist256p1 curves,
uses RFC6979 for deterministic signatures)
- ECDSA public key derivation + Base58 address representation
- 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))
// get the i-th limb of prime - 2
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;
for (j = 0; j < 30; j++) {
// invariants:

View File

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