WEBVTT

00:00.000 --> 00:01.580
Hello, everybody.

00:01.580 --> 00:05.260
Thank you for being here today in this session.

00:05.700 --> 00:09.140
In this presentation, we're going to talk about security.

00:09.500 --> 00:18.320
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.

00:18.420 --> 00:22.880
We're going to talk about keys, hashes, and DPMs.

00:23.240 --> 00:29.500
Also, we're going to talk about the future threats that can essentially break them.

00:29.500 --> 00:32.300
For example, quantum computing.

00:32.580 --> 00:46.900
Also, at the end of the presentation, I want to propose you to use reconfigurable devices to be in charge of that security.

00:47.160 --> 01:09.040
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.

01:09.200 --> 01:12.100
But first of all, let me introduce myself.

01:12.600 --> 01:17.800
I have to say that I am the freak on that conference because I am not a software developer.

01:17.800 --> 01:20.280
I am an FPGA designer.

01:20.280 --> 01:37.100
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.

01:37.540 --> 01:38.820
I also write on the Internet.

01:38.820 --> 01:40.060
You can read me.

01:40.520 --> 01:41.480
Sorry?

01:43.020 --> 01:44.380
Better?

01:44.680 --> 01:47.520
Ah, thanks.

01:47.520 --> 01:50.500
Okay, I also write on the Internet.

01:50.500 --> 01:58.520
You can read me on Hackster, X, Hackaday, and also on my own blog, controlpath.com.

01:59.200 --> 02:07.800
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.

02:08.540 --> 02:12.520
Well, first we're going to talk about the privacy protectors.

02:12.520 --> 02:19.560
The privacy protectors, now we can find hash algorithms and keys.

02:19.560 --> 02:27.060
Regarding hash algorithms, we have MD5 and the SHA family, SHA1, 2, and 3.

02:27.060 --> 02:31.100
If you're still using MD5 or SHA1, you are in the correct talk.

02:31.100 --> 02:38.340
Regarding the keys, we have RSA, we have Kyber, and we have IS.

02:38.340 --> 02:41.860
We're going to see how they work very quickly.

02:42.280 --> 02:55.940
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.

02:56.640 --> 03:08.520
The key is that a very small change in the input string will produce a big change in the output string.

03:08.520 --> 03:17.840
So they can be used in order to verify if a file has been changed in the transmission or not.

03:18.780 --> 03:23.020
As I said before, we have different hash algorithms.

03:23.020 --> 03:28.820
We have MD5 and the SHA family, 0, 1, 2, and 3.

03:28.820 --> 03:36.200
Now, only SHA2 and SHA3 are still alive.

03:36.200 --> 03:48.920
The first one that was broken was SHA0 in 1999, then MD5, and the last one broken was SHA1.

03:49.100 --> 04:04.180
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.

04:04.180 --> 04:06.180
This is known as a collision.

04:06.180 --> 04:09.900
Nowadays, SHA2 and SHA3.

04:09.900 --> 04:18.520
But if we add a new player, like quantum computing, only SHA3 will be alive.

04:18.920 --> 04:22.860
Regarding the keys, keys are essentially passwords.

04:22.860 --> 04:28.080
They are passwords that I can use to encrypt a file or encrypt some information.

04:28.860 --> 04:37.960
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.

04:38.140 --> 04:41.200
When I talk about data, I'm not talking about just files.

04:41.200 --> 04:46.180
I'm talking about real-time data, for example, in TLS communications or SSH.

04:46.180 --> 04:51.140
It's data that I send and receive in real time.

04:51.140 --> 04:53.600
We have two types of keys.

04:53.600 --> 04:57.280
We have symmetric keys and asymmetric keys.

04:57.700 --> 05:00.760
Regarding symmetric keys are the easiest ones.

05:01.360 --> 05:07.100
There's only one key for encrypt and the same key for decrypt.

05:07.260 --> 05:15.760
The problem here is the way in which the creator of the key shares the key with all the recipients.

05:17.980 --> 05:23.740
To fix that, we have the asymmetric keys or asymmetric encryption.

05:23.780 --> 05:25.960
We have two different keys.

05:25.960 --> 05:27.700
We have a pair of keys.

05:27.700 --> 05:33.260
One key is used for encrypting the data and the other one is used for decrypting the data.

05:33.260 --> 05:37.200
And the password used for decrypting the data cannot encrypt the data.

