Skip to content

Commit

Permalink
Restructure workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
xevisalle committed Nov 25, 2024
1 parent 9d79b44 commit 5579a71
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 52 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/target/
/setup/
**/target/
Cargo.lock
**/*.rs.bk
.DS_Store
Expand Down
40 changes: 6 additions & 34 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,6 @@
[package]
name = "zk-citadel"
version = "0.14.0"
repository = "https://github.com/dusk-network/citadel"
description = "Implementation of Citadel, a SSI system integrated in Dusk Network."
categories = ["cryptography", "authentication", "mathematics", "science"]
keywords = ["cryptography", "self-sovereign", "identity", "zk-snarks", "zero-knowledge"]
edition = "2021"
license = "MPL-2.0"

[dependencies]
dusk-bytes = "0.1"
dusk-poseidon = { version = "0.40", features = ["zk"] }
poseidon-merkle = { version = "0.7", features = ["rkyv-impl", "zk", "size_32"] }
dusk-plonk = { version = "0.20", default-features = false, features = ["rkyv-impl", "alloc"] }
dusk-bls12_381 = { version = "0.13", default-features = false, features = ["rkyv-impl", "alloc"] }
dusk-jubjub = { version = "0.14", default-features = false, features = ["rkyv-impl", "alloc"] }
ff = { version = "0.13", default-features = false }
jubjub-schnorr = { version = "0.5", features = ["zk", "rkyv-impl", "alloc"] }
phoenix-core = { version = "0.32", features = ["rkyv-impl", "alloc"] }
rand_core = { version = "0.6", default-features=false, features = ["getrandom"] }
rkyv = { version = "0.7", default-features = false }
bytecheck = { version = "0.6", default-features = false }

[dev-dependencies]
criterion = "0.5"

[[bench]]
name = "license_circuit"
harness = false

[features]
rkyv-impl = []
default=["rkyv-impl"]
[workspace]
members = [
"core",
"contract",
]
resolver = "2"
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,12 @@
![Build Status](https://github.com/dusk-network/citadel/workflows/Continuous%20integration/badge.svg)
[![Repository](https://img.shields.io/badge/github-citadel-blueviolet?logo=github)](https://github.com/dusk-network/citadel)

This repository contains the implementation of Citadel, a protocol that integrates a self-sovereign identity system into the Dusk blockchain. A document with all the details about the protocol can be found [here](https://github.com/dusk-network/citadel/tree/main/docs/specs.pdf).
This repository contains the implementation of Citadel, a protocol that integrates a self-sovereign identity system into the Dusk blockchain. Our implementation is based on the original idea from this [paper](https://arxiv.org/pdf/2301.09378).

**DISCLAIMER**: this library **has not gone through an exhaustive security analysis**, so it is not intended to be used in a production environment, only for academic purposes.
This repository is structured as follows:

## Tests
- :computer: [**Core**](core): the core Citadel protocol implementation, containing all the involved data types, the protocol workflows, and the license circuit.
- :pencil: [**License Contract**](contract): The license contract, along with all the required code to test and deploy it.
- :scroll: [**Docs**](docs): A folder where you can find the documentation concerning the our Citadel specific implementation.

The library can be tested by running:

```
cargo t --release
```

## Benchmarks

The library can be benchmarked by running:

```
cargo bench
```
**DISCLAIMER**: the code in this repository **has not gone through an exhaustive security analysis**, so it is not intended to be used in a production environment, only for academic purposes.
6 changes: 6 additions & 0 deletions contract/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "license-contract"
version = "0.1.0"
edition = "2021"

[dependencies]
1 change: 1 addition & 0 deletions contract/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../LICENSE
9 changes: 9 additions & 0 deletions contract/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# (WIP) Citadel Contract

![Build Status](https://github.com/dusk-network/citadel/workflows/Continuous%20integration/badge.svg)
[![Repository](https://img.shields.io/badge/github-citadel-blueviolet?logo=github)](https://github.com/dusk-network/citadel)

This package contains the Citadel contract.

**DISCLAIMER**: this contract **has not gone through an exhaustive security analysis**, so it is not intended to be used in a production environment, only for academic purposes.

9 changes: 9 additions & 0 deletions contract/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) DUSK NETWORK. All rights reserved.

fn main() {
println!("Hello, world!");
}
File renamed without changes.
34 changes: 34 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "zk-citadel"
version = "0.14.0"
repository = "https://github.com/dusk-network/citadel/core"
description = "Implementation of Citadel, a SSI system integrated in Dusk Network."
categories = ["cryptography", "authentication", "mathematics", "science"]
keywords = ["cryptography", "self-sovereign", "identity", "zk-snarks", "zero-knowledge"]
edition = "2021"
license = "MPL-2.0"

[dependencies]
dusk-bytes = "0.1"
dusk-poseidon = { version = "0.40", features = ["zk"] }
poseidon-merkle = { version = "0.7", features = ["rkyv-impl", "zk", "size_32"] }
dusk-plonk = { version = "0.20", default-features = false, features = ["rkyv-impl", "alloc"] }
dusk-bls12_381 = { version = "0.13", default-features = false, features = ["rkyv-impl", "alloc"] }
dusk-jubjub = { version = "0.14", default-features = false, features = ["rkyv-impl", "alloc"] }
ff = { version = "0.13", default-features = false }
jubjub-schnorr = { version = "0.5", features = ["zk", "rkyv-impl", "alloc"] }
phoenix-core = { version = "0.32", features = ["rkyv-impl", "alloc"] }
rand_core = { version = "0.6", default-features=false, features = ["getrandom"] }
rkyv = { version = "0.7", default-features = false }
bytecheck = { version = "0.6", default-features = false }

[dev-dependencies]
criterion = "0.5"

[[bench]]
name = "license_circuit"
harness = false

[features]
rkyv-impl = []
default=["rkyv-impl"]
1 change: 1 addition & 0 deletions core/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../LICENSE
24 changes: 24 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Citadel Core

![Build Status](https://github.com/dusk-network/citadel/workflows/Continuous%20integration/badge.svg)
[![Repository](https://img.shields.io/badge/github-citadel-blueviolet?logo=github)](https://github.com/dusk-network/citadel)

This package contains the core implementation of Citadel.

**DISCLAIMER**: this package **has not gone through an exhaustive security analysis**, so it is not intended to be used in a production environment, only for academic purposes.

## Tests

The package can be tested by running:

```
cargo t --release
```

## Benchmarks

The package can be benchmarked by running:

```
cargo bench
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5579a71

Please sign in to comment.