Signing a transaction with SSL

0

I'm trying to sign a transaction using SSL. I already generated the raw transaction and hashed it properly. So I'd like to sign the following hash: c88568c9a85d52d07432dee9ee8dd1c63a4bfea6f754d2ec94f50015ae91a3f3, using the following private key: a16173978f25fcae5a1e55733fbda2f86470427e5cd9407c51b427c3054d182e.

I have looked around and figured the following command: openssl dgst -sha256 -hex -sign key.pem hash.txt. Great! (I think). How can I convert my private key to .pem file so SSL can use it to sign?

user2298995

Posted 2017-12-25T13:09:36.627

Reputation: 113

Question was closed 2017-12-25T20:12:31.793

Answers

0

Bitcoin does not work with strings and hashing, you first need to convert to binary. On Unix systems, you can use xxd to convert string to binary (into file).

See also here:

Verifying a bitcoin trx on the Unix cmd line with OpenSSL?

pebwindkraft

Posted 2017-12-25T13:09:36.627

Reputation: 4 568