Number of curves tested: 4
Number of iterations per curve: 500
secp256k1 --- Total: 23.179268121719 / Avg run: 0.046358536243439
nist-p192 --- Total: 15.343150854111 / Avg run: 0.030686301708221
nist-p256 --- Total: 23.433343887329 / Avg run: 0.046866687774658
nist-p521 --- Total: 73.456861019135 / Avg run: 0.14691372203827
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Decompressing a compressed bitcoin public key. | |
// Will require a big number library, with functions for modular exponent, square root (mod prime), and modulus. | |
// Requires gmp, and mathyass danters ecclib | |
public static function decompress_public_key($key) | |
{ | |
$y_byte = substr($key, 0, 2); | |
$x_coordinate = substr($key, 2); | |
// Convert x hexadecimal to a decimal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Average block time in minutes. | |
$avg_block_time = file_get_contents("https://blockchain.info/q/interval")/60; | |
// Pools page.. | |
$pools_page = file_get_contents("https://blockchain.info/pools?timespan=4days"); | |
// Obtain the JSON string blockchain embeds in their page for the graph | |
$lines = explode("\n",$pools_page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>User Registration</title> | |
<script src="bitcorelatest.js"></script> | |
<script> | |
// Derive given private key index.. | |
function get_bip32_key(path) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir /tmp/screenio | |
echo "Enter screenshot filename:" | |
read filename | |
scrot /tmp/screenio/$filename.png | |
scp /tmp/screenio/$filename.png thelab:/var/www/thomaskerin.io/uploads/ | |
echo "Uploaded to https://thomaskerin.io/uploads/$filename.png" | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package wallet | |
import ( | |
"bytes" | |
"github.com/btccom/mrsign/bip32util" | |
"github.com/btcsuite/btcd/btcec" | |
"github.com/btcsuite/btcd/chaincfg" | |
"github.com/btcsuite/btcd/txscript" | |
"github.com/btcsuite/btcd/wire" | |
"github.com/btcsuite/btcutil" |
It starts with a Signer..
s = Signer(tx)
The signer lets you peek at InputSigners.
iS = s.input(nIn, txOut, [rs], [ws])
this step involves classification of
- bare scriptPubKey: txOut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
if ($argc < 1) { | |
die("missing directory"); | |
} else if ($argv < 2) { | |
die("missing search string"); | |
} | |
$dir = $argv[1]; |
OlderNewer