Crates.io | ope-simplified |
lib.rs | ope-simplified |
version | 0.1.0 |
source | src |
created_at | 2023-10-13 04:52:27.714158 |
updated_at | 2023-10-13 04:52:27.714158 |
description | OPE (order preserving encryption) algorithms for liserk zero knowledge database |
homepage | |
repository | https://github.com/SwannHERRERA/liserk-encrypt |
max_upload_size | |
id | 1001987 |
size | 19,880 |
This project is a Rust implementation of Order-Preserving Encryption (OPE). OPE is a cryptographic technique for encrypting ordered data in such a way that the order is preserved under encryption. This enables range queries and other order-based operations to be performed on the encrypted data without requiring decryption first.
cargo add ope-simplified
Include this crate in your Rust project by adding the following in your Cargo.toml
:
[dependencies]
ope-simplified: "0.1.0"
Then you can use the OPE library in your code like this:
use ope_simplified::*;
fn main() {
let key = b"test_key";
let ope = Ope::new(key, 0, 20).unwrap();
let plaintext = 5;
let ciphertext = ope.encrypt(plaintext).unwrap();
assert!(ope.out_range.contains(ciphertext));
let decrypted = ope.decrypt(ciphertext).unwrap();
assert_eq!(plaintext, decrypted);
}
This project owes its existence to the groundbreaking research in the field of Order-Preserving Encryption (OPE). Notably, we would like to mention the seminal paper "Order-Preserving Symmetric Encryption" by Boldyreva, Chenette, Lee, and O’Neill, which laid the foundation for practical OPE schemes. This paper, published in 2009, thoroughly examined the security properties and use cases for OPE and has since been a cornerstone for subsequent developments in this field. Another critical work is "Practical Order-Revealing Encryption with Limited Leakage" by Chenette, Lewi, Weis, and Wu, which offers a different approach to OPE that minimizes leakage. Their contributions have been invaluable to the cryptographic community and have directly inspired the algorithms and methodologies implemented in this project. We would also like to acknowledge various other papers and research articles that have collectively contributed to the advancement of OPE techniques. Through their rigorous research, they have made it possible to handle ordered data securely and efficiently.
Contributions to this project are welcome. If you find a bug or think of a new feature, please create an issue. If you would like to contribute code, please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is developed and maintained by contributors who are passionate about security and cryptography. Special thanks to everyone who has contributed to making this project possible.
This project is based on mathematical https://eprint.iacr.org/2012/624.pdf