Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove ICAP "basic" format #57

Closed
axic opened this issue Jan 19, 2016 · 3 comments
Closed

Remove ICAP "basic" format #57

axic opened this issue Jan 19, 2016 · 3 comments

Comments

@axic
Copy link
Member

axic commented Jan 19, 2016

The ICAP spec proposes two formats for encoding an address:

  • the direct format, which cannot encode the full 160 bits of the address, but is IBAN compatible;
  • and the basic, which can, but is not IBAN compatible

The non-IBAN compatible format can cause issues down the line. First, many IBAN validators do check for the length. Those addresses would be dismissed as invalid.

Some validators don't check for the length, but are exposed to problems in the checksum algorithm, which was designed with that length in mind.

These two IBANs XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS and XE73038O073KYGTWWZN0F2WZ0R8PX5ZPPZS, although different with the same checksum, will be valid according to the checksum. (Note, the leading zero in base-36 here will result in the same decoded value.)

Since we have the direct format, that means we believe 155bits of the hash is safe to use, I do not see the benefit of offering the basic format too and propose to remove it.

There might be something I'm missing here, please let me know

Note: an Ethereum address is just the least significant 160 bits of the 256 bit Keccak hash of the public key. The direct format means using the least significant ~155 bits of the Keccak hash.

Question: This part of the ICAP specification is not entirely clear:
a) does it require the Keccak hashing to result in a leading zero or
b) is it happy truncating the hash?

I assume it meant a), but this proposal assumes b).

@axic axic changed the title ICAP "basic" format Remove ICAP "basic" format Jan 19, 2016
@gavofyork
Copy link

it meant (a). (b) would be a substantial alteration in the core ethereum protocol.

@axic
Copy link
Member Author

axic commented Mar 9, 2016

I was afraid it would mean a).

@axic
Copy link
Member Author

axic commented Sep 4, 2018

Since there is no ERC/EIP for the ICAP format and it hasn't been widely adopted, I consider this issue not very useful anymore. Closing it.

@axic axic closed this as completed Sep 4, 2018
RaphaelHardFork pushed a commit to RaphaelHardFork/EIPs that referenced this issue Jan 30, 2024
bumblefudge added a commit to bumblefudge/EIPs that referenced this issue Feb 16, 2024
feat: Added XRPL namespace along with CAIP-2 and CAIP-10 standard.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants