wppccproj's People
wppccproj's Issues
Good Habits to Write Test.
- write code in blocks:
- 3 main blocks: one block for parameter setting, one for the steps of operations, one for results printing(time spent & overhead).
- Nested block: In the block for steps of operations, there can be also several blocks for each step.
- Empty line: code block should be separated by one empty line, and inside the block, empty line might be avoided.
- write core testing code:
- For each step, there should be at least one comment or printed line implying and explaining the action being taken.
- The general format of printed line:
Somebody: <Did something[...][, extensive explanation]>
, for example:Server: Generated parameters, parameters are all good.
- record test results:
- record the time spent & overhead for each main step.
- print the results for each main step and the total result, with explicit explanation.
Add batch mpc query methods.
server
-
void set_rand_vec(vector<uint64_t> &rand_vec)
.
client
-
PirBatchQuery vector<PirQuery>
; -
PirBatchReply vector<PirReply>
; -
vector<vector<uint8_t>> batch_deconfuse_and_decode_replies(vector<PirBatchReply> &batch_reply_vec, uint32_t party_num, vector<Index> &elem_index_with_ptr)
; - (to modified)
vector<uint8_t> deconfuse_and_decode_replies(PirBatchReply &batch_reply, uint64_t offset)
.
`PirReply generate_reply_with_confusion(PirQuery &query, std::uint32_t client_id)`: a copy of `generate_reply` utilizing the above variables and functions.
Specification for new functions and member variables to add (version1).
Batch
PIRQuery, PIRReply -> single indice query, reply.
-
std::vector<PIRQuery> BatchPIRQuery
: a vector of PIR queries. -
std::vector<PIRReply> BatchPIRReply
: a vector of PIR replies. -
gen_batch_query
inpir_client.cpp/hpp
. -
gen_batch_reply
inpir_server.cpp/hpp
.
Additive SS
In pir_server.cpp/hpp
:
-
std::vector<std::uint64_t> add_rand_vec1
: store random numbers to be sent to one server. -
std::vector<std::uint64_t> add_rand_vec2
: store random numbers to be sent to the other server. -
void gen_add_rand(std::uint64_t dest_rand1, std::uint64_t dest_rand2)
: generate two random number and assign them todest_rand1,2
. -
void refresh_and_set_add_rand_vec(std::vector<std::vector<seal::Ciphertext>> &query)
: refresh and set theadd_rand_vec1,2
according to the batch query length (callgen_add_rand
inside a loop). - #3
In pir_client.cpp/hpp
-
add_deconfuse_and_decrypt(seal::Ciphertext ct_s1, seal::Ciphertext ct_s2, seal::Ciphertext ct_s3)
: sum up the corresponding reply ciphertexts and decrypt.
Multipulicative SS
(with some problems) To be added.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.