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

Update to main #11

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/cargo_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Cargo Build

on:
pull_request:

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "full"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
cargo-builds:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Install and run newline linter checks
if: matrix.os == 'ubuntu-latest'
run: |
wget https://github.com/fernandrone/linelint/releases/download/0.0.6/linelint-linux-amd64
echo "16b70fb7b471d6f95cbdc0b4e5dc2b0ac9e84ba9ecdc488f7bdf13df823aca4b linelint-linux-amd64" > checksum
sha256sum -c checksum || exit 1
chmod +x linelint-linux-amd64
mv linelint-linux-amd64 /usr/local/bin/linelint
linelint .

- name: Check fmt
run: |
cargo fmt --check

- name: Run clippy
run: |
cargo clippy --all-features
104 changes: 90 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ edition = "2021"
[dependencies]
# This is a list of tfhe-rs versions we will generate data for. This list will grow over time.
# They are only activated when generating data, with the binary target and the "generate" feature.
tfhe_0_6 = { version = "0.6", features = ["boolean", "integer", "shortint", "x86_64-unix"], package = "tfhe", optional = true }
tfhe_0_6 = { version = "0.6", features = ["boolean", "integer", "shortint", "x86_64-unix", "experimental-force_fft_algo_dif4"], package = "tfhe", optional = true }
tfhe_0_7 = { version = "0.7", features = ["boolean", "integer", "shortint", "x86_64-unix", "experimental-force_fft_algo_dif4"], package = "tfhe", optional = true }

tfhe-versionable = { version = "0.1", optional = true }

Expand All @@ -28,9 +29,5 @@ required-features = ["generate"]
[features]
default = ["generate"]

generate = ["dep:tfhe_0_6", "dep:tfhe-versionable"]
generate = ["dep:tfhe_0_6", "dep:tfhe_0_7", "dep:tfhe-versionable"]
load = ["dep:semver"]

