Professional Documents
Culture Documents
Using Bitsig
Using Bitsig
================================
Bitsig is a command line tool that can be used for signing and
signature verification of bitcoin signatures.
Bitsig can be used in two ways: with or without a local key chain.
If no key chain is used, the nessesary information such as private
and public keys have to be given on the command line.
But if a key chain database is used, keys does not have to be entered
at the command line if they are already present in the key chain.
Quick start
===========
Commands in bitsig
==================
* hex
* dice
* random
* hash
* list
* listown
* listprivate
* listpublic
* import
* importprivate
* setdef
* delete
* sign
* verify
list
====
The "list" command lists all the stored keys in the keychain,
both private and public. For private keys the corresponding public
address is shown, not the private information.
$ bitsig list
listOwn
=======
The "listOwn" command lists all keys that you have the private
key for, ie your own keys. The actual private keys are not displayed
bydefault. Instead the corresponding bitcoin address is shown for
each private key. In order to also see the private key values,
the extra argument "private" should be supplied.
$ bitsig listOwn
or
$ bitsig listOwn private
listPublic
==========
The "listPublic" command lists all keys that you have imported with
only the public part, not the private key.
Example invocation:
$ bitsig listPublic
import
======
The "import" command is used to import a public address which
you trust. The imported public addresses are later accepted when
you verify a signature. Each imported address is given a name.
Since the imported addresses are trusted,
and may give signature verification acceptance, an extra checksum
has to be given on the command line. The purpose of this
checksum is that it should not be possible to accidentally
accept an address.
Example invocation:
$ bitsig import 1BCGStc2DNwrpmdJ9m8iQbhCaiwp4LM1xX Bob
This will try to import the addres for the name "Bob".
However, since no checksum is given, nothing will be imported.
Instead a checksum will be provided by bitsig: "1E201C84".
setDef
======
The "setDef" command sets the default private key for signing.
The private key must already exist in the keychain. This means
that it must either have been created with the key creation commands,
or it have been imported.
To set the key as the default the public address corresponding to the
private key should be given on the command line.
Example invocation:
delete
======
The "delete" command deletes a key from the keychain.
The key can be either a public or a private key.
The key must exist in the keychain.
Example invocation:
The commands "random", "hex", "dice" and "hash" are used to create
new private keys stored in the local keychain.
They behave the same way as in "bitgen", see the bitgen documentation
for a complete description of these commands.
The difference in bitsig is that instead of generating outout files
with the information, the information is stored in the local keychain
in the ".bitsig" folder in the users home directory.
For example, the following command will create a random private key
and store it in the keychain:
$ bitsig random
sign
====
The "sign" command signs a file using a private key.
Example:
This will sign the file "test.txt" with the default private key in
the key chain. The result is a ".bitsig" file, in this case:
"test.txt.bitsig".
This file is the signature of the file given at the command line.
verify
======
The "verify" command verifies a file signature to match a public address.
This means that the following two commands perform the same
signature verification:
The signature file must end with ".bitsig", no other extension are
permitted.
This will verify the signature for "test.txt" uwing the address
"13tY61WiLC2ujRF8RmRuZJSjZqskrp89pm".
signRaw
=======
The "signRaw" command signs a given message text using the
raw bitcoin signature format. The text to be signed should be
given on the command line, for example:
The private key used for the signture is the default private key
in the key chain.
verifyRaw
=========
The "verifyRaw" command verifies a signed message in the
raw bitcoin format. Both the message and the signature have to be
given, for example:
This will search the key chain for the address specified
by the signature, and verify is the signature matches this address.
* Multibit
* Armory
* Armory base64
* Armory clearsign
* Inputs Io
* Multibit
* Armory
* Armory base64
* Armory clearsign
* Inputs Io
verifyMessage
=============
The "verifyMessage" is a generic verification command that
takes any of the above wallet specific format, and determines
which format has been used. The signature is then verified
for this format.
Note that full file messages and raw messages can not be verified
in this manner. For them, the correct format has to be specified.
Example invocation:
This will first identify the format, and then perform a message
verification.