How many characters you need to mistype at minimum to get another valid address?

2

1

Is it known the minimum amount of characters you need to mistype to get another valid address?

Addresses contain checksums, and also must follow some specific rules, so I guess this could be calculated: I wonder if someone did.

o0'.

Posted 2014-02-28T08:51:48.653

Reputation: 5 180

Answers

5

Check sum is a result of 2 hash-functions: SHA256 and RIPEMD160. The length of checksum is 4 bytes. Hash functions are indistinguishable from random oracle, so it is possible, if you make 1 mistake in non-checksum character, you get the same checksum. But probability of this is 1/2^32.

Added later: not exactly correct due to base58 encoding. Correction in the another answer.

Zergatul

Posted 2014-02-28T08:51:48.653

Reputation: 948

1To add to this: whether you make 1 mistake or 20, the probability that the address is valid is still 1/2^32.Tim S. 2014-02-28T12:54:28.773

1I'm afraid this is the wrong answer. The solution is NOT to find two addresses with the same checksum, but with the same sequence of base58-encoded characters for the large integer represented by the hash concatenated with checksum. See my answer for examples.uminatsu 2014-02-28T20:26:44.723

1I agree that you are right. Base58 encoding deforms last check sum bytes. But my calculation of probability is correct anyway.Zergatul 2014-03-01T21:06:14.697

3

Here's an example of a pair of valid addresses that differ by only one character.

1xxxxxxxxxxxxxxxxxxxy1wqmDWjatp7t
1xxxxxxxxxxxxxxxxxxxy1wqmDWgatp7t

another example pair

1xxxxxxxxxxxxxxxxxxxxyE4zW1N3nMx2
1xxxxxxxxxxxxxxxxxxxxyE4zW1U3nMx2

For both pairs, the 32-bit checksums are NOT the same, but they satisfy the condition that

(checksum1 % 656356768) == ((checksum2 + 356826688) % 656356768)

uminatsu

Posted 2014-02-28T08:51:48.653

Reputation: 1 061