Author

Topic: Using GPG as a Bitcoin address (Read 173 times)

newbie
Activity: 24
Merit: 4
July 09, 2019, 04:28:44 PM
#1
Hello,

I was trying to test that recipe

Using GPG as a Bitcoin address
BY SIMON CASTANO
https://bitcoindev.network/using-gpg-as-a-bitcoin-address/ 

Quote
Background
Following the addition of secp256k1 elliptic curve support to GnuPGP in early 2014, and the recent merge of BIP174 for enabling partially signed bitcoin transaction (PSBT), it appears possible to use OpenPGP cards to store bitcoin private key in the tamper-resistant and PIN-protected device.

I never used Julia language before and I am stuck while trying to extract a point on an scep256k1 curve using the function bin2packet ( https://gitlab.com/braneproject/pgpacket.jl )

Code:
julia> using PGPacket, Bitcoin, Base58, ECC

julia> packet = bin2packet("pubkey.bin")
ERROR: MethodError: no method matching bytes2hex(::CompactSizeUInt)
Closest candidates are:
  bytes2hex(::AbstractArray{UInt8,N} where N) at strings/util.jl:588
  bytes2hex(::IO, ::AbstractArray{UInt8,N} where N) at strings/util.jl:596
Stacktrace:
 [1] readgenericpacket(::Base.GenericIOBuffer{Array{UInt8,1}}, ::PGPacket.PGPHeader) at /home/aa/.julia/packages/PGPacket/jyBaz/src/PGPacket.jl:97
 [2] bin2packet(::String) at /home/aa/.julia/packages/PGPacket/jyBaz/src/PGPacket.jl:87
 [3] top-level scope at none:0

Is there any alternative for that step in python?

Thanks in advance for any constructive comments
Jump to: