From 587d6a65ea84f8927c9795d7051a2db791bc0154 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Tue, 7 Jul 2015 10:38:16 +0300 Subject: [PATCH] Update documentation regarding ECDSA curves support --- README.md | 2 +- bignum.c | 2 +- tools/mktable.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f694357fa..435f9f1ad 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/bignum.c b/bignum.c index 050078a09..dee2f72a0 100644 --- a/bignum.c +++ b/bignum.c @@ -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: diff --git a/tools/mktable.c b/tools/mktable.c index f509a941d..e7ff12c26 100644 --- a/tools/mktable.c +++ b/tools/mktable.c @@ -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;