I hereby claim:
- I am azuchi on github.
- I am azuchi (https://keybase.io/azuchi) on keybase.
- I have a public key ASBUJG8L-SCcFbHbeu7C5hYz3RPwIr1wcgPe0kw3iErnrgo
To claim this, I am signing this object:
| # ECDSAを使ったAdaptor Signature | |
| require 'bitcoin' | |
| require 'paillier' | |
| point_field = ECDSA::PrimeField.new(ECDSA::Group::Secp256k1.order) | |
| # アリスが鍵ペアを生成 | |
| alice_key = Bitcoin::Key.generate | |
| alice_pub = alice_key.to_point |
| # 効率的なECDSAの2-of-2のマルチシグ | |
| require 'bitcoin' | |
| require 'paillier' | |
| # アリスが鍵ペアを生成 | |
| alice_key = Bitcoin::Key.generate | |
| alice_pub = alice_key.to_point | |
| # ボブが鍵ペアを生成 | |
| bob_key = Bitcoin::Key.generate |
| # using bitcoinrb | |
| require 'bitcoin' | |
| # oracle | |
| # oracle's key. V = vG | |
| o_key = Bitcoin::Key.new(priv_key: '860f6a0296aae3901e374be83d962351366386fb5f65ffef75c9f389c256e724') | |
| V = o_key.to_point | |
| v = o_key.priv_key.to_i(16) |
| require 'ecdsa' | |
| require 'bitcoin' | |
| tx = Bitcoin::Tx.parse_from_payload('010000000201e4a0f1fa83c642b91feafae36a0f8fded4158dfa6fd650e046b4364b805684000000006a473044022045c65646abc12c71352335dbec2824b2dbdef9253366b4b83439b2190ce098d20220112f48fc8e2c76d079a4bc1d448ec134d22737d9765421b7a9b050dd4dc9368f01210259f6658325c4e3ca6fb38f657ffcbf4b1c45ef4f0c1dd86d5f6c0cebb0e09520ffffffff31137db564a7fad07c9db5b6b862786589977c68d1270819030a9079941ca6c9010000006a47304402204354565632eedd30fb9ca5c22bb70ef848afd74f7bed354d267705a6e71ea885022019159daf2d623ef634a65399ce70e34c4422c8eba19bf877e6b822ffc6a4607601210259f6658325c4e3ca6fb38f657ffcbf4b1c45ef4f0c1dd86d5f6c0cebb0e09520ffffffff02801d2c04000000001976a914322653c91d6038e08b6d971e4560842c155c8a8888ac80248706000000001976a9143b9722f91a2e50d913dadc3a6a8a88a58a7b859788ac00000000'.htb) | |
| prev_out = Bitcoin::Script.parse_from_payload('76a9143b9722f91a2e50d913dadc3a6a8a88a58a7b859788ac'.htb) | |
| ## ↑の0番目のインプットを署名する際に使用するsighash=署名対象のメッセージ | |
| sighash = tx.sighash_for_input(0, prev_out) | |
| # 実際の署名 |
I hereby claim:
To claim this, I am signing this object:
| require 'bitcoin' | |
| class CrawlerConnection < EM::Connection | |
| attr_accessor :message | |
| attr_reader :host | |
| attr_reader :port | |
| def initialize(host, port) | |
| @message = '' |
| module Bech32 | |
| autoload :SegwitAddr, 'bech32/segwit_addr' | |
| SEPARATOR = '1' | |
| CHARSET = %w(q p z r y 9 x 8 g f 2 t v d w 0 s 3 j n 5 4 k h c e 6 m u a 7 l) | |
| GF1024_EXP = [ | |
| 1, 303, 635, 446, 997, 640, 121, 142, 959, 420, 350, 438, 166, 39, 543, |
| require 'murmurhash3' | |
| class BloomFilter | |
| SEED_BASE = 0xFBA4C795 | |
| attr_reader :bits | |
| attr_reader :hash_funcs | |
| attr_reader :tweak |
| { | |
| "asset_ids": [ | |
| "oQDVsbKEAkkBz1nN5BTGUwMxu9Y5CmhFEU" | |
| ], | |
| "contract_url": "", | |
| "name_short": "BP", | |
| "name": "Blockchain Programing", | |
| "issuer": "Shigeyuki Azuchi", | |
| "description": "Blockchain Programingの検証用コインです", | |
| "description_mime": "text/x-markdown; charset=UTF-8", |
| require 'bitcoin' | |
| require 'eventmachine' | |
| Bitcoin.network = :testnet3 | |
| class Connection < EM::Connection | |
| attr_reader :host, :port, :parser | |
| def initialize(host, port) |