Version 0.6 of the bitgen package has been released:
http://bitcoin-gen.org/This version supports compressed public keys, although it still generates uncompressed by default.
The major new feature in this release is support for signature generation and verification.
This functionality is included in a separate command line application:
bitsig.
Unlike bitgen, the bitsig application is stateful and stores a keychain in a local database.
With this keychain it is possible to sign and verify both messages and files.
Bitsig currently support the Armory, InputsIo and Multibit message signature formats.
It also introduces a new file format for
full file signatures. This makes is possible to use
bitsig instead of PGP for file signatures.
To create a new private key for signature generation, the same methods are possible as in bitgen.
The easiest method to generate a private key is the following
$ bitsig random
This generates a random private key for you and stores it in the keychain.
To sign a message using the multibit format the following command can be used:
$ bitsig signMultibit "My message".
This will give an output similar to the following:
-----BEGIN BITCOIN SIGNED MESSAGE-----
My message
-----BEGIN BITCOIN SIGNATURE-----
Version: Bitcoin-qt (1.0)
Address: 1oqJSLKdZThXreezwtdNjMM2QTG3xwE2h
G6XuhBvnDHKoYabdFdxT5ZwcSJQPCwy8D65EBC+sGdedQvhGrZ2V5R9LWSLfRrYws+zUi7hf6yi9Nkb36/Db92Q=
-----END BITCOIN SIGNATURE-----
To verify the message, use the following command (with the proper file name):
$ bitsig verifyMultibit B98F3492.multibit
This will print the following:
=====================
Verifying signature...
Verify OK for multibit file
Signature address: 1oqJSLKdZThXreezwtdNjMM2QTG3xwE2h
=====================
Importing public addresses is done with "bitsig import" for example:
$ bitsig import 1Bb2NBwDrqUUBHcGsHYTArDqLJ7ECGNe33 Bob
Then a hash checksum has to be specified for security reasons:
$ bitsig import 1Bb2NBwDrqUUBHcGsHYTArDqLJ7ECGNe33 Bob B374DD02
The bitgen package is now signed with my signature public key which is:
1L5TnzknDGZuHde9Uz8mBjZAq6tz8MnN97The signatures are stored in "bitsig" files.
http://bitcoin-gen.org/bitgen_0.6.tar.gz.bitsigIn order to use the PGP-like functionality and verify the integrity of the archive,
the following command can be used:
$ bitsig verify bitgen_0.6.tar.gz bitgen_0.6.tar.gz.bitsig 1L5TnzknDGZuHde9Uz8mBjZAq6tz8MnN97
But even better is to store the address in the keychain for future use:
$ bitsig import 1L5TnzknDGZuHde9Uz8mBjZAq6tz8MnN97 bit22gen
$ bitsig import 1L5TnzknDGZuHde9Uz8mBjZAq6tz8MnN97 bit22gen 5981B032
When the address is stored, the address need not be specified:
$ bitsig verify bitgen_0.6.tar.gz bitgen_0.6.tar.gz.bitsig
This will give:
==============================
The signed file : bitgen_0.6.tar.gz
The signature file : bitgen_0.6.tar.gz.bitsig
Calculated address : 1L5TnzknDGZuHde9Uz8mBjZAq6tz8MnN97
No public address given, looking in keychain
Found the address in the keychain
Verifying signature....
Verify OK for address: 1L5TnzknDGZuHde9Uz8mBjZAq6tz8MnN97
Address alias: bit22gen
==============================