USUBA, optimizing bitslicing compiler

Usuba is a high-level domain-specific programming language to write high-throughput and constant-time cryptographic primitives, generating low-level C (+ SIMD intrinsics) code, and based on a generalization of bitslicing that we call m-slicing.


Usuba provides high-level abstractions tailored specifically for cryptographic primitives: lookup tables, permutation tables, functions, loops, multi-dimensional arrays...


Usuba uses a generalization of bitslicing that we dub mslicing. Thanks to the parallel nature of mslicing, and the optimizations carried out by our compiler, we achieve performances similar to hand-tuned C/assembly code.


Bitsliced (and msliced) codes have by nature an execution time independent of their inputs, thus making them immune to timing attacks. Furthermore, Usuba can automatically insert countermeasures (higher-order boolean masking) against power-based side-channel attacks.

Dive Deeper into USUBA

Usuba Scientific Papers

Usuba is the fruit of a meticulous research which has been validated by the publication of several peer-reviewed articles:

  • Sonia Belaïd, Pierre-Évariste Dagand, Darius Mercadier, Matthieu Rivain, Raphaël Wintersdorff. Tornado: Automatic Generation of Probing-Secure Masked Bitsliced Implementations. EUROCRYPT 2020. (link)
  • Pantea Kiaei, Darius Mercadier, Pierre-Evariste Dagand, Karine Heydemann, Patrick Schaumont. Custom Instruction Support for Modular Defense against Side-channel and Fault Attacks. COSADE 2020. (link)
  • Darius Mercadier, Pierre-Evariste Dagand. Usuba: High-Throughput and Constant-Time Ciphers, by Construction. PLDI 2019. (link)
  • Darius Mercadier, Pierre-Évariste Dagand, Lionel Lacassagne, Gilles Muller. Usuba, Optimizing & Trustworthy Bitslicing Compiler. WPMVP 2018. (link)

Find more insights into Usuba

The creators of USUBA regularly publish blog posts to help the community better understand how USUBA works. In particular, you can expect posts about bitslicing, compilation, and more!

Read our blog

Ready to dive into the source code?

USUBA is an open-source project. We publish our code on Github, and you are most welcome to visit our repository there.

Go to Github

Let's get in touch!

A question without answer? A remark, comment on the project? An idea to improve USUBA or implement it to build new applications? We would be glad to hear about you.

The easiest way to reach us is to email the main developer of Usuba, Darius Mercadier, whose email is "his name" dot "his last name" at gmail.