• CONTACT
  • ABOUT ME
  • BLOG POSTS
  • PROJECTS
  • WORK / EXPERIENCE
  • EMSYS / CYBERSEC
back
Firmware Engineer / Security Enthusiast
Blog

Waves In A Box

Advent of Code 2021

Advent of Code 2020

Roambt-er

Master's Thesis: Side-channel Analysis on Post-Quantum Key-Encapsulation Mechanism

Waves In A Box, a 3D artwork that explores the boundary between chaos and serenity. A fully GPU-accelerated wavefront simulation 💧 programmed in C and rendered using OpenGL.

The yearly programming challenge Advent of Code 2021. This year done in the amazing language of Rust 🦀. My solutions are able to solve all puzzles under a total of only half a second! 🚀

The yearly programming challenge Advent of Code 2020. This year done in the purely functional programming language Haskell .

Roambot-er, an online competitive tank game that teaches students how to make a decision tree based AI. Used during the University of Twente Open Days as a workshop for prospective students.

How do you secure post-quantum cryptography schemes against vulnerabilities exposed by side-channels? In my master's thesis, I successfully attacked CRYSTALS-Kyber with power side-channel analysis. My work was praised by experts in the field and was awarded a grade of 9.0 for my efforts. You can read my thesis or you can check my blog post

I'm fascinated by Cyber Security and Embedded Systems.

I have a keen interest in Cyber Security. To sharpen my toolbox, I have spent a significant amount of time on HackTheBox.com. and followed several master courses on Cyber Security and Software Reliability. For my master's thesis I combined Embedded Systems and Cybersecurity knowledge. You can read more about my thesis here!

I pursued an Embedded Systems master's track after finishing my Technical Computer Science bachelor, drawn to the blend of high-performance hardware software. I enjoy working on projects that reach outside of the virtual domain by influencing the persistent physical world around them. I am most happy when I get to engage in tightly integrated hardware and software with some cyber security sprinkled on top.

Hi! I'm Jelle Meijer and I am passionate about
< />

Fascinated by the intersection of innovative technology and real-world application. I am an Embedded Systems Engineer (M.Sc.) with a dedicated focus on cybersecurity. I excel at solving complex digital challenges, particularly those requiring seamless hardware-software integration and security.

Throughout various activities I have gathered experience in various techniques and applications. This has lead me to assume roles as Embedded Developer and Master's Course Curator, allowing me to inspire and educate in different domains.

But my enthusiasm doesn't stop there! I also like to channel my creative energies into various side-projects, including the very website you are exploring right now.

CAREER EXPERIENCE:

  • 2024-2025 Lead Embedded Software Role @ S.S.T. Hardware
  • 2022-2023 Lab Assistant @ University of Twente
  • 2018-2023 Teacher Assistant @ University of Twente
  • 2020-2021 High School Exam Tutor @ Klassestudent

