Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 882 Bytes

File metadata and controls

31 lines (22 loc) · 882 Bytes

ECDSA SECP256k1 Jordon Matrix

Contains JavaScript ECDSA generator, specifically secp256k1 properties, using jordon form matrices.

Using the R,S and Z values, you can generate a public key.
This example code demonstrates how to get public keys using RSZ values from a transaction input.
The output from a typical RSZ will produce 2 possible public keys,
If the public key matches the one used in the TX input, or generates the address used in the TX Input's previous output, then it can be considered a valid transaction that was signed using the private key of the found public key.

pseudocode to get public key point
pubKey = (ecPoint(K) * (S/R)) - ecPoint(Z/R))

NodeJS

npm install big-integer
nodejs getPubKeyFromRSZ.js

Python 3

python getPubKeyFromRSZ.py

TypeScript

npm run build
node ./dist/getPubKeyFromRSZ.js