Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid duplication of coefficients of sonic's CS #102

Open
osuketh opened this issue Apr 19, 2019 · 0 comments
Open

Avoid duplication of coefficients of sonic's CS #102

osuketh opened this issue Apr 19, 2019 · 0 comments

Comments

@osuketh
Copy link
Member

osuketh commented Apr 19, 2019

Avoid duplication of code. coefficients vector coeffs can be reused to polynomial commitment.

blindings.iter().rev() // ascending order variables
.chain_ext(wires.c.iter().rev())
.chain_ext(wires.b.iter().rev())
.chain_ext(Some(E::Fr::zero()).iter()) // power i is not equal zero
.chain_ext(wires.a.iter()),

let mut rx1 = wires.b; // X^{-n}...X^{-1}
rx1.extend(wires.c); // X^{-2n}...X^{-n-1}
rx1.extend(blindings.clone()); // X^{-2n-4}...X^{-2n-1}
rx1.reverse();
rx1.push(E::Fr::zero());
rx1.extend(wires.a); // X^{1}...X^{n}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant