Blockchain Attributes Attestation
This project demostrate blockchain-based attestation system for managing attributes.
Entity : Issuing Authority (e.g., local government) – issues the credential.
User : Citizen – stores the credential.
Verifier : Third party – verifies the authenticity of the credential.
Blockchain : Credentials ledger - Used for registering hashes/digests of credentials (not personal data).
Role
Description
Issuer (QTSP)
A trusted authority (e.g., government agency) that issues attribute credentials to users.
Holder
The end user (citizen or company) who holds the Verifiable Credential
Verifier
A relying party (e.g., service provider) that needs to verify a user's attribute
Blockchain Network
A distributed ledger used to anchor cryptographic proofs (e.g., hashes of credentials), not to store personal data.
flowchart LR
Blockchain --Hashing&Signing --- Block0["Block"]
Block0["Block"] --- new_credentials["NewCredentialsList"]
Block0 --- revoked_credentials["RevokedCredentialsList"]
Block0 --- timestamp["Timestamp"]
Block0 --- hash["Current Block Hash"]
Block0 --- previous_hash["Previous Block Hash"]
Block0 --- signer["Signer"]
Block0 --- signature["SignedCredential"]
new_credentials["NewCredentialsList"] --- SignedCredential0["SignedCredential"]
new_credentials --- SignedCredential1["SignedCredential"]
new_credentials --- SignedCredential2["..."]
revoked_credentials["RevokedCredentialsList"] --- SignedCredential3["SignedCredential"]
revoked_credentials --- SignedCredential4["SignedCredential"]
revoked_credentials --- SignedCredential5["..."]
SignedCredential0 --Hashing&Signing --- Credential0["Credential"]
Credential0 --- Uuid0["Uuid"]
Credential0 --- Attribute0["Attribute"]
Credential0 --- Issuer0["Issuer"]
Credential0 --- Subject0["Subject"]
Credential0 --- ValidDuration0["ValidDuration"]
SignedCredential3 --Revoking&Hashing&Signing --- Credential1["Credential"]
Credential1 --- Uuid1["Uuid"]
Credential1 --- Attribute1["Attribute"]
Credential1 --- Issuer1["Issuer"]
Credential1 --- Subject1["Subject"]
Credential1 --- ValidDuration1["ValidDuration"]
Loading
cargo build --all-features
cargo test
// OR
cargo tarpaulin --skip-clean
attributes_attestation --help
Help informations
Blockchain initialization
attributes_attestation blockchain init
Blockchain initialization
attributes_attestation issuers add <issuer_name>
Issuer creation
attributes_attestation subjects add <name> <surname>
Subject creation
attributes_attestation credentials add <issuer_index> <subject_index> <credential_name> <credential_value> <from> <to>
Credential creation
attributes_attestation block new <issuer_index>
attributes_attestation block add <credential_index>
Block creation
Adding block to blockchain (finalize)
attributes_attestation block finalize
Adding block to blockchain
attributes_attestation blockchain verify <credential_index>
Credential verification
attributes_attestation block new <issuer_index>
attributes_attestation block revoke <credential_index>
attributes_attestation block finalize
Credential revocation
Credential revocation
List contents of Issuer, Subject, Credential, Block, Blockchain
attributes_attestation issuers list
attributes_attestation subjects list
attributes_attestation credentials list
attributes_attestation block display
attributes_attestation blockchain display