btc笔记

WIF = Wallet Import Format (private key)

const BigNumber = require('bignumber.js')
const BNOf = n => new BigNumber(n)

const p = BNOf('115792089237316195423570985008687907853269984665640564039457584007908834671663')
const x = BNOf('55066263022277343669578718895168534326250603453777594175500187360389116729240')
const y = BNOf('32670510020758816978083085130507043184471273380659243275938904335757337482424')
// >>> (x ** 3 + 7 - y**2) % p

console.log(
    x
    .pow(3)
    .plus(6)
    .minus(y.pow(2))
    .mod(p)
    .toNumber() 
)



你可能感兴趣的:(btc笔记)