Bech32 detects as much as 4 errors (within the sense that, for those who make as much as 4 substitution errors, the ensuing string is assured to have an incorrect checksum). However error detection just isn’t the identical as error finding: simply realizing {that a} bech32 is wrong doesn’t imply you possibly can inform the place the errors had been made.
Bech32 additionally permits correcting as much as 2 substitution errors. That’s, if you understand not more than 2 substitution errors had been made, you possibly can for any given string compute what the unique, legitimate, string was. The javascript code on the web site you hyperlink to has code to do that, however for security causes, it deliberately doesn’t reveal what errors it discovered, solely the place.
The reason being that correcting is harmful. If the person made greater than 2 substitution errors, the error correction algorithm might properly nonetheless discover two errors to “appropriate”, within the sense that it will assemble a legitimate handle, however it would not be the person’s handle. An inattentive person might properly simply make the corrections steered by the algorithm, and ship funds into the void. As an alternative, the correction algorithm remains to be used underneath the hood, however solely the situation of its errors is revealed, forcing the person to nonetheless go test whether or not main supply they acquired the handle by way of, however maybe with further concentrate on the actual areas the algorithm believes are the seemingly positions errors had been made.
Bech32 detects as much as 4 errors (within the sense that, for those who make as much as 4 substitution errors, the ensuing string is assured to have an incorrect checksum). However error detection just isn’t the identical as error finding: simply realizing {that a} bech32 is wrong doesn’t imply you possibly can inform the place the errors had been made.
Bech32 additionally permits correcting as much as 2 substitution errors. That’s, if you understand not more than 2 substitution errors had been made, you possibly can for any given string compute what the unique, legitimate, string was. The javascript code on the web site you hyperlink to has code to do that, however for security causes, it deliberately doesn’t reveal what errors it discovered, solely the place.
The reason being that correcting is harmful. If the person made greater than 2 substitution errors, the error correction algorithm might properly nonetheless discover two errors to “appropriate”, within the sense that it will assemble a legitimate handle, however it would not be the person’s handle. An inattentive person might properly simply make the corrections steered by the algorithm, and ship funds into the void. As an alternative, the correction algorithm remains to be used underneath the hood, however solely the situation of its errors is revealed, forcing the person to nonetheless go test whether or not main supply they acquired the handle by way of, however maybe with further concentrate on the actual areas the algorithm believes are the seemingly positions errors had been made.