05:37.200 --> 05:49.020
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.

05:50.400 --> 05:57.140
All of these algorithms are just math and some logic.

05:57.560 --> 06:04.740
The names like Rindle, Diffie-Hellman, Chacha and Salsa are the names of that algorithm.

06:04.740 --> 06:09.880
As I said, they are based on mathematical and logic operations.

06:10.840 --> 06:16.140
Key of that algorithm is the performance of them.

06:16.160 --> 06:23.300
The performance is the speed of how quick they can encrypt and decrypt data.

06:23.300 --> 06:28.220
And this is very important if we are performing real-time ciphering.

06:28.220 --> 06:33.580
For example, in the case of the TLS or SSH.

06:33.820 --> 06:38.180
So we don't talk just about algorithms.

06:38.180 --> 06:42.920
We also talk about the way in which we calculate the cipher.

06:42.920 --> 06:46.020
We encrypt the data or we decrypt the data.

06:46.240 --> 06:51.160
This is known as the operation mode and it is critical, for example, for IS encryption.

06:53.780 --> 06:59.900
Okay, so we have the algorithm that we know now that are based on mathematical and logic operations.

06:59.900 --> 07:01.760
We need to make them a reality.

07:01.760 --> 07:04.560
We need to implement them.

07:04.560 --> 07:09.540
We have two different ways of implementing these kinds of algorithms.

07:10.000 --> 07:13.740
We have the software implementation and the hardware implementation.

07:13.740 --> 07:14.660
The software is easy.

07:14.660 --> 07:23.940
It is the usual way in which we write the code in order to solve all the mathematical operations.

07:23.940 --> 07:39.500
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.

07:41.620 --> 07:43.820
Okay, regarding the software implementation.

07:44.640 --> 07:47.680
As I said before, the implementation is made by code.

07:47.680 --> 07:49.780
C, Python, whatever.

07:50.640 --> 07:57.860
The performance that we can reach with this kind of implementation is very poor.

07:57.980 --> 07:58.440
Why?

07:58.440 --> 08:08.860
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.

08:09.700 --> 08:12.080
In addition, we have the operating system.

08:12.080 --> 08:30.460
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...

08:30.460 --> 08:33.180
well, the performance is not good.

08:34.040 --> 08:35.400
Manufacturers know that.

08:35.400 --> 08:41.420
So what they do is implement the processor extension.

08:41.420 --> 08:44.600
These are pieces of hardware that are near to the processor.

08:44.600 --> 08:48.580
We have processor extensions to calculate SHA, to calculate I.

08:48.580 --> 08:53.680
The SHA is the SHA-ni and the IS is the IS-ni.

08:54.020 --> 09:00.340
Another key of that kind of software implementation is that the keys have been stored in the hard disk.

09:00.340 --> 09:09.720
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.

09:11.460 --> 09:18.740
One thing that makes these software implementations very useful is that they are very easy to update.

09:18.740 --> 09:30.420
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.

09:30.500 --> 09:35.940
However, this is not all good.

09:35.940 --> 09:44.400
As I said, the implementation of the algorithms made in bytecode has a very poor performance.

09:44.400 --> 09:53.280
Also, yes, we can use the processor extension, but in this case we are going to create a dependency of the processor.

09:53.280 --> 10:09.000
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.

10:09.000 --> 10:18.900
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.

10:19.900 --> 10:24.160
Keys stored in hard disks are absolutely not secure.

10:24.160 --> 10:30.620
And the same for the easy-to-update, another player can update the software in order to make them vulnerable.

10:32.420 --> 10:36.060
The other implementation we talked about is hardware implementation.

10:36.060 --> 10:44.260
When I talk about hardware implementation, I talk about using an external device to execute the algorithms, which is great.

10:44.700 --> 10:53.880
This allows us to store the keys very securely, because those keys can be read and write only.

10:53.880 --> 11:02.060
So I can send the key and then no one will be able to read the same key.

11:03.900 --> 11:15.040
The hardware used in these cases are made by manufacturers that implement algorithms that are widely used.

11:15.400 --> 11:30.560
For example, usually all the hardware of this type implements SHA-2, SHA-256 normally, and ICE up to SHA-256.

11:30.600 --> 11:37.160
And finally, it is true that we eliminate the dependency of the CPU.

11:37.720 --> 11:51.780
However, using an external device to execute the different cryptographic algorithms is more than executing these cryptographic algorithms in other processors.

