HorizenOfficial / zend_oo

This repository is archived, Zendoo is out of beta and has been included in https://github.com/HorizenOfficial/zen.
https://github.com/HorizenOfficial/zen
Other
34 stars 22 forks source link

Verify correctness of SC VK and Proof #24

Closed DanieleDiBenedetto closed 3 years ago

DanieleDiBenedetto commented 4 years ago

Imported from https://github.com/ZencashOfficial/zen/issues/292

alsala commented 3 years ago

The check performed by:

bool IsValidScProof(const ScProof& scProof)

Should be enhanced including also a check on the proof size, for example:

if (scProof.empty() || scProof.size() != zendoo_get_field_size_in_bytes())
    return false;

If scProof vector is empty, failing to check this may lead to a crash in the proof verification

ptagl commented 3 years ago

The checks over the proof object have been improved after the refactoring work started with commit e43ff6cb364dcfefd7a81d955ba51a0801d00dee.