Compiler Support for Constant-Time Programs in LLVM

dc.contributor.authorAghakishiyev, Mehdi
dc.date.accessioned2025-07-21T17:33:48Z
dc.date.available2025-07-21T17:33:48Z
dc.date.issued2025-07-21
dc.date.submitted2025-07-15
dc.description.abstractSide-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.urihttps://hdl.handle.net/10012/22027
dc.language.isoen
dc.pendingfalse
dc.publisherUniversity of Waterlooen
dc.subjectstatic analysis
dc.subjectconstant-time code
dc.subjectside-channel attacks
dc.subjectprogram transformations
dc.subjectLLVM
dc.titleCompiler Support for Constant-Time Programs in LLVM
dc.typeMaster Thesis
uws-etd.degreeMaster of Mathematics
uws-etd.degree.departmentDavid R. Cheriton School of Computer Science
uws-etd.degree.disciplineComputer Science
uws-etd.degree.grantorUniversity of Waterlooen
uws-etd.embargo.terms0
uws.comment.hiddenHi, 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.advisorXu, Meng
uws.contributor.advisorAsokan, N.
uws.contributor.affiliation1Faculty of Mathematics
uws.peerReviewStatusUnrevieweden
uws.published.cityWaterlooen
uws.published.countryCanadaen
uws.published.provinceOntarioen
uws.scholarLevelGraduateen
uws.typeOfResourceTexten

Files

Original bundle

Now showing 1 - 1 of 1
No Thumbnail Available
Name:
Aghakishiyev_Mehdi.pdf
Size:
363 KB
Format:
Adobe Portable Document Format

License bundle

Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
6.4 KB
Format:
Item-specific license agreed upon to submission
Description: