hyperplonk
hyperplonk copied to clipboard
feat(pcs): Add comprehensive security checks to multi_open_internal
Description
Added comprehensive security checks to the multi_open_internal function in the polynomial commitment scheme (PCS) module. These checks prevent potential errors and enhance the security of polynomial operations.
Added Checks:
- Validation for empty input arrays
- Consistency check between polynomials, points, and evals array lengths
- Verification of variable count consistency across all polynomials
- Validation of point dimensions against polynomial variable count
Code Improvements:
- Optimized handling of polynomials array size
- Added descriptive error messages for better debugging
Motivation
Resolves the TODO note regarding security checks in the multi_open_internal function. These checks are critical for preventing API misuse and potential vulnerabilities in cryptographic operations.
Testing
Existing tests should pass as the added checks only strengthen input validation without changing core functionality.