tari-project / triptych

BSD 3-Clause "New" or "Revised" License
0 stars 3 forks source link

Padded input sets can yield transcript collisions #83

Closed AaronFeickert closed 2 months ago

AaronFeickert commented 2 months ago

When constructing a padded input set, the last element is repeated to ensure proper sizing that matches the specified parameters. However, only the resulting padded set is used when producing the transcript hash.

This means collisions can occur. For example, the unpadded input set A, B, C, C will result in the same transcript hash as the input set A, B, C padded to length N = 4. This is not canonical.

The correct approach is to either use the unpadded input set in the transcript, or to include the unpadded length along with the padded input set.