BioPassport Technical Implementation
BioPassport Technical Implementation
The BioPassport platform consists of three technical layers:
● Application
this layer consists of various apps to interact with the end user, testkit, or endorsers(such as medical practitioner that can endorse the medical information in the BioPassport system)
● Application Programming Interface
this layer provides authentication, authorization, and anti-data-manipulation security protocols of the BioPassport related information, and the communication between the application and the underlying blockchains.
● Blockchains
the BioPassport runs as a subchain of Ethereum mainnet.
1. Overview: an Ethereum subchain with ADHC consensus algorithm
BioPassport network is a subchain of Ethereum. On the BioPassport we use acyclic directional hash chains with RLP(ADHCRLP) encoding to store our transaction data and finalize the transaction. We use SHA3–512 to calculate the hash.
The ADHC algorithm is described as below:
With ADHC, the transaction records form acyclic graph. And any validator can validate the network fully or partially, which is one of the benefits of this algorithm.
Full validation can be done by deriving lexicographical ordering of all transaction using their interdependency. Then the validator can check from the most earlier one(with no dependencies) to the last one, calculating the hashes and decrypt each encrypted hashes using the user’s public key. This full validation happens every 100 transactions of BioPassport subchain transactions. Full validator can store its validation result into the ethereum using our finalizing contract, BioPassport rewards the validator with BioPassport tokens. And in case of no validator for 100 transactions, the BioPassport subchain system itself calls the finalizing contract but the rewards will be added to the next validator’s rewards, incurring more validators at the next validation rounds.
Partial validation is done by wallet to ensure the security of transaction with minimal effort. The wallet can get the triple and transaction from BioPassport subchain and check if the hash of the transaction is valid according to the algorithm above. If it is valid, then the wallet can get one or more previous triple from the BioPassport subchain and check the hash using same process. Because the encrypted hash code identifies the ownership of the private key, there are very little chance for wrong transaction to be accepted.