Hello, everybody. Thank you for being here today in this session. In this presentation, we're going to talk about security. And the algorithms and the devices in charge of our security when we are navigating on the Internet or we are sharing files or information. We're going to talk about keys, hashes, and DPMs. Also, we're going to talk about the future threats that can essentially break them. For example, quantum computing. Also, at the end of the presentation, I want to propose you to use reconfigurable devices to be in charge of that security. Reconfigurable devices are devices that the designer can program or can configure its internal hardware architecture in order to make them resilient to new threats, for example, or to update the algorithms which are running inside of the device. But first of all, let me introduce myself. I have to say that I am the freak on that conference because I am not a software developer. I am an FPGA designer. FPGAs are reconfigurable devices that I can program or I can design or I can implement the design which is printed inside of the integrated circuit. I also write on the Internet. You can read me. Sorry? Better? Ah, thanks. Okay, I also write on the Internet. You can read me on Hackster, X, Hackaday, and also on my own blog, controlpath.com. If you want to tell me something, you can write me on my email and you can find me also on Twitter with the name controlpaths. Well, first we're going to talk about the privacy protectors. The privacy protectors, now we can find hash algorithms and keys. Regarding hash algorithms, we have MD5 and the SHA family, SHA1, 2, and 3. If you're still using MD5 or SHA1, you are in the correct talk. Regarding the keys, we have RSA, we have Kyber, and we have IS. We're going to see how they work very quickly. Regarding hash algorithms, a hash algorithm is an algorithm in which I can introduce a variable length string and then it will return me a fixed length string. The key is that a very small change in the input string will produce a big change in the output string. So they can be used in order to verify if a file has been changed in the transmission or not. As I said before, we have different hash algorithms. We have MD5 and the SHA family, 0, 1, 2, and 3. Now, only SHA2 and SHA3 are still alive. The first one that was broken was SHA0 in 1999, then MD5, and the last one broken was SHA1. All of them died, all of them were broken because a group of investigators got to create a custom hash by modifying the input string. This is known as a collision. Nowadays, SHA2 and SHA3. But if we add a new player, like quantum computing, only SHA3 will be alive. Regarding the keys, keys are essentially passwords. They are passwords that I can use to encrypt a file or encrypt some information. The thing is that only the user who has the password, who has the key, are able to read the data or decrypt the data. When I talk about data, I'm not talking about just files. I'm talking about real-time data, for example, in TLS communications or SSH. It's data that I send and receive in real time. We have two types of keys. We have symmetric keys and asymmetric keys. Regarding symmetric keys are the easiest ones. There's only one key for encrypt and the same key for decrypt. The problem here is the way in which the creator of the key shares the key with all the recipients. To fix that, we have the asymmetric keys or asymmetric encryption. We have two different keys. We have a pair of keys. One key is used for encrypting the data and the other one is used for decrypting the data. And the password used for decrypting the data cannot encrypt the data. Usually the key used for encrypting the data is known as a public key because anyone can encrypt the data that I may be able to read. All of these algorithms are just math and some logic. The names like Rindle, Diffie-Hellman, Chacha and Salsa are the names of that algorithm. As I said, they are based on mathematical and logic operations. Key of that algorithm is the performance of them. The performance is the speed of how quick they can encrypt and decrypt data. And this is very important if we are performing real-time ciphering. For example, in the case of the TLS or SSH. So we don't talk just about algorithms. We also talk about the way in which we calculate the cipher. We encrypt the data or we decrypt the data. This is known as the operation mode and it is critical, for example, for IS encryption. Okay, so we have the algorithm that we know now that are based on mathematical and logic operations. We need to make them a reality. We need to implement them. We have two different ways of implementing these kinds of algorithms. We have the software implementation and the hardware implementation. The software is easy. It is the usual way in which we write the code in order to solve all the mathematical operations. When we are talking about hardware implementation, we are talking about using an external hardware to let the external hardware compute the mathematical equations and the encryption or the decryption. Okay, regarding the software implementation. As I said before, the implementation is made by code. C, Python, whatever. The performance that we can reach with this kind of implementation is very poor. Why? Because if I have a processor that is running at 3 GHz or 5 GHz, the processor does not execute the instructions at that speed. In addition, we have the operating system. So all of these elements between the hardware of the processor and the algorithm will make that the implementation of these algorithms just using code won't be... well, the performance is not good. Manufacturers know that. So what they do is implement the processor extension. These are pieces of hardware that are near to the processor. We have processor extensions to calculate SHA, to calculate I. The SHA is the SHA-ni and the IS is the IS-ni. Another key of that kind of software implementation is that the keys have been stored in the hard disk. In the hard disk, if we want to make them non-volatile, they will be implemented in the RAM memory if they can be volatile. One thing that makes these software implementations very useful is that they are very easy to update. If I want to change some of the algorithms that I have implemented, I just need to make an update of the software running another script and it will work. However, this is not all good. As I said, the implementation of the algorithms made in bytecode has a very poor performance. Also, yes, we can use the processor extension, but in this case we are going to create a dependency of the processor. And if we create an algorithm that uses a processor extension and then the other user executes that algorithm in a processor which doesn't have those extensions, our algorithm won't work. This is especially critical when we are working with an embedded system, because not all the manufacturers create the same processors, even if they use the same ARM core. Keys stored in hard disks are absolutely not secure. And the same for the easy-to-update, another player can update the software in order to make them vulnerable. The other implementation we talked about is hardware implementation. When I talk about hardware implementation, I talk about using an external device to execute the algorithms, which is great. This allows us to store the keys very securely, because those keys can be read and write only. So I can send the key and then no one will be able to read the same key. The hardware used in these cases are made by manufacturers that implement algorithms that are widely used. For example, usually all the hardware of this type implements SHA-2, SHA-256 normally, and ICE up to SHA-256. And finally, it is true that we eliminate the dependency of the CPU. However, using an external device to execute the different cryptographic algorithms is more than executing these cryptographic algorithms in other processors. They allow secure storage for keys, which is great, and we eliminate the dependency on the CPU, but we are going to create a dependency of the hardware used. And standardize the algorithms used. As I said, the manufacturer wants to sell the hardware, so they will implement the widely used algorithms. One of that hardware is the well-known TPM, Structured Platform Modules. They are cryptographic coprocessors usually integrated in the same motherboard. They allow secure storage for keys and they include a set of cryptographic functions. Nowadays we have two important versions, TPM 1.2 and TPM 2.0. TPM 2.0 is very famous because if you want to run Windows 11 on an old computer, you will need to include a TPM 2.0 in the motherboard. Let's take a look at the Practical Guide of the Trusting Computing Group, which is the group in charge of developing the TPM 2.0. We can read, one problem that begs the developers for a long time was how to integrate multiple hash algorithms. If one of those hash algorithms was later broken. We have seen that the hash algorithms will be broken. Ever. And what can break those algorithms? Well, for now, the most important threat is the quantum threat of quantum computing. Quantum computing is a new computational mode that is based on quantum physics. It uses the traditional bits that we can find in a regular computer. They can take values of 1 or 0. Quantum computing uses quantum bits or qubits that can take values of 1, 0 and all the values between them. They can do this because of the superposition principle of quantum physics. This allows the processor to be able to execute or evaluate multiple choices at the same time. And, obviously, the quantum processors allow the execution of quantum algorithms. The quantum algorithms that are related to cryptography are the Gruber's algorithms, which use the quantum superposition principle. And the use of these algorithms helps us to find elements within an unordered list. Summarizing, if we have a set of solutions of length n, the set of solutions is reduced to a square root of n, which is great. The other algorithm that can represent a threat to the cryptography, to the scriptography, is the source algorithm. This algorithm is used for finding the prime factors of an integer n. This results in, if we have a set of solutions with a length n, it will be reduced to a logarithm of n cubed, which is also great. The use of these two algorithms is related to this table. We can see how algorithms of 256 bits are reduced to 128, and the same for the keys, and RSA is another case. Regarding SHAs and IS, all of them can be broken using the Gruber's algorithm, except SHA3, that you can see the reduction when we use quantum computing is none. So we still have keys or hashes with a length of 256. The result of this is SHA256 will be broken, IS128 will be also broken, RSA will be broken. Fortunately, TPM manufacturers know that, and they will implement algorithms that resist quantum computing, or not. This is the TPM from Infineon, and we can see in the bottom, symmetric cryptographic, the algorithm that it supports. And there are no SHA2, 512, or SHA3. So this kind of, or this group of TPMs will be vulnerable in a time. So what I propose, use reconfigurable devices. They are devices that are able to reconfigure its internal hardware, and by reconfiguration I am not talking about reprogrammability, I am talking about reconfigure, redo its internal hardware. They also allow partial reconfiguration, we can update only a part of the integrated circuit, and they will keep all the benefits of the hardware implementations. They can be based on FPGAs or other devices, but mostly on FPGAs. But what is an FPGA? FPGA is a matrix, it is an integrated circuit, in which inside we can find a matrix of different elements. We have input and output blocks, and we have a big set of configurable logic blocks. Also we can find multiplication and accumulation blocks, and block RAM blocks. The key of these elements, or what makes them great, is that I can use a set of blocks to implement SHA-256, for example. And in another part of the FPGA, we can implement an RSA-2048. These two algorithms are executed, are implemented in different parts of the FPGA, so they can be run in parallel. If any of them will become vulnerable because of the quantum computing or something else, it is easy to change them to a post-quantum algorithm. For example, the SHA-2 will be converted into SHA-3, which is post-quantum, and RSA can be converted to Kiber. To test this, I created this project. I am not trying to sell you anything. This is an open source project, and it is a hardware secure model based on the AMD Spartan 7 FPGA. As I said, it is open source, and it changes the traditional I2C algorithm by an SPI interface, which can reach a speed up to 50 megabits per second. The limitation of the 50 megabits per second is because of this device, because of the device I designed. We can't reach higher speeds if we, for example, use a PCI communication. And, obviously, it allows a remote update once it will be deployed. The advantages of using this kind of HSMs. Reconfigurability allows to implement or to update the algorithms. And also, they avoid or allow us to confuse side-channel attacks and timing attacks, because I am implementing the hardware within the device. So I can, for example, if someone wants to attack me using a timing attack, I just have to make that the encryption using any key will take the same time. And the same for side-channel attacks. They are able to generate two random numbers, and they allow also to implement or to execute multiple algorithms at the same time. And also, parallelizable operation modes can be used. Possible disadvantages. Okay, FPGAs are primarily based on RAM memory. This can be fixed. The design typically will require an external memory in order to store the design. And usually, they don't incorporate inside a non-volatile memory. Also, we can fix that. And regarding the power consumption, FPGAs will consume more than a regular TPM. However, regarding the handicap, they need an external memory to store the design. AMD, for example, allows us to encrypt the design with IS-256. The good side is that the key is stored within the FPGA using fuses, so they cannot be read externally. Also, if I disable the G-tag interface to avoid anyone reprogramming that FPGA, it will increase the security. And the encryption key used for the flash memory that stores the design is generated and fused in the manufacturing process of the FPGA. And regarding the key storage, well, it is easy. I just need to add to the board an APROM memory, for example, and then I can use an SPI driver that encrypts all data that I write in the APROM memory. The key, in this case, can be also stored in fuses inside the FPGA, so they can be also write-only. The encryption key cannot be read. Real-time cipher. I said before that I implemented an SPI interface instead of a regular I2C interface. Why? Because the speed. With a SPI interface, we can reach around 50 megabits or even 100 megabits per second. And it will be very crucial when we are talking about real-time ciphering. And true random number generation. I said before that I am writing the hardware which is running inside of the FPGA, which is printed in the FPGA. So I can control the length between the connection of one logic block to another. But what I cannot control is the purity of the wafer that the manufacturer uses to print the circuit. This results in the delay between two logic blocks will depend on the purity of the wafer, and also the external temperature and the external pressure. This will result in the time spent by a bit or by the electricity to go from one logic block to the other is completely random. And the use of this kind of HSMs also allows us to create very customized solutions. In this case, I created a very simple example. When I have a camera connected through MIPI to one cryptolite, and then the communication with the host will be encrypted. On the host side, I can add another cryptolite in order to decrypt the data and talk with the host using SPI interface at 50 megabits per second. And that's all. Thank you very much for being here and thank you to CryptoVillage.