11:51.780 --> 12:03.220
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.

12:03.600 --> 12:07.880
And standardize the algorithms used.

12:08.640 --> 12:18.300
As I said, the manufacturer wants to sell the hardware, so they will implement the widely used algorithms.

12:20.260 --> 12:27.580
One of that hardware is the well-known TPM, Structured Platform Modules.

12:27.580 --> 12:33.260
They are cryptographic coprocessors usually integrated in the same motherboard.

12:33.600 --> 12:40.660
They allow secure storage for keys and they include a set of cryptographic functions.

12:41.260 --> 12:46.540
Nowadays we have two important versions, TPM 1.2 and TPM 2.0.

12:46.540 --> 12:59.120
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.

13:02.470 --> 13:12.630
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.

13:12.630 --> 13:19.790
We can read, one problem that begs the developers for a long time was how to integrate multiple hash algorithms.

13:19.790 --> 13:24.030
If one of those hash algorithms was later broken.

13:24.510 --> 13:31.670
We have seen that the hash algorithms will be broken.

13:32.070 --> 13:33.250
Ever.

13:36.500 --> 13:41.180
And what can break those algorithms?

13:41.180 --> 13:46.260
Well, for now, the most important threat is the quantum threat of quantum computing.

13:46.260 --> 13:54.540
Quantum computing is a new computational mode that is based on quantum physics.

13:55.260 --> 14:00.900
It uses the traditional bits that we can find in a regular computer.

14:01.540 --> 14:04.400
They can take values of 1 or 0.

14:04.400 --> 14:13.280
Quantum computing uses quantum bits or qubits that can take values of 1, 0 and all the values between them.

14:13.280 --> 14:19.120
They can do this because of the superposition principle of quantum physics.

14:19.340 --> 14:28.300
This allows the processor to be able to execute or evaluate multiple choices at the same time.

14:28.300 --> 14:33.920
And, obviously, the quantum processors allow the execution of quantum algorithms.

14:33.920 --> 14:47.140
The quantum algorithms that are related to cryptography are the Gruber's algorithms, which use the quantum superposition principle.

14:47.480 --> 14:56.980
And the use of these algorithms helps us to find elements within an unordered list.

14:56.980 --> 15:06.380
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.

15:06.900 --> 15:15.600
The other algorithm that can represent a threat to the cryptography, to the scriptography, is the source algorithm.

15:15.860 --> 15:20.000
This algorithm is used for finding the prime factors of an integer n.

15:20.000 --> 15:33.140
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.

15:33.140 --> 15:39.760
The use of these two algorithms is related to this table.

15:39.760 --> 15:56.860
We can see how algorithms of 256 bits are reduced to 128, and the same for the keys, and RSA is another case.

15:57.220 --> 16:11.460
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.

16:11.460 --> 16:19.400
So we still have keys or hashes with a length of 256.

16:20.400 --> 16:36.280
The result of this is SHA256 will be broken, IS128 will be also broken, RSA will be broken.

16:36.840 --> 16:48.480
Fortunately, TPM manufacturers know that, and they will implement algorithms that resist quantum computing, or not.

16:48.480 --> 17:02.980
This is the TPM from Infineon, and we can see in the bottom, symmetric cryptographic, the algorithm that it supports.

17:02.980 --> 17:08.160
And there are no SHA2, 512, or SHA3.

17:08.160 --> 17:15.380
So this kind of, or this group of TPMs will be vulnerable in a time.

17:15.380 --> 17:19.560
So what I propose, use reconfigurable devices.

17:19.640 --> 17:33.300
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.

17:33.300 --> 17:47.440
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.

17:48.060 --> 17:54.300
They can be based on FPGAs or other devices, but mostly on FPGAs.

17:54.620 --> 17:57.020
But what is an FPGA?

17:57.020 --> 18:04.080
FPGA is a matrix, it is an integrated circuit, in which inside we can find a matrix of different elements.

18:04.080 --> 18:10.180
We have input and output blocks, and we have a big set of configurable logic blocks.

18:10.180 --> 18:15.180
Also we can find multiplication and accumulation blocks, and block RAM blocks.

18:15.700 --> 18:27.060
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.

18:27.060 --> 18:34.840
And in another part of the FPGA, we can implement an RSA-2048.

18:34.840 --> 18:42.640
These two algorithms are executed, are implemented in different parts of the FPGA, so they can be run in parallel.

