openfheorg / openfhe-integer-examples Goto Github PK
View Code? Open in Web Editor NEWInteger examples for OpenFHE library. Based off of https://gitlab.com/palisade/palisade-integer-examples
License: Other
Integer examples for OpenFHE library. Based off of https://gitlab.com/palisade/palisade-integer-examples
License: Other
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.