Compiler Support for Constant-Time Programs in LLVM
dc.contributor.author | Aghakishiyev, Mehdi | |
dc.date.accessioned | 2025-07-21T17:33:48Z | |
dc.date.available | 2025-07-21T17:33:48Z | |
dc.date.issued | 2025-07-21 | |
dc.date.submitted | 2025-07-15 | |
dc.description.abstract | Side-channel attacks aim to extract sensitive information by monitoring the additional information generated during program execution, such as execution time or power consumption. Certain coding patterns, such as using secret data in control flow and memory addressing instructions, cause the execution time of the program to vary based on secret input, making the program vulnerable to timing-based side-channel attacks. Constant-time programming offers a defense against such attacks; however, it is difficult to implement manually as it requires tracking secret data through complex program logic. In this thesis, we propose an automated approach to generate constant-time programs based on static analysis and program transformations. First, we use taint tracking to monitor the flow of secret input through the program and mark branching and memory addressing instructions that depend on secret data. Then, we apply program transformation techniques such as branch linearization to remove these dependencies and produce constant-time code. We perform our analysis and transformations on LLVM IR and implement our tool as part of the LLVM Pass Infrastructure. To evaluate our tool’s effectiveness, we apply our analysis and transformations to programs from the OISA benchmark. We validate our results through BliMe, an architecture performing hardware-enforced taint tracking to prevent side-channel attacks. | |
dc.identifier.uri | https://hdl.handle.net/10012/22027 | |
dc.language.iso | en | |
dc.pending | false | |
dc.publisher | University of Waterloo | en |
dc.subject | static analysis | |
dc.subject | constant-time code | |
dc.subject | side-channel attacks | |
dc.subject | program transformations | |
dc.subject | LLVM | |
dc.title | Compiler Support for Constant-Time Programs in LLVM | |
dc.type | Master Thesis | |
uws-etd.degree | Master of Mathematics | |
uws-etd.degree.department | David R. Cheriton School of Computer Science | |
uws-etd.degree.discipline | Computer Science | |
uws-etd.degree.grantor | University of Waterloo | en |
uws-etd.embargo.terms | 0 | |
uws.comment.hidden | Hi, I have a job offer starting on August 4, and I need a degree completion letter to apply for a work permit and get application confirmation before my start date. I would really appreciate it if the submission process could be expedited so that I can get the degree completion letter as soon as possible. | |
uws.contributor.advisor | Xu, Meng | |
uws.contributor.advisor | Asokan, N. | |
uws.contributor.affiliation1 | Faculty of Mathematics | |
uws.peerReviewStatus | Unreviewed | en |
uws.published.city | Waterloo | en |
uws.published.country | Canada | en |
uws.published.province | Ontario | en |
uws.scholarLevel | Graduate | en |
uws.typeOfResource | Text | en |