start	end	text
0	1580	Hello, everybody.
1580	5260	Thank you for being here today in this session.
5700	9140	In this presentation, we're going to talk about security.
9500	18320	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.
18420	22880	We're going to talk about keys, hashes, and DPMs.
23240	29500	Also, we're going to talk about the future threats that can essentially break them.
29500	32300	For example, quantum computing.
32580	46900	Also, at the end of the presentation, I want to propose you to use reconfigurable devices to be in charge of that security.
47160	69040	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.
69200	72100	But first of all, let me introduce myself.
72600	77800	I have to say that I am the freak on that conference because I am not a software developer.
77800	80280	I am an FPGA designer.
80280	97100	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.
97540	98820	I also write on the Internet.
98820	100060	You can read me.
100520	101480	Sorry?
103020	104380	Better?
104680	107520	Ah, thanks.
107520	110500	Okay, I also write on the Internet.
110500	118520	You can read me on Hackster, X, Hackaday, and also on my own blog, controlpath.com.
119200	127800	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.
128540	132520	Well, first we're going to talk about the privacy protectors.
132520	139560	The privacy protectors, now we can find hash algorithms and keys.
139560	147060	Regarding hash algorithms, we have MD5 and the SHA family, SHA1, 2, and 3.
147060	151100	If you're still using MD5 or SHA1, you are in the correct talk.
151100	158340	Regarding the keys, we have RSA, we have Kyber, and we have IS.
158340	161860	We're going to see how they work very quickly.
162280	175940	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.
176640	188520	The key is that a very small change in the input string will produce a big change in the output string.
188520	197840	So they can be used in order to verify if a file has been changed in the transmission or not.
198780	203020	As I said before, we have different hash algorithms.
203020	208820	We have MD5 and the SHA family, 0, 1, 2, and 3.
208820	216200	Now, only SHA2 and SHA3 are still alive.
216200	228920	The first one that was broken was SHA0 in 1999, then MD5, and the last one broken was SHA1.
229100	244180	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.
244180	246180	This is known as a collision.
246180	249900	Nowadays, SHA2 and SHA3.
249900	258520	But if we add a new player, like quantum computing, only SHA3 will be alive.
258920	262860	Regarding the keys, keys are essentially passwords.
262860	268080	They are passwords that I can use to encrypt a file or encrypt some information.
268860	277960	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.
278140	281200	When I talk about data, I'm not talking about just files.
281200	286180	I'm talking about real-time data, for example, in TLS communications or SSH.
286180	291140	It's data that I send and receive in real time.
291140	293600	We have two types of keys.
293600	297280	We have symmetric keys and asymmetric keys.
297700	300760	Regarding symmetric keys are the easiest ones.
301360	307100	There's only one key for encrypt and the same key for decrypt.
307260	315760	The problem here is the way in which the creator of the key shares the key with all the recipients.
317980	323740	To fix that, we have the asymmetric keys or asymmetric encryption.
323780	325960	We have two different keys.
325960	327700	We have a pair of keys.
327700	333260	One key is used for encrypting the data and the other one is used for decrypting the data.
333260	337200	And the password used for decrypting the data cannot encrypt the data.
337200	349020	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.
350400	357140	All of these algorithms are just math and some logic.
357560	364740	The names like Rindle, Diffie-Hellman, Chacha and Salsa are the names of that algorithm.
364740	369880	As I said, they are based on mathematical and logic operations.
370840	376140	Key of that algorithm is the performance of them.
376160	383300	The performance is the speed of how quick they can encrypt and decrypt data.
383300	388220	And this is very important if we are performing real-time ciphering.
388220	393580	For example, in the case of the TLS or SSH.
393820	398180	So we don't talk just about algorithms.
398180	402920	We also talk about the way in which we calculate the cipher.
402920	406020	We encrypt the data or we decrypt the data.
406240	411160	This is known as the operation mode and it is critical, for example, for IS encryption.
413780	419900	Okay, so we have the algorithm that we know now that are based on mathematical and logic operations.
419900	421760	We need to make them a reality.
421760	424560	We need to implement them.
424560	429540	We have two different ways of implementing these kinds of algorithms.
430000	433740	We have the software implementation and the hardware implementation.
433740	434660	The software is easy.
434660	443940	It is the usual way in which we write the code in order to solve all the mathematical operations.
443940	459500	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.
461620	463820	Okay, regarding the software implementation.
464640	467680	As I said before, the implementation is made by code.
467680	469780	C, Python, whatever.
470640	477860	The performance that we can reach with this kind of implementation is very poor.
477980	478440	Why?
478440	488860	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.
489700	492080	In addition, we have the operating system.
492080	510460	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...
510460	513180	well, the performance is not good.
514040	515400	Manufacturers know that.
515400	521420	So what they do is implement the processor extension.
521420	524600	These are pieces of hardware that are near to the processor.
524600	528580	We have processor extensions to calculate SHA, to calculate I.
528580	533680	The SHA is the SHA-ni and the IS is the IS-ni.
534020	540340	Another key of that kind of software implementation is that the keys have been stored in the hard disk.
540340	549720	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.
551460	558740	One thing that makes these software implementations very useful is that they are very easy to update.
558740	570420	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.
570500	575940	However, this is not all good.
575940	584400	As I said, the implementation of the algorithms made in bytecode has a very poor performance.
584400	593280	Also, yes, we can use the processor extension, but in this case we are going to create a dependency of the processor.
593280	609000	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.
609000	618900	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.
619900	624160	Keys stored in hard disks are absolutely not secure.
624160	630620	And the same for the easy-to-update, another player can update the software in order to make them vulnerable.
632420	636060	The other implementation we talked about is hardware implementation.
636060	644260	When I talk about hardware implementation, I talk about using an external device to execute the algorithms, which is great.
644700	653880	This allows us to store the keys very securely, because those keys can be read and write only.
653880	662060	So I can send the key and then no one will be able to read the same key.
663900	675040	The hardware used in these cases are made by manufacturers that implement algorithms that are widely used.
675400	690560	For example, usually all the hardware of this type implements SHA-2, SHA-256 normally, and ICE up to SHA-256.
690600	697160	And finally, it is true that we eliminate the dependency of the CPU.
697720	711780	However, using an external device to execute the different cryptographic algorithms is more than executing these cryptographic algorithms in other processors.
711780	723220	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.
723600	727880	And standardize the algorithms used.
728640	738300	As I said, the manufacturer wants to sell the hardware, so they will implement the widely used algorithms.
740260	747580	One of that hardware is the well-known TPM, Structured Platform Modules.
747580	753260	They are cryptographic coprocessors usually integrated in the same motherboard.
753600	760660	They allow secure storage for keys and they include a set of cryptographic functions.
761260	766540	Nowadays we have two important versions, TPM 1.2 and TPM 2.0.
766540	779120	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.
782470	792630	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.
792630	799790	We can read, one problem that begs the developers for a long time was how to integrate multiple hash algorithms.
799790	804030	If one of those hash algorithms was later broken.
804510	811670	We have seen that the hash algorithms will be broken.
812070	813250	Ever.
816500	821180	And what can break those algorithms?
821180	826260	Well, for now, the most important threat is the quantum threat of quantum computing.
826260	834540	Quantum computing is a new computational mode that is based on quantum physics.
835260	840900	It uses the traditional bits that we can find in a regular computer.
841540	844400	They can take values of 1 or 0.
844400	853280	Quantum computing uses quantum bits or qubits that can take values of 1, 0 and all the values between them.
853280	859120	They can do this because of the superposition principle of quantum physics.
859340	868300	This allows the processor to be able to execute or evaluate multiple choices at the same time.
868300	873920	And, obviously, the quantum processors allow the execution of quantum algorithms.
873920	887140	The quantum algorithms that are related to cryptography are the Gruber's algorithms, which use the quantum superposition principle.
887480	896980	And the use of these algorithms helps us to find elements within an unordered list.
896980	906380	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.
906900	915600	The other algorithm that can represent a threat to the cryptography, to the scriptography, is the source algorithm.
915860	920000	This algorithm is used for finding the prime factors of an integer n.
920000	933140	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.
933140	939760	The use of these two algorithms is related to this table.
939760	956860	We can see how algorithms of 256 bits are reduced to 128, and the same for the keys, and RSA is another case.
957220	971460	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.
971460	979400	So we still have keys or hashes with a length of 256.
980400	996280	The result of this is SHA256 will be broken, IS128 will be also broken, RSA will be broken.
996840	1008480	Fortunately, TPM manufacturers know that, and they will implement algorithms that resist quantum computing, or not.
1008480	1022980	This is the TPM from Infineon, and we can see in the bottom, symmetric cryptographic, the algorithm that it supports.
1022980	1028160	And there are no SHA2, 512, or SHA3.
1028160	1035380	So this kind of, or this group of TPMs will be vulnerable in a time.
1035380	1039560	So what I propose, use reconfigurable devices.
1039640	1053300	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.
1053300	1067440	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.
1068060	1074300	They can be based on FPGAs or other devices, but mostly on FPGAs.
1074620	1077020	But what is an FPGA?
1077020	1084080	FPGA is a matrix, it is an integrated circuit, in which inside we can find a matrix of different elements.
1084080	1090180	We have input and output blocks, and we have a big set of configurable logic blocks.
1090180	1095180	Also we can find multiplication and accumulation blocks, and block RAM blocks.
1095700	1107060	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.
1107060	1114840	And in another part of the FPGA, we can implement an RSA-2048.
1114840	1122640	These two algorithms are executed, are implemented in different parts of the FPGA, so they can be run in parallel.
1123060	1133980	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.
1133980	1143020	For example, the SHA-2 will be converted into SHA-3, which is post-quantum, and RSA can be converted to Kiber.
1147680	1151760	To test this, I created this project.
1151760	1154040	I am not trying to sell you anything.
1154040	1161740	This is an open source project, and it is a hardware secure model based on the AMD Spartan 7 FPGA.
1161740	1175780	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.
1175780	1180740	The limitation of the 50 megabits per second is because of this device, because of the device I designed.
1181280	1185820	We can't reach higher speeds if we, for example, use a PCI communication.
1186940	1194420	And, obviously, it allows a remote update once it will be deployed.
1195680	1199280	The advantages of using this kind of HSMs.
1199280	1205280	Reconfigurability allows to implement or to update the algorithms.
1205280	1219300	And also, they avoid or allow us to confuse side-channel attacks and timing attacks, because I am implementing the hardware within the device.
1219300	1233860	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.
1234400	1237160	And the same for side-channel attacks.
1237320	1250260	They are able to generate two random numbers, and they allow also to implement or to execute multiple algorithms at the same time.
1250260	1255400	And also, parallelizable operation modes can be used.
1256030	1257240	Possible disadvantages.
1257240	1262220	Okay, FPGAs are primarily based on RAM memory.
1262220	1263560	This can be fixed.
1263840	1269700	The design typically will require an external memory in order to store the design.
1269700	1274400	And usually, they don't incorporate inside a non-volatile memory.
1274400	1276040	Also, we can fix that.
1276040	1283620	And regarding the power consumption, FPGAs will consume more than a regular TPM.
1285000	1293900	However, regarding the handicap, they need an external memory to store the design.
1294240	1302600	AMD, for example, allows us to encrypt the design with IS-256.
1302600	1311200	The good side is that the key is stored within the FPGA using fuses, so they cannot be read externally.
1311200	1322340	Also, if I disable the G-tag interface to avoid anyone reprogramming that FPGA, it will increase the security.
1322340	1334200	And the encryption key used for the flash memory that stores the design is generated and fused in the manufacturing process of the FPGA.
1335400	1337940	And regarding the key storage, well, it is easy.
1337940	1348760	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.
1348840	1356740	The key, in this case, can be also stored in fuses inside the FPGA, so they can be also write-only.
1358080	1360420	The encryption key cannot be read.
1361120	1363200	Real-time cipher.
1363200	1372300	I said before that I implemented an SPI interface instead of a regular I2C interface.
1372300	1372640	Why?
1372640	1373760	Because the speed.
1374040	1382600	With a SPI interface, we can reach around 50 megabits or even 100 megabits per second.
1382600	1389460	And it will be very crucial when we are talking about real-time ciphering.
1390600	1392940	And true random number generation.
1393060	1403240	I said before that I am writing the hardware which is running inside of the FPGA, which is printed in the FPGA.
1403240	1413360	So I can control the length between the connection of one logic block to another.
1413360	1423410	But what I cannot control is the purity of the wafer that the manufacturer uses to print the circuit.
1423410	1439850	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.
1440270	1452790	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.
1454170	1462590	And the use of this kind of HSMs also allows us to create very customized solutions.
1462590	1465570	In this case, I created a very simple example.
1465570	1473170	When I have a camera connected through MIPI to one cryptolite, and then the communication with the host will be encrypted.
1473290	1487550	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.
1488670	1489730	And that's all.
1489810	1493490	Thank you very much for being here and thank you to CryptoVillage.