18:43.060 --> 18:53.980
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.

18:53.980 --> 19:03.020
For example, the SHA-2 will be converted into SHA-3, which is post-quantum, and RSA can be converted to Kiber.

19:07.680 --> 19:11.760
To test this, I created this project.

19:11.760 --> 19:14.040
I am not trying to sell you anything.

19:14.040 --> 19:21.740
This is an open source project, and it is a hardware secure model based on the AMD Spartan 7 FPGA.

19:21.740 --> 19:35.780
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.

19:35.780 --> 19:40.740
The limitation of the 50 megabits per second is because of this device, because of the device I designed.

19:41.280 --> 19:45.820
We can't reach higher speeds if we, for example, use a PCI communication.

19:46.940 --> 19:54.420
And, obviously, it allows a remote update once it will be deployed.

19:55.680 --> 19:59.280
The advantages of using this kind of HSMs.

19:59.280 --> 20:05.280
Reconfigurability allows to implement or to update the algorithms.

20:05.280 --> 20:19.300
And also, they avoid or allow us to confuse side-channel attacks and timing attacks, because I am implementing the hardware within the device.

20:19.300 --> 20:33.860
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.

20:34.400 --> 20:37.160
And the same for side-channel attacks.

20:37.320 --> 20:50.260
They are able to generate two random numbers, and they allow also to implement or to execute multiple algorithms at the same time.

20:50.260 --> 20:55.400
And also, parallelizable operation modes can be used.

20:56.030 --> 20:57.240
Possible disadvantages.

20:57.240 --> 21:02.220
Okay, FPGAs are primarily based on RAM memory.

21:02.220 --> 21:03.560
This can be fixed.

21:03.840 --> 21:09.700
The design typically will require an external memory in order to store the design.

21:09.700 --> 21:14.400
And usually, they don't incorporate inside a non-volatile memory.

21:14.400 --> 21:16.040
Also, we can fix that.

21:16.040 --> 21:23.620
And regarding the power consumption, FPGAs will consume more than a regular TPM.

21:25.000 --> 21:33.900
However, regarding the handicap, they need an external memory to store the design.

21:34.240 --> 21:42.600
AMD, for example, allows us to encrypt the design with IS-256.

21:42.600 --> 21:51.200
The good side is that the key is stored within the FPGA using fuses, so they cannot be read externally.

21:51.200 --> 22:02.340
Also, if I disable the G-tag interface to avoid anyone reprogramming that FPGA, it will increase the security.

22:02.340 --> 22:14.200
And the encryption key used for the flash memory that stores the design is generated and fused in the manufacturing process of the FPGA.

22:15.400 --> 22:17.940
And regarding the key storage, well, it is easy.

22:17.940 --> 22:28.760
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.

22:28.840 --> 22:36.740
The key, in this case, can be also stored in fuses inside the FPGA, so they can be also write-only.

22:38.080 --> 22:40.420
The encryption key cannot be read.

22:41.120 --> 22:43.200
Real-time cipher.

22:43.200 --> 22:52.300
I said before that I implemented an SPI interface instead of a regular I2C interface.

22:52.300 --> 22:52.640
Why?

22:52.640 --> 22:53.760
Because the speed.

22:54.040 --> 23:02.600
With a SPI interface, we can reach around 50 megabits or even 100 megabits per second.

23:02.600 --> 23:09.460
And it will be very crucial when we are talking about real-time ciphering.

23:10.600 --> 23:12.940
And true random number generation.

23:13.060 --> 23:23.240
I said before that I am writing the hardware which is running inside of the FPGA, which is printed in the FPGA.

23:23.240 --> 23:33.360
So I can control the length between the connection of one logic block to another.

23:33.360 --> 23:43.410
But what I cannot control is the purity of the wafer that the manufacturer uses to print the circuit.

23:43.410 --> 23:59.850
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.

24:00.270 --> 24:12.790
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.

24:14.170 --> 24:22.590
And the use of this kind of HSMs also allows us to create very customized solutions.

24:22.590 --> 24:25.570
In this case, I created a very simple example.

24:25.570 --> 24:33.170
When I have a camera connected through MIPI to one cryptolite, and then the communication with the host will be encrypted.

24:33.290 --> 24:47.550
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.

24:48.670 --> 24:49.730
And that's all.

24:49.810 --> 24:53.490
Thank you very much for being here and thank you to CryptoVillage.

