Comments (4)
Let's go one by one. In general, information to use Rabe can be found here.
There are many different schemes offered by Rabe: BSW07, KP-ABE FAME, FAME, LW11, YCT14, etc. If you have installed rabe correctly, whenever you use it in a rust script you may have a cargo.toml
looking like this:
[package]
name = "NAME"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rabe = "0.3.1"
[dev-dependencies]
criterion = "0.3"
[[bench]]
name = "SCRIPT_NAME"
harness = false
And below you have an example on how to use BSW, extracted from the documentation
use rabe::schemes::bsw::*;
use rabe::utils::policy::pest::PolicyLanguage;
let (pk, msk) = setup();
let plaintext = String::from("dance like no one's watching, encrypt like everyone is!").into_bytes();
let policy = String::from(r#""A" and "B""#);
let ct_cp: CpAbeCiphertext = encrypt(&pk, &policy, &plaintext, PolicyLanguage::HumanPolicy).unwrap();
let sk: CpAbeSecretKey = keygen(&pk, &msk, &vec!["A".to_string(), "B".to_string()]).unwrap();
assert_eq!(decrypt(&sk, &ct_cp).unwrap(), plaintext);
Regarding its use with python, I'm sorry but I do not know how to create a Python wrapper. However, you may find useful the Python ABE library, Charm.
from rabe.
I had implemented the CFFI and a C# wrapper library for all algorithms in rabe. If you need it to create a wrapper in Python or other languages, please check my repositories (Rabe-ffi).
from rabe.
Thanks!
I finally used https://github.com/MrT3acher/mosaic.
from rabe.
I'm using Maturin to call RABE from Python successfully.
from rabe.
Related Issues (14)
- Release it on crates.io HOT 2
- CLI utilities do not work HOT 1
- Library fails to process policies with more than 60 attributes. HOT 8
- cffi HOT 1
- in order to create example, how to calculate time based on number of Attributes? HOT 1
- YCT14 KP-ABE scheme is broken HOT 1
- About the AES dependency HOT 2
- Change some function signature HOT 2
- Error in encrypt files HOT 11
- HumanPolicy failed HOT 2
- Duplicate attributes not supported in BSW scheme HOT 2
- Getting "The following required arguments were not provided" when compiling rabe-console HOT 4
- code is inactive due to #[cfg] directives: feature = "borsh" is disabled HOT 1
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.
from rabe.