|
1 | | - |
2 | 1 | # Vi-Anonymous-Credential |
3 | 2 |
|
4 | 3 | This project implements a prototype of an anonymous credential issuance system using a bilinear pairing-based accumulator, designed to support an allow-list mechanism for revoking credentials and preventing misuse. |
5 | 4 |
|
6 | 5 | The accumulator logic is currently being updated based on the model proposed by Flamini et al. (2025). |
7 | 6 | 👉 Read the paper here [https://eprint.iacr.org/2025/549.pdf] |
8 | 7 |
|
9 | | -⸻ |
| 8 | +--- |
10 | 9 |
|
11 | | -## 🔧 Project Components |
| 10 | +## Project Components |
12 | 11 |
|
13 | | -### 🧩 Accumulator |
| 12 | +### Accumulator |
14 | 13 | Represents the core bilinear pairing-based accumulator structure. |
15 | 14 | Includes logic for initializing, updating, and testing accumulator behavior via a simple `main` function. |
16 | 15 |
|
17 | | -### 📜 Credential |
| 16 | +### Credential |
18 | 17 | Defines a credential that includes: |
19 | 18 | - A BBS+ signature over a list of attribute values (messages). |
20 | 19 | - The issuer's public key. |
21 | 20 | This object models the credential held by the user. |
22 | 21 |
|
23 | | -### 🔐 Commitment |
| 22 | +### Commitment |
24 | 23 | Implements Pedersen-style commitments to hide sensitive message values. |
25 | 24 | Used during zero-knowledge proof generation to ensure privacy. |
26 | 25 |
|
27 | | -### 🧾 Witness |
| 26 | +### Witness |
28 | 27 | Contains the data a credential holder maintains to prove non-revocation: |
29 | 28 | - A private scalar `x` |
30 | 29 | - A Pedersen commitment `c_x` |
31 | 30 | - A trapdoor witness `w_x_t` |
32 | 31 | - The credential's BBS+ signature |
33 | 32 |
|
34 | | -⸻ |
| 33 | +--- |
| 34 | + |
| 35 | +## How to Test with the Blockchain |
| 36 | + |
| 37 | +1. **Start the Blockchain Server** |
| 38 | + |
| 39 | + Open a terminal and run: |
| 40 | + ``` |
| 41 | + node registry/blockchain_server.js |
| 42 | + ``` |
| 43 | + You should see: |
| 44 | + ``` |
| 45 | + Blockchain API running on port 3001 |
| 46 | + ``` |
| 47 | + |
| 48 | +2. **Run the Rust Tests** |
| 49 | + |
| 50 | + In another terminal, from the project root, run: |
| 51 | + ``` |
| 52 | + cargo test --test issue_vc -- --nocapture |
| 53 | + cargo test --test revoke_vc -- --nocapture |
| 54 | + ``` |
| 55 | + This will: |
| 56 | + - Issue a credential and log it to the blockchain. |
| 57 | + - Revoke a credential and log the revocation to the blockchain. |
| 58 | + |
| 59 | +3. **Check the Blockchain Server Terminal** |
| 60 | + |
| 61 | + You will see logs like: |
| 62 | + ``` |
| 63 | + [ADD] Block added with data: "CredentialIssued:..." |
| 64 | + [ADD] Block added with data: "CredentialRevoked:..." |
| 65 | + [CHAIN] Chain requested |
| 66 | + [VERIFY] Chain verification: true |
| 67 | + ``` |
| 68 | + |
| 69 | +4. **(Optional) Query the Blockchain API** |
| 70 | + |
| 71 | + You can use `curl` or Postman to check the chain: |
| 72 | + ``` |
| 73 | + curl http://localhost:3001/chain |
| 74 | + ``` |
| 75 | + |
| 76 | +--- |
35 | 77 |
|
36 | | -🚧 In Progress |
37 | | - • Integration of the ZKP generation algorithm for the holder to prove validity and non-revocation of their credential. |
| 78 | +In Progress: |
| 79 | +- Integration of the ZKP generation algorithm for the holder to prove validity and non-revocation of their credential. |
38 | 80 |
|
39 | | -⸻ |
| 81 | +--- |
0 commit comments