A Permissioned Blockchain Secure from Both Classical and Quantum Attacks
Total Page:16
File Type:pdf, Size:1020Kb
PQFabric: A Permissioned Blockchain Secure from Both Classical and Quantum Attacks Amelia Holcomb Geovandro Pereira Bhargav Das∗ Michele Mosca Computer Science Combinatorics & Optimization Computer Science Combinatorics & Optimization University of Waterloo University of Waterloo University of Waterloo University of Waterloo Waterloo, Canada Waterloo, Canada Waterloo, Canada Waterloo, Canada [email protected] [email protected] [email protected] [email protected] Abstract—Hyperledger Fabric is a prominent and flexible so- the end of Round 3, about an year from now. A fourth round lution for building permissioned distributed ledger platforms. is also expected in order to select alternate candidates for Access control and identity management relies on a Mem- later standardization. bership Service Provider (MSP) whose cryptographic interface only handles standard PKI methods for authentication: RSA Open source implementations of such algorithms, for and ECDSA classical signatures. Also, MSP-issued credentials instance those provided by the Open Quantum Safe (OQS) may use only one signature scheme, tying the credential- project [1], continually change in order to keep up-to- related functions to classical single-signature primitives. RSA date with both progress in cryptanalysis and per-algorithm and ECDSA are vulnerable to quantum attacks, with an ongoing parameter modifications and optimizations. However, de- post-quantum standardization process to identify quantum- safe drop-in replacements. In this paper, we propose a redesign signing, approving, and implementing post-quantum cryp- of Fabric’s credential-management procedures and related tographic standards is only the first step. There is also the specifications in order to incorporate hybrid digital signatures, gargantuan task of integrating these algorithms into the protecting against both classical and quantum attacks using wide range of existing systems that depend on and are one classical and one quantum-safe signature. We create highly coupled with classical public key cryptography. The PQFabric, an implementation of Fabric with hybrid signatures that integrates with the Open Quantum Safe (OQS) library. Our integration itself will be a new test of these algorithms, implementation offers complete crypto-agility, with the ability particularly as they are integrated into high-performance to perform live migration to a hybrid quantum-safe blockchain systems. Moreover, during the transition, these systems must and select any existing OQS signature algorithm for each node. remain secure against classical attacks, even in the face of We perform comparative benchmarks of PQFabric with each of potential flaws or changes to post-quantum cryptography the NIST candidates and alternates, revealing that long public keys and signatures lead to an increase in hashing time that is algorithms. This situation demands a double layer of pro- sometimes comparable to the time spent signing or verifying tection against classical and quantum attacks, which can be messages itself. This is a new and potentially significant issue achieved by means of hybrid signatures, i.e., one classical in the migration of blockchains to post-quantum signatures. signature and one post-quantum [2], [3]. Index Terms—Post-quantum cryptography, digital signatures, A prominent class of applications that is likely to be Blockchain, Hyperledger Fabric an early adopter of these algorithms is the blockchain I. INTRODUCTION distributed ledger. Blockchain technology is fundamentally reliant on cryptographic primitives, especially signature In recent years, the research community has drawn ever authentication, in order to 1) validate the origin of the closer to the construction of a quantum computer, one with transactions that are to be added to the chain and 2) ensure the potential to break classical public key cryptography. In arXiv:2010.06571v3 [cs.CR] 23 Dec 2020 non-repudiation from the transaction originators. In our advance of this threat, the National Institute of Standards work, we focus on Hyperledger Fabric 4 , a permissioned and Technology (NIST) is looking to establish standards [ ] blockchain in use in production systems. As a permissioned for cryptographic algorithms that show promise at securing blockchain, Hyperledger does not require anonymous cre- against both quantum and classical attacks. The NIST post- dentials, but instead uses standard digital signatures to quantum standardization process is in its third round of identify users. evaluation and has narrowed down the initial 82 submission In addition to the need for blockchains to make this candidates to only 15. These include six digital signature post-quantum transition earlier rather than later, there are candidates: three finalists and three alternates. Some of the several typical features of blockchains that make them a finalists are expected to be selected for standardization at rigorous testbed for new cryptographic algorithms. Industry- G. Pereira and M. Mosca are supported in part by NSERC, Cryp- deployed blockchains are high-throughput, with recent re- toWorks21, Canada First Research Excellence Fund, Public Works and search in Hyperledger Fabric achieving 20,000 transactions Government Services Canada, and the Royal Bank of Canada. per second 5 . Each transaction proposal along with every ∗ B. Das is currently affiliated with Indian Institute of Technology [ ] Dhanbad. processing step in the network contains a signature, and the code path to commit each transaction includes both execution/validation and ordering of the transactions are signing and verification algorithms. As such, signature size decoupled and thus performed by different entities (peer- and algorithm speed both have direct and significant impact s/endorsers and orderers, respectively). As a result, the on the performance of the system. In addition, as large consensus protocol (run by the orderers) is independent of distributed systems that can neither ensure synchronous the blockchain protocol as a whole (e.g., the chaincode), updates nor handle extended downtime for a migration, and can be tailored per application and also updated after blockchains are among the more complex use cases for the network is bootstrapped. post-quantum migration. Lessons learned maintaining per- We now provide a set of definitions of interest used in formance and backwards compatibility in this context can the context of the Fabric Blockchain. be broadly applicable as other systems integrate with post- Membership Service Provider (MSP). The network MSP quantum algorithms later on. handles credential/identity management and is usually as- Contributions: This work introduces PQFabric, which is sociated with one organization. It is responsible for issuing to our knowledge the first version of the Hyperledger Fab- certificates to peers, orderers and users and thus giving them ric enterprise permissioned blockchain1 whose signatures suitable authentication and authorization. The network MSP are secure against both classical and quantum computing is not to be confused with the local MSP,which is discussed threats. Our design proposal is backwards compatible for in SectionIV. Each node uses a local MSP to abstract easy migration and flexible enough to support different post- credentials and identity management (including signatures quantum cryptographic schemes, making it future-proof to and their verification) from the rest of its codebase. The NIST upcoming standards and updates to the OQS library. local MSP is a software module only, and does not run We also: separately from the node. Highlight the inconsistencies we found between NIST Fabric-CA. The Fabric-CA is a certificate authority that • and Golang APIs if hybrid signature schemes are to contains a root certificate and issues identity certificates to be implemented, which will need to be resolved for each organization’s MSP. The MSP’s certificate allows it to smooth integration going forward. issue enrollment certificates to the users in its organization, Provide a baseline performance comparison between giving them access to the blockchain. • transactions that use classical and hybrid quantum- Client or User. A client or user is an actor who owns classical cryptography. We find that, depending on the digital access credentials to a particular blockchain network, signature algorithm used, PQFabric can achieve compa- and can submit transaction proposals to the peers. rable performance to classical Fabric. Peer (also called endorsing peer or endorser). The Profile PQFabric to provide insight into the practical peer’s responsibility includes verifying users’ signatures in • performance costs of post-quantum signature algo- the transaction proposals, executing and validating the rithms. We show that the length of the signature and/or proposal according to pre-specified policies, endorsing and public key, not just the signature algorithm execution digitally signing the resulting outcome of the validated time, are major contributors to PQFabric slowdowns. proposal, and notifying the user of the outcome. Peers also Publish our code online, offering our implementation receive block (of ordered transactions) candidates from the • as a testbed for future work focusing on improving orderers, performing final validation and committing the blockchain transaction throughput with post-quantum blocks to the ledger. cryptography algorithms. Orderer. For each set of transactions, an orderer verifies all endorsers’ signatures and runs a consensus protocol