## 4 Background  
In this section, some important terms already mentioned previously are going to be described in detail, with the intention of going deeper into the proposal of this work.  
* **Blockchain:** blockchain is a peer-to-peer infrastructure proposed by [PERSON] in 2008 with the name Bitcoin [37]. The peers share a common database that can be extended by adding new blocks containing signed information to the chain, making it perfect for use as a ledger. Six years later, a new blockchain technology was released, called Ethereum [38]. This blockchain technology can be used not only to store bank balances but also to host scripts that can be executed and used to manage data in the system. These scripts are known as smart contracts. Blockchain possesses inherent characteristics that render it exceptionally suitable for certain security applications: All information uploaded--transactions--passes through a consensus mechanism before being accepted in the system; the information, once uploaded, cannot be removed or modified; and all new participants can verify the authenticity of all previously recorded data. This information is publicly available in public blockchains, where everyone can access the infrastructure. However, information confidentiality can be guaranteed in permissioned blockchains where access to data is limited to authorized organizations. For example, HyperledgerFabric [39] is a framework for permissioned blockchain where data confidentiality can be protected through a certificate-based access control system.
* **Smart contract:** the smart contracts can be seen as stored procedures that regulate the operations on a blockchain system. All the transactions addressed to a smart contract must respect the rules embedded in the smart contract scripts. The compliance is validated through a consensus algorithm by the peers of the blockchain infrastructure, ensuring reliability, accountability, and availability [40]. These scripts are stored in the blockchain itself, guaranteeing code immutability. [PERSON] defines it like a trust machine [41]. All the functions processed are signed and stored in the blockchain, providing strong traceability.
* **Hardware Security Modules (HSMs):** HSMs are hardware-based solutions with security-by-design that can perform the essential cryptographic operations. These modules can perform the secure generation, secure storage, and secure operation of asymmetric cryptography (e.g., RSA, ECC). By design, there is no practical way to extract its secret crypto material; therefore, they can only be used to perform crypto-operations (e.g., digital signatures) by accessing its secure APIs.
* **Near-Field Communication (NFC):** NFC is a ISO standard [42] that defines a wireless communication technology working in the 13.56 MHz band. RFID and NFC are two different topics confused in the state of the art. Some papers consider NFC as a standard inside RFID [43] while others consider it as a completely independent standard [44; 45]. Nevertheless, the clear advantages of NFC with respect to other wireless technologies is its robustness against eavesdropping due to its very short reading range [45] of up to 10 cm [44] and its popularity, which makes the majority of today's mobile phones support NFC.