Skip to content

Commit

Permalink
chore: add LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
enricobottazzi committed Feb 14, 2024
1 parent 2fcd453 commit cef2d63
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Gaussian

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ As a result:
- A file `./src/data/sk_enc_{n}_{qis_len}x{qis_bitsize}_{t}_zeroes.json` is generated. In this file all the coefficients of the input polynomials are set to zero. This input is used at key generation time, when the actual inputs are not known.
- A file `./src/constants/sk_enc_constants_{n}_{qis_len}x{qis_bitsize}_{t}.rs` is generated including the generic constants for the circuit. Note that we separate them from the input because these should be known at compile time.

On top of that, the console will print an estimatation of the number of advice cells needed to compile the circuit in halo2 considering a single advice column and a lookup table of size 2^8.
On top of that, the console will print an estimatation of the number of advice cells needed to compile the circuit in halo2 considering a single advice column and a lookup table of size 2^8. Spoiler: around 90% of the constraints are generated by the range checks on the polynomial coefficients.

### Circuit

Expand Down
2 changes: 1 addition & 1 deletion src/data/sk_enc_1024_15x60_65537.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/sk_encryption_circuit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::constants::sk_enc_constants_2048_15x60_65537::{
use crate::constants::sk_enc_constants_1024_15x60_65537::{
E_BOUND, K0IS, K1_BOUND, N, QIS, R1_BOUNDS, R2_BOUNDS, S_BOUND,
};
use crate::poly::{Poly, PolyAssigned};
Expand Down Expand Up @@ -578,7 +578,7 @@ mod test {
#[test]
#[cfg(feature = "bench")]
pub fn bench_sk_enc_full_prover() {
let file_path = "src/data/sk_enc_2048_15x60_65537";
let file_path = "src/data/sk_enc_1024_15x60_65537";

pub struct Config {
kzg_params: ParamsKZG<Bn256>,
Expand Down

0 comments on commit cef2d63

Please sign in to comment.