GithubHelp home page GithubHelp logo

Comments (4)

PekeDevil avatar PekeDevil commented on June 19, 2024 1

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.

Aya0wind avatar Aya0wind commented on June 19, 2024

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.

MrT3acher avatar MrT3acher commented on June 19, 2024

Thanks!
I finally used https://github.com/MrT3acher/mosaic.

from rabe.

wkwi2r avatar wkwi2r commented on June 19, 2024

I'm using Maturin to call RABE from Python successfully.

from rabe.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.