All Projects → claimchain → Claimchain Core

claimchain / Claimchain Core

Licence: mit
A core and experimental implementation of ClaimChain

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Claimchain Core

Iavl
Merkleized IAVL+ Tree implementation in Go
Stars: ✭ 197 (+556.67%)
Mutual labels:  merkle-tree, cryptography
Merkle Tools
Tools for creating Merkle trees, generating merkle proofs, and verification of merkle proofs.
Stars: ✭ 54 (+80%)
Mutual labels:  merkle-tree, cryptography
Awesome Substrate
A curated list of awesome projects and resources related to the Substrate blockchain development framework.
Stars: ✭ 228 (+660%)
Mutual labels:  decentralization, cryptography
Exonum Client
JavaScript client for Exonum blockchain
Stars: ✭ 62 (+106.67%)
Mutual labels:  merkle-tree, cryptography
Merkle Tree
Merkle Trees and Merkle Inclusion Proofs
Stars: ✭ 130 (+333.33%)
Mutual labels:  merkle-tree, cryptography
Coniks Go
A CONIKS implementation in Golang
Stars: ✭ 102 (+240%)
Mutual labels:  merkle-tree, cryptography
Coniks Java
A CONIKS implementation in Java
Stars: ✭ 58 (+93.33%)
Mutual labels:  merkle-tree, cryptography
Auth Adt
Authenticated Data Structures Generically
Stars: ✭ 150 (+400%)
Mutual labels:  merkle-tree, cryptography
Firo
The privacy-focused cryptocurrency
Stars: ✭ 528 (+1660%)
Mutual labels:  merkle-tree, cryptography
Halite
High-level cryptography interface powered by libsodium
Stars: ✭ 933 (+3010%)
Mutual labels:  cryptography
Java Crypto Utils
Java Cryptographic, Encoding and Hash Utilities
Stars: ✭ 15 (-50%)
Mutual labels:  cryptography
Gateway
🏰 Serving distributed Web Annotations from the decentralized web
Stars: ✭ 25 (-16.67%)
Mutual labels:  decentralization
Pol
pol /pɵl/ is a modern command line password manager with deniable encryption
Stars: ✭ 25 (-16.67%)
Mutual labels:  cryptography
Blockchain Papers
区块链相关的有价值的文献
Stars: ✭ 20 (-33.33%)
Mutual labels:  cryptography
Dat React Native
Browse through the web with the Dat protocol in your device!
Stars: ✭ 25 (-16.67%)
Mutual labels:  decentralization
Sephia Five
A secure and PGP enabled webmail module for Phosphorus Five
Stars: ✭ 21 (-30%)
Mutual labels:  cryptography
Aes
AES-128 hardware implementation
Stars: ✭ 25 (-16.67%)
Mutual labels:  cryptography
Streebog
GOST R 34.11-2012: RFC-6986 cryptographic hash function
Stars: ✭ 24 (-20%)
Mutual labels:  cryptography
Lethean Vpn
Lethean Virtual Private Network (VPN)
Stars: ✭ 29 (-3.33%)
Mutual labels:  cryptography
Rbnacl
Ruby FFI binding to the Networking and Cryptography (NaCl) library (a.k.a. libsodium)
Stars: ✭ 910 (+2933.33%)
Mutual labels:  cryptography

.. image:: https://claimchain.github.io/claimchain.svg :width: 50px :alt: ClaimChain

############### claimchain-core ###############

.. image:: https://travis-ci.org/claimchain/claimchain-core.svg?branch=master :target: https://travis-ci.org/claimchain/claimchain-core :alt: Build Status

.. image:: https://readthedocs.org/projects/claimchain-core/badge/?version=latest :target: http://claimchain-core.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://zenodo.org/badge/92275408.svg :target: https://zenodo.org/badge/latestdoi/92275408 :alt: Zenodo Citation

This branch contains an implementation of an earlier version of ClaimChain <https://claimchain.github.io>_ data structure. The implementation from the latest version of the the academic paper <https://arxiv.org/pdf/1707.06279>_ can be found in the dev branch <https://github.com/claimchain/claimchain-core/tree/dev>_.

Installing

You can install claimchain via pip::

pip install claimchain

To run tests, checkout the git repository and run tox::

git clone https://github.com/claimchain/claimchain-core
cd claimchain-core
tox

Usage warning

This code is made for research purposes. It is not to be used in real-world systems. Not all security features are implemented, and some of the cryptographic instantiations need to be changed to more secure alternatives.

Usage

High-level interface for ClaimChain consists of two classes, State for building claimchains, and View for parsing and interpreting claimchains.

Building chains

The core abstraction for the a ClaimChain user is a state. The state contains information about the user, and claims they make about other users or objects. Currently, this package only supports private claims, which means the owner of a chain needs to explicitly make every claim readable by intended readers. Once the state is constructed it can be committed to the chain.

Here is how user Alice would prepare her state::

from claimchain import State

state = State()

# Alice adds information about herself
state.identity_info = "Hi, I'm Alice"

# Alice adds private claims
state['bob'] = 'Bob is a good lad'

Making claims accessible requires knowing the DH public key of each authorized reader. The way to obtain the DH keys of other users is described later. Assuming Alice has Carol's DH public key, carol_dh_pk, she can allow Carol to access her claim about Bob::

state.grant_access(carol_dh_pk, ['bob'])

Note that the second argument must be an iterable of claim labels, not a single label.

To commit the state, first, a chain needs to be built, and second, the cryptographic keys have to be generated::

from hippiehug import Chain
from claimchain import LocalParams, State

state = State()

# Generate cryptographic keys
params = LocalParams.generate()

store = {}
chain = Chain(store)

with params.as_default():
    head = state.commit(chain)

The chain can then be published or transmitted to other users by publishing the store and communicating the chain's head. Other users will be able to interpret the chain using the View interface, described below.

Interpreting chains

Having access to the store (dictionary) containing other user's chain, and a head of this user's chain, one can use the View interface.

Here is how Carol can interpret Alice's claimchain, assuming Alice's store is alice_store, the head of her chain is alice_head, and params is Carol's LocalParams object::

from hippiehug import Chain
from claimchain import View

alice_chain = Chain(alice_store, root_hash=alice_head)

with params.as_default():
    alice_view = View(alice_chain)

    # Try to get claim with label 'bob'
    claim = alice_view['bob']

    assert claim == b'Bob is a good lad'

Finally, this is how Carol can retrieve Alice's DH public key::

alice_dh_pk = alice_view.params.dh.pk

This DH public key can be later used to grant Alice rights to read claims on Carol's chain.

This package

======================= ======================================================= claimchain/state.py High-level ClaimChain interface claimchain/core.py Core operations of encoding claims and capabilities claimchain/crypto Cryptographic utilities, and algorithm implementations ======================= =======================================================

Check out the documentation <https://claimchain-core.readthedocs.io/en/latest>_.

Acknowledgements

This work is funded by the NEXTLEAP project <https://nextleap.eu>_ within the European Union’s Horizon 2020 Framework Programme for Research and Innovation (H2020-ICT-2015, ICT-10-2015) under grant agreement 688722.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].