edgecase
Author: StJohn Piano
This page is subject to change at any time. It is not signed by its author or by Edgecase Datafeed.



Introduction


The only way to be certain that bitcoin can be transferred out of an address is to test it. To test an address, move a small amount of bitcoin into and then out of it.

Once an address has been tested, a larger amount of bitcoin can now be moved into this address and the owner can be certain that it can be retrieved. Even if the owner later discovers an error in the code + hardware stack used to create and sign a transaction, he/she knows that eventually this error could be fixed and a valid transaction could be created. The owner would only risk a temporary lack of access to the bitcoin, not its permanent loss.

You will need:
- A Bitcoin address.
- An offline computer.

Currently, Edgecase software supports testing a standard address:
- from a Bitcoin exchange
- from a standard address




Contents


- Introduction
- Contents
- The disadvantage of testing a Bitcoin address
- Testing a new standard address from a standard address
- Testing a new standard address from a Bitcoin exchange
- More information



The disadvantage of testing a Bitcoin address


One notable aspect of the Bitcoin cryptosystem is that an address contains a hash of the public key, not the public key itself. This means that if bitcoin has been transferred to an address, but not spent from it, then an adversary only knows the hash of the public key.

Any transaction that spends bitcoin from this address will include the public key in its scriptSig. This means that as soon as bitcoin has been spent from an address, an adversary knows the public key.

Testing an address necessarily means that some bitcoin will be spent from it, revealing the public key.

Some terms:
- "hidden-key addresses" = "addresses from which no bitcoin has ever been spent"
- "known-key addresses" = "addresses from which bitcoin has been spent at least once"

If a weakness in the ECDSA cryptosystem were discovered in the future, then bitcoin stored in hidden-key addresses would still be secure, but bitcoin stored in known-key addresses might be insecure.

So: Testing an address means that you can be sure that you can retrieve bitcoin from it, but sacrifices some protection against the potential future discovery of a weakness in the ECDSA cryptosystem.

This trade-off is worth considering only for long-term storage addresses, not for addresses that are frequently used.

For a more detailed examination of this issue, please see the "Does the hash in a Bitcoin address provide any protection?" part of the Thoughts section of the article Using a transaction to validate a Bitcoin address.




Testing a new standard address from a standard address


Let the existing address be address_1. This address must already hold some bitcoin.

Let the new standard address be address_2. This is the address that is being tested.

Create a standard transaction that transfers a small amount of bitcoin from address_1 to address_2. Read the following page to learn how to do this:
How to create and sign a Bitcoin transaction
Broadcast the transaction and wait for it to be mined and receive 6 confirmations. Refer to the linked page to learn how to do this.

Create a standard transaction that transfers the available bitcoin back from address_2 to address_1.
Read the following page to learn how to do this:
How to create and sign a Bitcoin transaction
Broadcast the transaction and wait for it to be mined and receive 6 confirmations. Refer to the linked page to learn how to do this.

Address_2 has now been tested. You can now transfer more bitcoin to this address and be certain that you will be able to retrieve it in the future.




Testing a new standard address from a Bitcoin exchange


Bitcoin exchanges will give you a receiving address at which you can receive a payment to your exchange account.

Some Bitcoin exchanges will give you a P2SH address, which will start with the character '3'. Others may give you a standard P2PKH address, which will start with the character '1'.

Let your current receiving address on the Bitcoin exchange be address_1.

Let the new standard address be address_2. This is the address that is being tested.

When you transfer bitcoin out of an exchange into one of your addresses, the exchange will create a transaction that spends from their address(es) and will include your transfer.

Use the exchange's interface to transfer a small amount of bitcoin to address_new. Wait for the exchange's transaction to be mined and receive 6 confirmations. Please see the following page:
Other services
to see if a Bitcoin transaction confirmation tracking service is listed.

If your receiving address is P2SH, then create a nonstandard transaction that transfers the available bitcoin back from address_2 to address_1.
Read the following page to learn how to do this:
How to create and sign a Bitcoin transaction
Broadcast the transaction and wait for it to be mined and receive 6 confirmations. Refer to the linked page to learn how to do this.

Address_2 has now been tested. You can now transfer more bitcoin to this address and be certain that you will be able to retrieve it in the future.




More information


For more information about testing an address:
- Browse to the article Using a transaction to validate a Bitcoin address. Go to the Thoughts section. Read the part "Validating a Bitcoin address".

Projects that involved the testing of a standard address from a Bitcoin exchange:
- Browse to the article Using a transaction to validate a Bitcoin address. Read the Goal and Brief Summary sections, then decide whether to read further.