1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2025-03-24 03:15:43 +00:00

Merge pull request #650 from danra/patch-5

[ch6] Use n instead of p for group order of EC
This commit is contained in:
Will Binns 2019-10-03 14:53:55 +02:00 committed by GitHub
commit d46067acf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -650,7 +650,7 @@ The temporary key pair is based on a random number _k_, which is used as the tem
From there, the algorithm calculates the _S_ value of the signature, such that:
_S_ = __k__^-1^ (__Hash__(__m__) + __dA__ * __R__) _mod p_
_S_ = __k__^-1^ (__Hash__(__m__) + __dA__ * __R__) _mod n_
where:
@ -658,7 +658,7 @@ where:
* _R_ is the x coordinate of the ephemeral public key
* _dA_ is the signing private key
* _m_ is the transaction data
* _p_ is the prime order of the elliptic curve
* _n_ is the prime order of the elliptic curve
Verification is the inverse of the signature generation function, using the _R_, _S_ values and the public key to calculate a value _P_, which is a point on the elliptic curve (the ephemeral public key used in signature creation):