When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
# The mystery around secpxxxk1 generation points :) | |
# ------------------------------------------------- | |
# | |
# The SEC 2 familiy of elliptic curves are defined in https://www.secg.org/sec2-v2.pdf | |
# and widely used in cryptography. | |
# | |
# The generation points G of these curves are defined in the standard paper without any nearer | |
# explanation how they were chosen. Interestingly the generation points (G) of all prime order | |
# koblitz curves of the SEC 2 family (secp160k1, secp192k1, secp224k1, secp256k1) share some | |
# unusual mysterious property. |
let elliptic = require('elliptic'); | |
let sha3 = require('js-sha3'); | |
let ec = new elliptic.ec('secp256k1'); | |
// let keyPair = ec.genKeyPair(); | |
let keyPair = ec.keyFromPrivate("97ddae0f3a25b92268175400149d65d6887b9cefaf28ea2c078e05cdc15a3c0a"); | |
let privKey = keyPair.getPrivate("hex"); | |
let pubKey = keyPair.getPublic(); | |
console.log(`Private key: ${privKey}`); | |
console.log("Public key :", pubKey.encode("hex").substr(2)); |