input-output-hk / scrypto

Cryptographic primitives for Scala

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check or restore keys during sliced tree recovery

kushti opened this issue · comments

Currently keys are stored during manifest and subtrees serialization in BatchAVLProverSerializer. However, they are not protected via collision-resistant hash function for internal nodes. Thus, currently verifier (calling verify() functions in BatchAVLProverManifest and BatchAVLProverSubtree) is blindly trusting the keys, which opens possibilities for adversaries.

So we need to whether avoid storing keys for internal nodes at all, or implement check (for subtrees, and for manifest(assuming bottom keys of subtrees are correct)).