Paper 2025/004

Smaug: Modular Augmentation of LLVM for MPC

Radhika Garg, Northwestern University
Xiao Wang, Northwestern University
Abstract

Secure multi-party computation (MPC) is a crucial tool for privacy-preserving computation, but it is getting increasingly complicated due to recent advancements and optimizations. Programming tools for MPC allow programmers to develop MPC applications without mastering all cryptography. However, most existing MPC programming tools fail to attract real users due to the lack of documentation, maintenance, and the ability to compose with legacy codebases. In this work, we build Smaug, a modular extension of LLVM. Smaug seamlessly brings all LLVM support to MPC programmers, including error messaging, documentation, code optimization, and frontend support to compile from various languages to LLVM intermediate representation (IR). Smaug can efficiently convert non-oblivious LLVM IR to their oblivious counterparts while applying popular optimizations as LLVM code transformations. With benchmarks written in C++ and Rust and backends for Yao and GMW protocols, we observe that Smaug performs as well as (and sometimes much better than) prior tools using domain-specific languages with similar backends. Finally, we use Smaug to compile open-source projects that implement Minesweeper and Blackjack, producing usable two-party games with ease.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Preprint.
Keywords
MPCCompilerLLVM
Contact author(s)
radhikaradhika2028 @ u northwestern edu
wangxiao @ northwestern edu
History
2025-01-01: approved
2025-01-01: received
See all versions
Short URL
https://ia.cr/2025/004
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2025/004,
      author = {Radhika Garg and Xiao Wang},
      title = {Smaug: Modular Augmentation of {LLVM} for {MPC}},
      howpublished = {Cryptology {ePrint} Archive, Paper 2025/004},
      year = {2025},
      url = {https://eprint.iacr.org/2025/004}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.