Introduction
Modern information systems store and exchange enormous volumes of data, and the integrity of this data is a precondition for the reliability of electronic services, financial systems and public administration. Traditional architectures rely on a central server or a trusted third party, which becomes a single point of failure and a single target for attack. Blockchain was proposed as a way to remove this dependence: a peer-to-peer network maintains a shared, append-only record without a trusted intermediary [1, p. 1]. The aim of this article is to describe the scientific principles on which this technology is built and to assess the conditions under which it is justified in practice.
Cryptographic foundations
The first principle is the use of cryptographic hash functions. A secure hash function maps data of arbitrary length to a fixed-length digest and must be resistant to preimage, second-preimage and collision attacks. The SHA-2 family, including SHA-256, is standardised in FIPS 180–4 [4]. In a blockchain every block header contains the hash of the previous header, so the blocks form a chain: modifying one block changes its hash and invalidates every subsequent block, which makes tampering evident and computationally expensive [1, p. 2].
The second principle is the Merkle tree, a binary tree in which every leaf is the hash of a data item and every internal node is the hash of its two children [3, pp. 369–378]. The root hash commits to all transactions of a block, and the membership of any single transaction can be proven with only a logarithmic number of hashes. This allows lightweight clients to verify data without downloading the whole block. The third principle is the digital signature: every transaction is signed with the private key of its owner and verified with the corresponding public key, which provides authentication and non-repudiation.
Consensus mechanisms
In a decentralised network no node is trusted, so participants must agree on a single version of the ledger even if some of them fail or behave maliciously. This is the Byzantine Generals Problem, formulated by Lamport, Shostak and Pease; they showed that with oral messages agreement is possible only if fewer than one third of the participants are faulty [2, pp. 382–401]. Practical Byzantine Fault Tolerance (PBFT) offers a deterministic protocol that tolerates up to f faulty nodes among 3f + 1 replicas, but its communication overhead grows quickly with the number of nodes [5, pp. 173–186].
Proof of Work, used in the original Bitcoin design, replaces voting by identities with voting by computing power: the valid chain is the one with the greatest cumulative work, and the system is secure while honest nodes control the majority of the computing power [1, pp. 2–3]. Proof of Stake replaces computational effort with economic stake and significantly reduces energy consumption. The main characteristics of the three families are summarised in Table 1.
Table 1
Comparison of consensus mechanism families (qualitative)
|
Feature |
Proof of Work |
Proof of Stake |
PBFT |
|
Fault assumption |
Honest majority of computing power |
Honest majority of stake |
Fewer than n/3 faulty nodes |
|
Energy consumption |
High |
Low |
Low |
|
Finality |
Probabilistic |
Probabilistic / economic |
Deterministic |
|
Scalability in number of nodes |
High |
High |
Limited by message overhead |
Smart contracts and their security
Ethereum extended the concept of blockchain from a ledger of payments to a general-purpose distributed computer: smart contracts are programs stored on the blockchain whose execution is replicated and verified by all nodes [6]. This makes it possible to automate agreements, access control and document verification without a central operator. However, the immutability of deployed code means that programming errors cannot be easily corrected. Atzei, Bartoletti and Cimoli classified typical vulnerabilities of Ethereum contracts, including reentrancy, which was exploited in the 2016 attack on The DAO, as well as unchecked external calls and dependence on block parameters [7, pp. 164–186]. Therefore formal testing, code audits and the use of well-reviewed libraries are mandatory parts of the development process.
Practical model of integrity verification
The principles above can be combined into a simple and reproducible workflow for verifying documents, for example student diplomas or electronic reports. At the registration stage the issuer computes the SHA-256 digest of a file and signs it with a private key. A smart contract then stores the digest, the identifier of the issuer and the time of registration. Only these few dozen bytes are written to the blockchain, while the file itself remains in ordinary storage. When a batch of documents is registered at once, their digests can be combined into a Merkle tree and only the root is recorded, which reduces transaction costs and keeps the amount of on-chain data constant.
At the verification stage the examiner recomputes the digest of the presented file, queries the contract and compares the two values. If they are equal and the signature of the issuer is valid, the file is authentic and unchanged since the moment of registration; if even one bit of the file has been modified, the digests differ completely because of the avalanche property of hash functions. The cost of verification is practically independent of the file size, and no communication with the issuer is required. The main limitation of this model is that it proves integrity and time of existence, but not the truthfulness of the content, which still depends on the honesty of the issuer.
Discussion
A review of the main challenges of blockchain identifies limited scalability, privacy concerns, energy consumption of some protocols and attacks such as selfish mining [8, pp. 352–375]. In addition, the immutability of the ledger conflicts with the right to erasure of personal data established in modern data protection laws. For these reasons, storing large or confidential data directly on-chain is rarely justified. A widely used architectural solution is to keep the data in a conventional database or file storage and to record only its hash, a timestamp and the signature of the author in the blockchain. Anyone can later recompute the hash of a document and compare it with the recorded value; a mismatch proves that the document was altered. This approach is applicable to the verification of diplomas and certificates, medical records, supply-chain events and software releases, and it preserves the main advantage of the technology, namely verifiable integrity without a trusted intermediary.
Conclusion
Blockchain is not a single invention but a combination of well-studied scientific ideas: cryptographic hashing, Merkle trees, digital signatures and Byzantine fault-tolerant consensus. Their combination makes it possible to create information systems in which data integrity can be verified by any participant. The choice of the consensus mechanism and of the data architecture must be based on the requirements of a particular system: the number of participants, the required finality, the available resources and the legal restrictions. Further research should focus on scalability, energy-efficient consensus and the formal verification of smart contracts.
References:
- Nakamoto S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. 9 p.
- Lamport L., Shostak R., Pease M. The Byzantine Generals Problem // ACM Transactions on Programming Languages and Systems. 1982. Vol. 4, No. 3. P. 382–401.
- Merkle R. C. A Digital Signature Based on a Conventional Encryption Function // Advances in Cryptology — CRYPTO ’87. Berlin: Springer, 1988. P. 369–378.
- NIST. FIPS PUB 180–4: Secure Hash Standard (SHS). Gaithersburg: National Institute of Standards and Technology, 2015. 36 p.
- Castro M., Liskov B. Practical Byzantine Fault Tolerance // Proceedings of the 3rd Symposium on Operating Systems Design and Implementation (OSDI ’99). New Orleans, 1999. P. 173–186.
- Buterin V. Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform. 2014. White paper.
- Atzei N., Bartoletti M., Cimoli T. A Survey of Attacks on Ethereum Smart Contracts (SoK) // Principles of Security and Trust (POST 2017). Berlin: Springer, 2017. P. 164–186.
- Zheng Z., Xie S., Dai H.-N., Chen X., Wang H. Blockchain Challenges and Opportunities: A Survey // International Journal of Web and Grid Services. 2018. Vol. 14, No. 4. P. 352–375.