EDUCATION AND ACHIEVEMENTS:

  • Successfully Executed Side-Channel Hardware Attack on Post-Quantum Cryptography Candidate (Master's thesis - Grade 9.0 )
  • 2020-2023 Master Embedded Systems (University of Twente)
  • 2016-2020 Bachelor Technical Computer Science (University of Twente)
  • 2010-2016 Bilingual Pre-university Education (Marnix College)
  • IB English Language and Literature
  • IKO level1 Kitesurf Instructor

TECH PROFICIENCIES:

C
haskell
haskell
linux
python
docker
rust
stm32
vhdl
Kali Linux

Surfing is my pastime activity.

One of my greatest passions, in addition to taking on technical challenges, is immersing myself in the ocean. I have a deep love for water sports, particularly surfing and kitesurfing.

In fact, my enthusiasm for kitesurfing has led me to become a certified kitesurf instructor. There's nothing quite like the exhilaration of riding the waves and harnessing the power of the wind 💨.

Shredding Time

Breaking Post-Quantum Cryptography with Side-channels

Hello! A little more than a year ago I got the opportunity to work on a very exciting Thesis subject for my Master's in Embedded Systems at the University of Twente. I got to attack a post-quantum cryptographic algorithm with a hardware attack that I designed. In this article explain in layman terms why we care about post-quantum cryptography and how such an attack would work.
2025-04-10
Read more...

Using FreeRTOS with C++

Coming soon...
2025-XX-XX
Read more...

Hiearchical State-Machines in Embedded Systems

Coming soon...
2025-XX-XX
Read more...

Hardware Hacking: Breaking Post-Quantum Encryption Using Side-Channel Analysis

Using Power Side-Channel Analysis to Break one of NIST's Post-Qunatum Cryptography Candidates: CRYSTALS-Kyber.

Hello! A little more than a year ago I got the opportunity to work on a very exciting Thesis subject for my Master's in Embedded Systems at the University of Twente. I got to attack a post-quantum cryptographic algorithm with a hardware attack that I designed. In this article explain in layman terms why we care about post-quantum cryptography and how such an attack would work.

What is Post-Quantum Cryptography?

Quantum computer's are becoming an ever more prevalent threat to our current cryptographic standards. I'll spare you the details of exactly how quantum computer's are able to break most of our current-day encryption. Just know, that our cryptographic algorithms are based on mathematical problems which are hard for classical computer's to solve. But some of these problem's can relatively easy be solved using quantum algorithms, effectively breaking or severely weakening current cryptographic standards. A prime example of this would be Shor's algorithm, which is able to solve the prime factorization problem. This would mean that suddenly those numbers on your bank account might fade into non-existence, when somebody with a quantum computer decides that they are of their interest.


So to answer the question "What is post-quantum cryptography?". Post-quantum cryptography are cryptographic algorithms which are based upon problems on which we have convincing evidence that they are difficult problems for quantum computers as well. NIST (National Institute of Standards and Technology) has started a public competition for finding and standardizing post-quantum cryptography algorithms. All with the goal to prevent our digital infrastructure from collapsing when quantum computer's become powerful enough to break current-day cryptography. I designed a custom attack that targetted one of the competition's winners: CRYSTALS-Kyber.

Hardware Hacking Using Side-Channel Analysis

ChipWhisperer-Lite

Hardware hacking is an unconvential technique where the underlying hardware of a system is part of the attack vector. The nature of these attacks often require physical access to the victim device. Back in the day, hardware attacks where not considered much of a concern as computers where scarce and not easily accessible. However with the ever increasing number of embedded devices, these attacks are becoming more and more relevant. A theoretical unbreakable cryptographic algorithm could still be exploited, not by focussing on the algorithm itself, but instead by focussing on the underlying hardware itself.

To illustrate such a technique, I would like to introduce you to side-channel analysis. Side-channel analysis is a technique where the side-channels of hardware is analyzed to recover secret information. On a very basic level, when a processor is working with (possibly secret) data it is unintentially releasing extra information that sometimes is linked to the underlying data. We call the channels that such information is leaked through, side-channels. Typical examples of side-channels are electricity consumption, heat, temperature, sound and electromagnetic radiation.

In context of cryptographic algorithms operating on secret data, it is sometimes possible to use this source of extra information to infer things about the secret data. This in turn can then be used by attackers to play outside of the box and break cryptographic algorithms by observing the hardware the algorithm is operating on.

My custom side-channel attack on CRYSTALS-Kyber

Finding a vulnerable critical-section

To perform a side-channel attack, we need to identify critical sections where operations are performed on the secret data. One of the last steps of the algorithm is to multiply coefficients by a constant followed by montgomery reduction (modulo operation). This is done in a function called fqmul(a,b). Where the result is a times b followed by modulo 3329. In the last step b is a constant and a is data that contains information about the secret key.

This therefore, could be a prime target for a side-channel analysis attack! In my attack I focused on the power side-channel. This is power consumption of the chip while it is performing operations. With a clever oscilloscope and a shunt-resistor it is possible to measure the power as the chip performs its operations. By cross-referencing the power measurements the operations that the chip performs, we might learn something about the data that is being operated on. In side-channel analysis the hamming-weight is often used to model the power leakage of an intermediate variable. The hamming-weight is the number of bits which are set to '1's. So the hamming-weight of 0001 would be 1 and the hamming weight of 1011 would be 3. The assumption for this model, is that the power leakage of is proportional to the number of set bits.

During my research, I analyzed the fqmul function and found that the hamming-weight of the function's output had a relation to the power leakage. In the Figure 1 you can see that the lower the hamming-weight the lower power consumption (Note: the more negative the value on the y-axis, the higher the power consumption). This makes fqmul a prime target for a side-channel analysis attack.

Figure 1: Power consumption is correlated to the hamming weight of the output of fqmul

Correlation power analysis (CPA)

The primary technique used in this attack is Correlation Power Analysis (CPA). CPA is a clever technique making use of Pearsons' correlation coefficient.

First step, we have to define a theoretical leakage model. This is a model that relates the secret (sub)key to the power consumption. In many cases, the hamming-weight is used as part of this model. Alternative more complex techniques use deep-learning to obtain a leakage model. And many more method exist.

Second step, with the model defined, we can then perform many side-channel measurements of the chip performing its operation. We do many measurements for different input values where the chip operates on the secret data.

Third and most important step, we perform Correlation Power Analysis. The power measurements we have obtained, are generally very noisy and impossible to analyze by simple techniques. We take all power samples and our model, then we compute the Pearson's correlation coefficient for all samples related to our leakage-model. We do this for every possible value of (sub)key. We are effectively, guessing for all keys what the right key should be. Figure 2 shows a power trace with the computed Pearson's correlation coefficients next to it. Notice that the coefficients indicate a strong negative correlation between samples 100 and 120.

Figure 2: Pearon's correlation coefficient

Now we have many correlation values, how does this help us with determing the secret (sub)key. Remember, that we have a model which loosely reflects the power consumption of different (sub)key values. If our model is correct, then we would expect the power measurements on average to be higher when our model also outputs higher values. We feed our model with a guess for a (sub)key value, and then use the correlation coefficient to check whether it is correlated to the power measurements. If our guess for the (sub)key is wrong, we would expect to see no correlation. But the opposite is also true, if our (sub)key guess was correct, we would expect to see some correlation. And as a result, we know that we guessed the correct (sub)key!

Performing the attack

Now with all steps in place, we can perform the attack. We take our ChipWhisperer-Lite setup to measure power leakage accurately. We let the chip perform the operation and capture a power trace. Next we use our model together with the measurements to obtain the correlation coefficients. Finally pick the guess which showed to have the strongest correlation. And now we are done!... well in an ideal world.

Because of noise in the power consumption and general non-determinism of mcu operations, we have to measure many times. From hundreds to million of traces. A side-channel analysis attack's effectiveness, is generally measured in the number of traces required to obtain the secret key. The partial guessing entropy (PGE), is the distance that we are from the actual key during an attack. The higher the PGE, the further away we are from the true key. If this value is 0, then we have found the true key. We can plot the PGE against the number of traces. Doing this, we can hopefully see the PGE get lower as we obtain and analyze more traces. In Figure 3 you can see a graph of the PGE as function of number of traces for my attack. After less than 50 power traces the full secret key has been recovered. Showing experimentally, that the attack indeed is capable of obtaining the secret key for CRYSTALS-Kyber by means of power side-channel analysis.

Figure 3: PGE as function of # of traces for custom attack.

Conclusion

Even though retrieving the secret key within 50 traces is impressive, keep in mind that we are dealing with a simplified attack scenario. The attack was only performed on two different chips with different chipsets. (ARM and RISCV). In practice, the environment is less ideal and there may be specific conditions required to perform the attack. The hardware or algorithm may have been specialized to counteract side-channel attacks. Furthermore, an attacker requires physical access to the device with specialized measuring equipment. This already makes the attack hard to execute in practice. This however, does not take away from the importance of analyzing side-channel security of prospective cryptographic algorithms. Attack's like this might very help in shaping countermeasures which ensure robustness of post-quantum cryptography.

I hope that you enjoyed my very simplified write-up about my research on side-channel analysis on CRYSTALS-Kyber. If you want a more structured detailed explanation, feel free to read read my Master's Thesis.


Hierarchical State-Machines in Embedded Systems


Coming soon...

Using FreeRTOS with C++


Coming soon...