aztec-packages
aztec-packages copied to clipboard
Only store the npk hash and not the full npk point
The PublicKeys
struct currently holds npk: Point
, where Point { x, y, is_infinite }
. #7529 discussed dropping is_infinite
for all keys, which can reduce DA costs and gate count due to e.g. hashing the serialized keys struct. In https://github.com/AztecProtocol/aztec-packages/pull/8043, we realized that for npk
specifically we only ever use its hash, and not the actual point, so we could consider only storing and distributing this hash, leading to further savings.
We seem to already be dealing with key hashes already in apps due to the kernel being the one in charge of requesting both a proof of correct derivation and to be shown the hash preimage (with the public key).
We shouldn't do this right away however since the entire key scheme is still being discussed, so npks may fundamentally change in the future, or we may drop key rotation making DA costs not that relevant.