Bitcoin Forum
August 17, 2026, 01:36:57 AM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Bitnote - Bitcoin paper note creator on: April 12, 2017, 07:27:58 PM
Bitnote is a command line application that can be used to create bitcoin paper notes in ps and pdf format:

http://bitgen.org/bitnote



Here are an examples of a generated paper wallets:

http://bitgen.org/bitnote/example_canton.pdf
http://bitgen.org/bitnote/example_rtuga.pdf
http://bitgen.org/bitnote/example_timbo.pdf

To generate a postscript file, use the bitnote command with the WIF as parameter, for example:

$ ./bitnote Kx1oiWaDdU5udEbAzQfEztwR2YzRedbwaN9H8GJqtGVKj5J6ReDD

A design can be specified as a second parameter, currently one of "canton",  "mrno",  "rtuga" and "timbo".
A bitcoin amount can be specifed as the third argument.

Example:
$ ./bitnote Kx1oiWaDdU5udEbAzQfEztwR2YzRedbwaN9H8GJqtGVKj5J6ReDD rtuga 1.3

The code is open source, and uses the same bitcoin library as bitgen:
http://bitgen.org/

The designs originate from this thread:
https://bitcointalk.org/index.php?topic=155847

2  Bitcoin / Development & Technical Discussion / Format for full file signatures on: September 18, 2015, 09:36:33 PM
There does not seem to exist a format for full file bitcoin signatures, at least have I not found any.

It is a bit surprising that bitcoin uses signatures at the core of its functionality,
but bitcoin developers seem to use PGP signatures for distributed software instead of bitcoin signatures.

There are a couple of message formats for bitcoin signatures, but they seem to be mostly used for
signatures of short messages where the result of the signature operation is a new file where the message is included.

However, it would be very useful to be able to sign an existing file which might be very large,
for example en exe-file or a source code archive.
This would provide PGP-like signature functionality using the bitcoin elliptic curve.

I have therefore created and implemented such a signature format which is included in the bitgen software package:

http://bitcoin-gen.org/

A signature might look like this:
------ BEGIN BITCOIN SEPC256K1 SIGNATURE ------
feu
14F0668D7FE8938F6A23F8FE1A4FB906C558A3FBDB967222B929158487F34183
6C50D34A304A3227035CEE1ADE006B5502CC41BF639609201F75919F1B3F560E
------ END BITCOIN SEPC256K1 SIGNATURE ------


The signature includes the r and s values of the signature as well as three boolean values.

The public key x and y values are not included since the sepc256k1 curve allows public key recovery
from the r and s values and the hash sum.

The three letters in the first line give information about which public address should be choosen since there are
eight possible public addresses when (r, s, hash) are given.

The first letter can be "f" or "s", which stands for "first" and "second".
With "f", the first value should be choosen, with "s" the second value is the correct one.

The second letter is "e" or "o" for "odd" or "even", and will together with the first boolean value give the correct public key.

The public address can be derived from a compressed or uncompressed public key.
The third character specifies "u" for uncompressed or "c" for compressed.

The second and third lines are the r and s values as hex encoded values.

The double sha256 hash of the file is performed using the string "Bitcoin Signed File " followed by the
byte length of the file contents in decimal ascii, followed by " bytes:" and finally the file contents:

"Bitcoin Signed File " + ascii(length) + " bytes:" + file_content

The file format uses unix style newline with a single linefeed character.


Building the project will give two executable files, one which is bitsig

In order to create and store a new private key, use for example:
$ bitsig random

When this is done, the signature of any file can be created:
$ echo "bitgen test" > btest.txt
$ bitsig sign btest.txt

This will give output similar to the following:
========================
Signing message file: btest.txt
No key specified, using default key: 17RjaCGZQbe2Cw984YdWcMcWDgM86kM7EN
Generating 32 random bytes.
Press random keys or move the mouse if needed
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

Signing in progress...
Trying even...
Parity is even

Result written to: btest.txt.bitsig
========================

In order to verify the signature of the file, give the following command:

$ bitsig verify btest.txt btest.txt.bitsig

This will give:
========================
The signed file      : btest.txt
The signature file   : btest.txt.bitsig
Calculated address   : 17RjaCGZQbe2Cw984YdWcMcWDgM86kM7EN
No public address given, looking in keychain
This is our own address
Found the address in the keychain
Verifying signature....
Verify OK for address: 17RjaCGZQbe2Cw984YdWcMcWDgM86kM7EN
Address alias: MY KEY
========================
3  Bitcoin / Project Development / Bitgen - tool for addresses, signatures, encryption and transactions on: July 03, 2015, 03:24:32 PM
Bitgen is a command line tool for bitcoin addresses and transactions.

This is the project home page:
http://bitgen.org/

Bitgen can generate bitcoin addresses in different ways and supports generating postscript files with the generated addresses.
Bitgen can also do many other bitcoin related tasks, such as decoding bitcoin transactions and scripts.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!