In order for an Ethereum account to be able to have an IBAN-compatible "direct" ICAP address, its raw address must have zeroes in the most-significant 6 bits. In other words it must fit in 154 bits.

The only way I know in which to do that is by brute-force: pick a private key, derive the public key from it, and then the address from that - and repeat until you find one that meets the criterion. There's a 1-in-64 chance each try.

Is that the only way to do it?

2 Answers 2


Yes, that is the only way, iterate until you find a key which fits into 154 bits (address less than 03ffffffffffffffffffffffffffffffffffffff). That means it has to start with 0x00, 0x01, 0x02 or 0x03.

Some of the libraries support that already, otherwise as mentioned above, using a vanity address generator should be able to generate one.

(Vanity addresses are where you define the criteria how the resulting address should look like and usually they do a bruteforce search until such an address is found.)

In Javascript, ethereumjs-wallet and ethereumjs-icap can be used to achieve that. Or as a commandline tool, helpeth:

$ helpeth keyGenerate raw true
Address: 0x0008790cf214419f622db6484f07f73c19b4f546
Address (checksum): 0x0008790cf214419F622dB6484f07F73c19b4F546
ICAP: XE52 50DK T7BM 161X 0KHH RZXW FM60 K243 Q
Public key: 0xb146e3092d4177819f52038d26deb203d95c6e18f6c71812b68eafb0db4496366a093607d8e705bd688dedfa68dec9112e0baff256943c90cd221f04565f15eb
Private key: 0x413d8a0009d47eca4522d815b961d255a7aaad775bdefb1de29686a372aaa7c4

Yes, brute force, or how it is called: vanity addresses. You can use Vanityreum and search for raw hex adresses starting with 00.

 $ python2 Vanityreum.py 00
Time spent :  6 seconds
Approx global search speed :  42.0  per second
Address :  0065845e01aa87635d2d5a3190fa8eee3e8f1954 
PrivKey :  6135fcd5...3582b873

Took me 6 seconds. To convert it into a direct ICAP address, I used ethkey to import it into turboethereum:

 $ ethkey importbare 6135fcd5...3582b873
Enter a passphrase with which to secure account 0065845e…: 
Please confirm the passphrase by entering it again: 
Successfully imported 6135fcd5...3582b873 as b1aef058-9b81-4933-c4ff-25fba80c7faf0
 $ ethkey inspectbare b1aef058-9b81-4933-c4ff-25fba80c7faf
Enter passphrase for key b1aef058-9b81-4933-c4ff-25fba80c7faf: 
Key b1aef058-9b81-4933-c4ff-25fba80c7faf:
  Raw hex: 0065845e01aa87635d2d5a3190fa8eee3e8f1954
  Secret: 6135fcd51c20ce11...

My direct ICAP could be: XE431O16GX6C39Q1NMBIZ9V2OYJXQIFVX0, I just dont know how to calculate the checksum correctly, here: assuming it's 43.

  • The hex address can start with 0x00, 0x01, 0x02 or 0x03 and fit into the required 154 bits - which would reduce your search by a factor of 4.
    – jimkberry
    Commented Mar 7, 2016 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.