Giter Site home page Giter Site logo

openfheorg / openfhe-integer-examples Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 1.97 MB

Integer examples for OpenFHE library. Based off of https://gitlab.com/palisade/palisade-integer-examples

License: Other

CMake 6.17% Makefile 0.36% C++ 93.48%

openfhe-integer-examples's People

Contributors

davidbrucecousins avatar dsuponitskiy avatar dsuponitskiy-duality avatar iquah1 avatar jsaylor-dualitytech avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

openfhe-integer-examples's Issues

mismatch in the total occurences between the cleartext and encrypted versions

I'm getting a mismatch in the total occurences between the cleartext and encrypted versions.
I'm using openFHE v1.0.1 on Windows 10 with MINGW64.

Output for strsearch_enc_1.cpp:

Read 1666846 characters
Limiting search to 32 characters starting at offset 16
p 786433
Pattern found at index 13
total occurances 1
Plaintext execution time 1 mSec.
setting up BFV RNS crypto system
Step 2 - Key Generation
Step 3 - Encryption
Step 3.1 - Encrypt pattern
0
1
2
3
ringsize = 65536
txt size = 32
can store 1 batches in the ct
Step 3.2 - Encrypt text
0
.
.
.
31
Step 4 - Encrypted string search
0
.
.
.
28
Encrypted execution time 56250 mSec.
total occurances 0

Process finished with exit code 0

Output for strsearch_enc_2.cpp:

Read 1666846 characters
batching to 32 characters max
p 786433
total occurences 825
Plaintext execution time 24 mSec.
setting up BFV RNS crypto system
Step 2 - Key Generation
Step 3 - Encryption
Step 3.1 - Encrypt text
Given ringsize = 65536
and text size = 1666846
We can store approximately 26 batches in the CT
Adjusting number of batches to account for pattern overlap
increasing batch size to 27
increasing batch size to 28
increasing batch size to 29
0
.
.
.
28
encrypted 29 batches
Step 3.2 - Encrypt pattern
0
1
2
3
Step 4 - Encrypted string search
0
.
.
.
25
Encrypted execution time 45754 mSec.
total occurences 26
encrypted and plaintext results do not match
mismatch at location 0
.
.
.
mismatch at location 25
plaintext extra finds 26 138179
.
.
.
plaintext extra finds 824 1651053

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.