[patch.crates-io]
tfhe_0_6 = { git = "https://github.com/zama-ai/tfhe-rs.git", branch = "ns/0.6/hl_intid_notversioned", package = "tfhe" }
tfhe-versionable = { git = "https://github.com/zama-ai/tfhe-rs.git", branch = "ns/0.6/hl_intid_notversioned" }
2 changes: 1 addition & 1 deletion data/0_6/high_level_api/server_key.bcode
Git LFS file not shown
2 changes: 1 addition & 1 deletion data/0_6/high_level_api/server_key.cbor
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/0_7/high_level_api/client_key.cbor.bcode
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/0_7/high_level_api/client_key.cbor.cbor
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/0_7/high_level_api/hl_heterogeneous_list.bcode
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/0_7/high_level_api/hl_heterogeneous_list.cbor
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/0_7/high_level_api/hl_packed_heterogeneous_list.bcode
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/0_7/high_level_api/hl_packed_heterogeneous_list.cbor
Git LFS file not shown
2 changes: 1 addition & 1 deletion data/high_level_api.ron
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlClientKey((test_filename:"client_key",parameters:(lwe_dimension:761,glwe_dimension:1,polynomial_size:2048,lwe_noise_gaussian_stddev:0.00000636835566258815,glwe_noise_gaussian_stddev:0.00000000000000031529322391500584,pbs_base_log:23,pbs_level:1,ks_base_log:3,ks_level:5,message_modulus:4,ciphertext_modulus:18446744073709551616,carry_modulus:4,max_noise_level:5,log2_p_fail:-40.05,encryption_key_choice:"big")))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlServerKey((test_filename:"server_key",client_key_filename:"client_key.cbor",compressed:false))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlPublicKey((test_filename:"public_key",client_key_filename:"client_key_for_pubkey.cbor",compressed:false,compact:false))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlPublicKey((test_filename:"compressed_public_key",client_key_filename:"client_key.cbor",compressed:true,compact:false))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlPublicKey((test_filename:"compact_public_key",client_key_filename:"client_key.cbor",compressed:false,compact:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlPublicKey((test_filename:"compressed_compact_public_key",client_key_filename:"client_key.cbor",compressed:true,compact:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlServerKey((test_filename:"compressed_server_key",client_key_filename:"client_key.cbor",compressed:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct1",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:0))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct2",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct_compressed_seeded",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct_compressed_modswitched",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct_compact",key_filename:"client_key.cbor",compressed:false,compact:true,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertextList((test_filename:"ct_list",key_filename:"client_key.cbor",clear_values:[0,255]))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct1_signed",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:0))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct2_signed",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:-127))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct_compressed_seeded_signed",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct_compressed_modswitched_signed",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct_compact_signed",key_filename:"client_key.cbor",compressed:false,compact:true,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertextList((test_filename:"ct_list_signed",key_filename:"client_key.cbor",clear_values:[-127,0,127]))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"bool1",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"bool2",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:false))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"compressed_seeded_bool",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"compressed_modswitched_bool",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"compact_bool",key_filename:"client_key.cbor",compressed:false,compact:true,clear_value:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertextList((test_filename:"bool_list",key_filename:"client_key.cbor",clear_values:[true,false,true])))]
[(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlClientKey((test_filename:"client_key",parameters:(lwe_dimension:761,glwe_dimension:1,polynomial_size:2048,lwe_noise_gaussian_stddev:0.00000636835566258815,glwe_noise_gaussian_stddev:0.00000000000000031529322391500584,pbs_base_log:23,pbs_level:1,ks_base_log:3,ks_level:5,message_modulus:4,ciphertext_modulus:18446744073709551616,carry_modulus:4,max_noise_level:5,log2_p_fail:-40.05,encryption_key_choice:"big")))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlServerKey((test_filename:"server_key",client_key_filename:"client_key.cbor",compressed:false))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlPublicKey((test_filename:"public_key",client_key_filename:"client_key_for_pubkey.cbor",compressed:false,compact:false))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlPublicKey((test_filename:"compressed_public_key",client_key_filename:"client_key.cbor",compressed:true,compact:false))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlPublicKey((test_filename:"compact_public_key",client_key_filename:"client_key.cbor",compressed:false,compact:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlPublicKey((test_filename:"compressed_compact_public_key",client_key_filename:"client_key.cbor",compressed:true,compact:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlServerKey((test_filename:"compressed_server_key",client_key_filename:"client_key.cbor",compressed:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct1",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:0))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct2",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct_compressed_seeded",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct_compressed_modswitched",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertext((test_filename:"ct_compact",key_filename:"client_key.cbor",compressed:false,compact:true,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlCiphertextList((test_filename:"ct_list",key_filename:"client_key.cbor",clear_values:[0,255]))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct1_signed",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:0))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct2_signed",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:-127))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct_compressed_seeded_signed",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct_compressed_modswitched_signed",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertext((test_filename:"ct_compact_signed",key_filename:"client_key.cbor",compressed:false,compact:true,clear_value:255))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlSignedCiphertextList((test_filename:"ct_list_signed",key_filename:"client_key.cbor",clear_values:[-127,0,127]))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"bool1",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"bool2",key_filename:"client_key.cbor",compressed:false,compact:false,clear_value:false))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"compressed_seeded_bool",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"compressed_modswitched_bool",key_filename:"client_key.cbor",compressed:true,compact:false,clear_value:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertext((test_filename:"compact_bool",key_filename:"client_key.cbor",compressed:false,compact:true,clear_value:true))),(tfhe_version_min:"0.6",tfhe_module:"high_level_api",metadata:HlBoolCiphertextList((test_filename:"bool_list",key_filename:"client_key.cbor",clear_values:[true,false,true]))),(tfhe_version_min:"0.7",tfhe_module:"high_level_api",metadata:HlHeterogeneousCiphertextList((test_filename:"hl_packed_heterogeneous_list",key_filename:"client_key.cbor",packed:true,clear_values:[17,18446744073709551604,0,1],data_kinds:[Unsigned,Signed,Bool,Bool]))),(tfhe_version_min:"0.7",tfhe_module:"high_level_api",metadata:HlHeterogeneousCiphertextList((test_filename:"hl_heterogeneous_list",key_filename:"client_key.cbor",packed:false,clear_values:[17,18446744073709551604,0,1],data_kinds:[Unsigned,Signed,Bool,Bool])))]
Loading