[go: up one dir, main page]

DAL/crypto: check shard length

Context

We previously did not check if an input array was of the expected length in the verify_shard function from src/lib_crypto_dal.

The problem is that the following assert [https://gitlab.com/tezos/tezos/-/blob/master/src/lib_crypto_dal/cryptobox.ml#L1499] is called with an array evaluations whose length doesn't equal the one from domain. The domain array is initialized with the length t.shard_length [https://gitlab.com/tezos/tezos/-/blob/master/src/lib_crypto_dal/cryptobox.ml#L1633], but we didn't check that the input evaluations array has the same length t.shard_length, thus the assert line 1499 is triggered.

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Julien Coolen

Merge request reports

Loading