C implementation of BBS+ blind signatures using BLS12-381.
A problem with the concept of aggregated claims in combination with JWTs is excessive disclosure of information. While anonymous credentials such as Camenisch-Lysyanskaya [1] using blind signature schemes such as BBS+ can be used to enable selective disclosure of attributes, such signature schemes are not explicitly defined for the OIDC Aggregated Claims standard. For the DISSENS project, we have implemented this library that supports non-interactive zero knowledge proofs for the use case of self-sovereign identitiy. In particular, we have implemented PABC credentials in re:claimID.
With PABC credentials, SSI systems can support users to effectively selectively disclose attributes from a credential without invalidating the issuer’s signature.
- doxygen
- libb64
- gmp
- jansson
- relic (pulled by cmake)
$ mkdir build && cd build && cmake ../
$ make install (may need sudo)
pabc-issuer --create-issuer TESTissuer
pabc-issuer --issuer TESTissuer \
--create-parameter TESTparams \
--attributes Akey,Bkey,Ckey
JSON_PP=$(pabc-issuer --params TESTparams --export)
pabc-user --import-params "${JSON_PP}" --params TESTparams
pabc-user --params TESTparams --create-user TESTuser
pabc-user --params TESTparams --user TESTuser --set-attr "Akey=Aval"
pabc-user --params TESTparams --user TESTuser --set-attr "Bkey=Bval"
JSON_NONCE=$(pabc-issuer --get-nonce)
echo "JSON_NONCE: ${JSON_NONCE}"
JSON_CR=$(pabc-user --params TESTparams --user TESTuser --create-cr "${JSON_NONCE}")
echo "JSON_CR: ${JSON_CR}"
JSON_CERT=$(pabc-issuer --issuer TESTissuer \
--params TESTparams \
--expected-nonce "${JSON_NONCE}"\
--sign "${JSON_CR}")
echo "JSON_CERT: ${JSON_CERT}"
JSON_PROOF=$(pabc-user --params TESTparams \
--user TESTuser \
--signed-cred "${JSON_CERT}" \
--reveal-attrs "Akey,Ckey")
echo "JSON_PROOF: ${JSON_PROOF}"
pabc-verifier --import-params "${JSON_PP}" --params TESTparams
pabc-verifier --params TESTparams --check "${JSON_PROOF}" && echo "SUCCESS :)"
This folder contains public API headers.
Include this in your project to make use of libpabc.
This header provides a wrapper for raw pabc credentials that adds additional meta information. You probably want to make use of these functions in your project. All functions here are prefixed with pabc_cred_
.
This header defines JSON key names used throughout libpabc.
This folder contains the actual implementation. The files prefixed with pabc-
implement a proof-of-concept CLI.
See setup_test
for general system setup and creation of issuer key pair.
See cred_request_test
for user key pair creation and credential request.
See cred_issue_test
for issuing a credential.
See proof_test
for creating a (blinded) proof/presentation.
See verify_test
for verification of a proof/presentation.
This bash script demonstrates how to use the CLI. Run with
../tests/cli_example.sh
from your build
directory.
libpabc is meant to be a research sandbox in which we can (re)implement protocols and potentially extend and modify functionality under the hood to support research projects. It is NOT a production grade solution and should not be used as such.
Implementations may not be correct or secure. Use at your own risk. This project makes use of the RELIC toolkit for cryptography which considers itself "at most alpha-quality software".
Please use the provided uncrustify.cfg
.
- J. Camenisch, M. Drijvers, and A. Lehmann. “Anonymous attestation using the strong diffie hellman assumption revisited”. In: International Conference on Trust and Trustworthy Computing. Springer. 2016, pp. 1–20.
- Au, Man Ho, et al. "Constant-size dynamic k-times anonymous authentication." IEEE Systems Journal 7.2 (2012): 249-261.