# Blockchain and IoT Convergence--A Systematic Survey on Technologies, Protocols and Security
## 5 Distributed Ledgers
### Blockchain vs. Classical Vulnerability  
A decentralized Blockchain approach to the Internet of Things makes many of the classic attacks unenforceable. Adopting a secure, tamper-evident peer-to-peer communication model to process billions of transactions between IoT devices can also significantly reduce the costs associated with installing and maintaining various network and cloud systems and distribute computing and storage needs across the billions of devices that form the Internet of Things networks. This will also prevent the \"single point of failure\" vulnerability, where the failure of a single node in a network can lead the entire network to a halting collapse. In Blockchain, message exchanges between devices can be treated in the same ways as financial transactions in a Bitcoin network. Devices rely on cryptographically signed transactions and digital smart contracts thus guaranteeing a level of security that was previously unobtainable. The fact that Blockchain cryptographically verifies the transactions eliminates the possibility of man-in-the-middle attack, replay and all other classical \"device-to-cloud\" attacks. Some of these attacks, however, have been borrowed and adapted against the new Blockchain architecture:  
* Eavesdropping: Using different nodes listening in the p2p network it is possible to deanonymize many Blockchains revealing the IP addresses of specific wallet address owners [24]. To solve this issue, Blockchain architectures have been created that allow for a higher level of anonymity [25].
* Replay attack: In case of a fork in a Blockchain, an attacker can use a signed transaction on the first Blockchain and replicate it as it is on the second since the private keys on both chains are identical. Replay protection is fairly trivial to implement and it has become a de-facto prerequisite for any forked chain. For example, Bitcoin Cash created replay protection for their chain by implementing a unique marker that would allow the Bitcoin Cash nodes to distinguish transactions spent on the legacy Bitcoin chain as independent from the Bitcoin Cash chain.
* Sybil Attack: To create many connections in a Blockchain it is necessary to start many nodes at the same time. An attack of this kind can be used to capture users' IPs or study the topology of the network, falling back as a type of attack to be very similar to Eavesdropping. Mining process is protected by consensus-building algorithms that are specifically designed to avoid this type of attack.
* MITM (Man-In-The-Middle) attack: There is no way to listen to a transaction and steal data because of the encryption systems used to sign communications within Blockchain networks. It is possible, however, if we expand the mesh of the definition of MITM attack, embracing not only the network but also the software that is part of it, identify some vulnerabilities such as editing the destination wallet in the transactions sent by the hardware ledger wallet or the theft of funds from wallets generated by weak private keys, where an attacker who possess the private key waits \"in the middle\" for a transaction to steal the funds in the very next block.
* Brute force/Dictionary attack: No way to brute force a private key correctly generated. The problems arise from the unsafe generation of the private key. Unfortunately, some wallets generate private keys directly from user-defined passwords without using any random numbers. This exposes users to this type of attack.
* Phishing attack: There is no architecture that is free from this type of attack because it does not depend on the intrinsic security of the software or hardware used, but exclusively on the human ability to understand and avoid being cheated.  
Table 1 shows a comparison overview of vulnerabilities by type of architecture.  
Figure 1: Blockchain structure. ([PERSON] et al. 2016 [23]).