-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Georg Bramm
committed
Mar 21, 2022
1 parent
a26275e
commit 36b21e2
Showing
24 changed files
with
928 additions
and
1,372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rabe" | ||
version = "0.2.7" | ||
version = "0.3.0" | ||
description = "ABE Schemes implemented in rust." | ||
authors = [ | ||
"Schanzenbach, Martin <[email protected]>", | ||
|
@@ -14,21 +14,26 @@ homepage = "https://github.com/Fraunhofer-AISEC/rabe" | |
repository = "https://github.com/Fraunhofer-AISEC/rabe" | ||
documentation = "https://docs.rs/rabe" | ||
|
||
[features] | ||
default = ["serde"] | ||
borsh = ["borsh/std", "rabe-bn/borsh"] | ||
serde = ["serde/std", "rabe-bn/serde"] | ||
|
||
[lib] | ||
name="rabe" | ||
crate-type=["rlib", "cdylib"] | ||
path = "src/lib.rs" | ||
|
||
[dependencies] | ||
aes = "0.7.0" | ||
borsh = { version = "0.9.3", optional = true, default-features = false } | ||
eax = "0.4.1" | ||
pest = "2.0" | ||
pest_derive = "2.0" | ||
permutation = "0.4.0" | ||
rabe-bn = "0.4.18" | ||
rabe-bn = { version = "0.4.20", optional = true, default-features = false } | ||
rand = "0.8.5" | ||
serde = "1.0.136" | ||
serde_derive = "1.0.136" | ||
serde = { version = "1.0", features = ["derive"], optional = true } | ||
sha3 = "0.9.1" | ||
|
||
[workspace] | ||
|
@@ -38,7 +43,7 @@ members = [ | |
] | ||
|
||
[dev-dependencies] | ||
criterion = { version = "0.3", feaures = ["html_reports"]} | ||
criterion = { version = "0.3", features = ["html_reports"]} | ||
rand = "0.8.5" | ||
|
||
[[bench]] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,10 @@ | |
|
||
# Rabe | ||
|
||
rabe is a rust library implementing several Attribute Based Encryption (ABE) schemes using a modified version of the `bn` library of zcash (type-3 pairing / Baretto Naering curve). The modification of `bn` brings in `serde` instead of the deprecated `rustc_serialize`. | ||
rabe is a rust library implementing several Attribute Based Encryption (ABE) schemes using a modified version of the `bn` library of zcash (type-3 pairing / Baretto Naering curve). The modification of `bn` brings in `serde` or `borsh` instead of the deprecated `rustc_serialize`. | ||
The standard serialization library is `serde`. If you want to use `borsh`, you need to specify it as feature. | ||
|
||
This is a rust crate and comes with C bindings. For integration in distributed applications contact [us](mailto:[email protected]). | ||
For integration in distributed applications contact [us](mailto:[email protected]). | ||
|
||
# Implemented Ciphertext Policy Schemes (CP-ABE) | ||
|
||
|
@@ -53,17 +54,10 @@ In order to compile and test: | |
- install rust nightly | ||
- git clone library | ||
- install build-essential | ||
- and then run `cargo build --release && RUST_BACKTRACE=1 cargo test -- --nocapture` | ||
- and then run `cargo build --release && RUST_BACKTRACE=1 cargo test -- --nocapture` | ||
- rabe is also available with borsh serialization. just add `--features borsh` to build command | ||
|
||
# Building rabe console app | ||
|
||
In order to compile and test: | ||
- install rust nightly | ||
- git clone library | ||
- install build-essential | ||
- and then run `cargo run -p rabe-console` | ||
See [README.md](./rabe-console/README.md) | ||
|
||
For example, in order to create msk and pk of an AC17 KP-ABE scheme run: | ||
```bash | ||
$ cargo run -p rabe-console -- --scheme AC17KP setup | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rabe-console" | ||
version = "0.2.7" | ||
version = "0.3.0" | ||
description = "Console App for the ABE Schemes implemented in rabe." | ||
authors = [ | ||
"Schanzenbach, Martin <[email protected]>", | ||
|
@@ -14,20 +14,25 @@ homepage = "https://github.com/Fraunhofer-AISEC/rabe" | |
repository = "https://github.com/Fraunhofer-AISEC/rabe" | ||
documentation = "https://docs.rs/rabe" | ||
|
||
[features] | ||
default = ["serde"] | ||
std = [] | ||
borsh = ["borsh/std", "rabe/borsh"] | ||
serde = ["serde/std", "serde_cbor/std", "rabe/serde"] | ||
|
||
[[bin]] | ||
name = "rabe" | ||
path = "src/mod.rs" | ||
|
||
[dependencies] | ||
base64 = "0.10.1" | ||
borsh = { version = "0.9.3", optional = true, default-features = false } | ||
rustc-hex = "2.1.0" | ||
deflate = "0.9.0" | ||
inflate = "0.4.5" | ||
clap = "2.33.3" | ||
rand = "0.8.5" | ||
serde = "1.0.136" | ||
serde_derive = "1.0.136" | ||
serde_json = "1.0.79" | ||
serde_cbor = "0.11.2" | ||
serde = { version = "1.0", features = ["derive"], optional = true } | ||
serde_cbor = { version = "0.11.2", optional = true, default-features = false } | ||
pest = "2.0" | ||
pest_derive = "2.0" | ||
rabe = { path = "../" } | ||
rabe = { path = "..", optional = true, default-features = false } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Rabe console app | ||
|
||
This is an example console app, to test the implemented schemes | ||
|
||
For integration in distributed applications contact [us](mailto:[email protected]). | ||
|
||
|
||
# Building | ||
|
||
In order to compile and test: | ||
- install rust nightly | ||
- git clone library | ||
- install build-essential | ||
- Do one of the following | ||
- run `cargo run -p rabe-console` from parent directory | ||
- run `cargo run` from this directory | ||
- compile using `cargo build --release` and afterwards run executable `./target/release/rabe` | ||
|
||
## Example calls using executable | ||
- Setup a AC17 KP-ABE scheme | ||
* ```bash | ||
$ rabe --s AC17CP setup | ||
``` | ||
* This generates msk.key and pk.key | ||
- Generate a new key with attributes "A" and "B" | ||
* ```bash | ||
$ rabe --s AC17CP keygen --a 'A B' | ||
``` |
Oops, something went wrong.