tari-project / tari-crypto

Tari Cryptography library
BSD 3-Clause "New" or "Revised" License
20 stars 25 forks source link

chore: protect public key zeroization against updates #235

Open AaronFeickert opened 2 weeks ago

AaronFeickert commented 2 weeks ago

Ristretto public key zeroizing is done manually due to the use of OnceCell. I recently came across a clever design pattern that uses destructuring. The idea is that future changes to the underlying struct will trigger a compiler error to ensure that the zeroization implementation is also updated.

This PR implements such a change.

It also updates the linter to ignore a new warning against documentation comment lengths that seems unnecessary.