go-algorand-sdk icon indicating copy to clipboard operation
go-algorand-sdk copied to clipboard

Add canonical check

Open mxmauro opened this issue 2 years ago • 0 comments

Hi, DecodeAddress returns the same account for the following addresses:

PRICEP3G2F5L6ZG5WTJIAKEQW4OJJ3FM4XVFQDZI7M2VBTFVUHTTR2AU2U (this one is the correct) PRICEP3G2F5L6ZG5WTJIAKEQW4OJJ3FM4XVFQDZI7M2VBTFVUHTTR2AU2V PRICEP3G2F5L6ZG5WTJIAKEQW4OJJ3FM4XVFQDZI7M2VBTFVUHTTR2AU2W PRICEP3G2F5L6ZG5WTJIAKEQW4OJJ3FM4XVFQDZI7M2VBTFVUHTTR2AU2X

This issue was addressed in node's code but wondering if checking the least significant bits of the 3rd byte of the checksum to be 01 is enough as a faster approach.

Regards, Mauro.

mxmauro avatar Dec 23 '21 17:12 mxmauro