mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
add b to ecdsa_curve structure
This commit is contained in:
parent
418e86c293
commit
2e09a9ff35
1
ecdsa.h
1
ecdsa.h
@ -40,6 +40,7 @@ typedef struct {
|
||||
bignum256 order; // order of G
|
||||
bignum256 order_half; // order of G divided by 2
|
||||
bignum256 a; // coefficient 'a' of the elliptic curve
|
||||
bignum256 b; // coefficient 'b' of the elliptic curve
|
||||
|
||||
#if USE_PRECOMPUTED_CP
|
||||
const curve_point cp[64][8];
|
||||
|
@ -43,6 +43,10 @@ const ecdsa_curve nist256p1 = {
|
||||
|
||||
/* a */ {
|
||||
/*.val =*/{0x3ffffffc, 0x3fffffff, 0x3fffffff, 0x3f, 0x0, 0x0, 0x1000, 0x3fffc000, 0xffff}
|
||||
},
|
||||
|
||||
/* b */ {
|
||||
/*.val =*/{0x27d2604b, 0x2f38f0f8, 0x53b0f63, 0x741ac33, 0x1886bc65, 0x2ef555da, 0x293e7b3e, 0xd762a8e, 0x5ac6}
|
||||
}
|
||||
#if USE_PRECOMPUTED_CP
|
||||
,
|
||||
@ -50,5 +54,4 @@ const ecdsa_curve nist256p1 = {
|
||||
#include "nist256p1.table"
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
@ -43,6 +43,10 @@ const ecdsa_curve secp256k1 = {
|
||||
|
||||
/* a */ {
|
||||
/*.val =*/{0}
|
||||
},
|
||||
|
||||
/* b */ {
|
||||
/*.val =*/{7}
|
||||
}
|
||||
#if USE_PRECOMPUTED_CP
|
||||
,
|
||||
|
Loading…
Reference in New Issue
Block a user