cipherstash / ore.rs Goto Github PK
View Code? Open in Web Editor NEWOrder-revealing encryption library used by the CipherStash searchable encryption platform.
Home Page: https://cipherstash.com
License: Other
Order-revealing encryption library used by the CipherStash searchable encryption platform.
Home Page: https://cipherstash.com
License: Other
like I need to send the ciphertext to somewhere else, hopefully via http, so I wish the ciphertext to be json serializable and de serializable.
is there any way to do this?
what are the best practices when I need to compare a value with a vector of value or compare between two vectors with the same length?
When running with this additional quickcheck:
diff --git a/src/scheme/bit2.rs b/src/scheme/bit2.rs
index db83900..4e6380e 100644
--- a/src/scheme/bit2.rs
+++ b/src/scheme/bit2.rs
@@ -327,6 +327,20 @@ mod tests {
}
}
+ fn compare_u64_single_left(x: u64, y: u64) -> bool {
+ let ore = init_ore();
+ let a = x.encrypt(&ore).unwrap();
+ let mut b = y.encrypt(&ore).unwrap();
+
+ b.left = Left::<ORE, 8>{ f: [Default::default(); 8], xt: [0; 8] };
+
+ match a.cmp(&b) {
+ Ordering::Greater => x > y,
+ Ordering::Less => x <= y,
+ Ordering::Equal => panic!("Can't happen"),
+ }
+ }
+
fn compare_u64_raw_slices(x: u64, y: u64) -> bool {
let ore = init_ore();
let a = x.encrypt(&ore).unwrap().to_bytes();
around one in four test suite runs fail on this test.
I'm so glad you guys are working on this! Looks great! I'm struggling with a question regarding the lexicographical ordering of encrypted values to which you might have an answer.
Suppose you are adding values in a structure that automatically orders them in a lexicographical fashion. Think of b-tree indexed structure or something.
ADD "b"
ADD "a"
ADD "d"
ADD "c"
Iterating through such list would return an ordered array like this:
["a", "b", "c", "d"]
Now, let's repeat these steps but this time ADD
ORE encrypted values. This new list won't be ordered anymore. We can sort it by scrolling through the list and compare
each entry. Obviously, this solution won't work for long lists or database indexes where you'd like to just stream data without any processing.
I wonder is there a way to generate ORE encoded values in a way that their byte-representations would still form an ordered list? I believe that just computing a "comparing" of left
and right
part of the ORE encrypted value won't do the trick. Also, I think that the left
part should not even be stored in the database, right?
I'd appreciate any suggestion on this. Thank you.
It would be handy to know what the required properties of the seed
parameter to ORECipher.new()
are, in order to safely use it. Does it need to be random, is it considered a secret, does it need to be protected against reuse -- either with the same key(s) or across different key(s)?
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.