Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update 0057-checksummed-addresses.md #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions text/0057-checksummed-addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ The scheme encodes a checksum in the letter capitalization of hex-encodings.
It extends [EIP-55][1] to work with arbitrary length arrays.

The encoding uses the hash of the input to determine capitalization.
The procedure converts the hash into an infinite stream of bits. The
procedure also breaks the input into 4-bit chunks called *nibbles*. A
nibble corresponds to a hexadecimal digit. The algorithm walks through
each nibble. For each nibble, there are two cases:
The procedure converts the hash into an infinite stream of bits. The
stream of bits works by reading the least significant bit (LSB) of the
byte array of the hash of the input stored in little endian format
and by right shifting the stream after the read. The procedure continues
by breaking the input into 4-bit chunks called *nibbles*. A nibble corresponds
to a hexadecimal digit. The algorithm walks through each nibble. For each
nibble, there are two cases:

1. If the nibble corresponds to a digit 1-10, the algorithm writes
that digit and continues.
Expand Down Expand Up @@ -177,4 +180,4 @@ As discussed, this work generalizes [EIP-55][1].

The encoding works best for APIs that use JSON with certain fields
hex-encoded. However, an API might encode a lot of data as hex. In
that a case it will not protect from user error.
that a case it will not protect from user error.