skip to main content
10.1145/3178433.3178437acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
research-article

Usuba: Optimizing & Trustworthy Bitslicing Compiler

Published:24 February 2018Publication History

ABSTRACT

Bitslicing is a programming technique commonly used in cryptography that consists in implementing a combinational circuit in software. It results in a massively parallel program immune to cache-timing attacks by design.

However, writing a program in bitsliced form requires extreme minutia. This paper introduces Usuba, a synchronous dataflow language producing bitsliced C code. Usuba is both a domain-specific language -- providing syntactic support for the implementation of cryptographic algorithms -- as well as a domain-specific compiler -- taking advantage of well-defined semantics invariants to perform various optimizations before handing the generated code to an (optimizing) C compiler.

On the Data Encryption Standard (DES) algorithm, we show that Usuba outperforms a reference, hand-tuned implementation by 15% (using Intel's 64 bits general-purpose registers and depending on the underlying C compiler) whilst our implementation also transparently supports modern SIMD extensions (SSE, AVX, AVX-512), other architectures (ARM Neon, IBM Altivec) as well as multicore processors through an OpenMP backend.

References

  1. Specification for the advanced encryption standard (aes). Federal Information Processin Standards Publication 197, 2001.Google ScholarGoogle Scholar
  2. R. Anderson, E. Biham, and L. Knudsen. Serpent: A proposal for the advanced encryption standard. In AES, 1998.Google ScholarGoogle Scholar
  3. K. Aoki, T. Ichikawa, M. Kanda, M. Matsui, S. Moriai, J. Nakajima, and T. Tokita. Camellia: A 128-bit block cipher suitable for multiple platforms - design and analysis. In SAC, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Z. Bao, P. Luo, and D. Lin. Bitsliced implementations of the PRINCE, LED and RECTANGLE block ciphers on AVR 8-bit microcontrollers. In ICICS, 2015.Google ScholarGoogle Scholar
  5. D. J. Bernstein. Cache-timing attacks on AES. Technical report, 2005. URL https://cr.yp.to/antiforgery/cachetiming-20050414.pdf.Google ScholarGoogle Scholar
  6. D. Biernacki, J.-L. Colaço, G. Hamon, and M. Pouzet. Clock-directed modular code generation for synchronous data-flow languages. LCTES, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. E. Biham. A fast new DES implementation in software. In FSE, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Cassagne, B. L. Gal, C. Leroux, O. Aumage, and D. Barthou. An efficient, portable and generic library for successive cancellation decoding of polar codes. In LCPC, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. L. Dagum and R. Menon. OpenMP: An Industry-Standard API for Shared-Memory Programming. IEEE Comput. Sci. Eng., 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. W. Dai. Crypto++ library 5.6. 0, 2009.Google ScholarGoogle Scholar
  11. P. Estérie, J. Falcou, M. Gaunard, and J. Lapresté. Boost.simd: generic programming for portable simdization. In WPMVP, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. Gaubatz and B. Sunar. Leveraging the multiprocessing capabilities of modern network processors for cryptographic acceleration. In NCA, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. N. Halbwachs, P. Caspi, P. Raymond, and D. Pilaud. The synchronous dataflow programming language Lustre. Proceedings of the IEEE, 1991.Google ScholarGoogle ScholarCross RefCross Ref
  14. P. Karpinski and J. McDonald. A high-performance portable abstract interface for explicit SIMD vectorization. In PMAM@PPoPP, 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. E. Käsper and P. Schwabe. Faster and timing-attack resistant AESGCM. CHES, 2009.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Kretz. Extending C++ for explicit data-parallel programming via SIMD vector types. PhD thesis, Goethe University Frankfurt am Main, 2015.Google ScholarGoogle Scholar
  17. M. Kwan. Bitslice DES, 1998. URL http://www.darkside.com.au/bitslice/.Google ScholarGoogle Scholar
  18. R. Leißa, I. Haffner, and S. Hack. Sierra: a SIMD extension for C++. In WPMVP, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Menezes, P. C. van Oorschot, and S. A. Vanstone. Handbook of Applied Cryptography. CRC Press, 1996. ISBN 0-8493-8523-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Peslyak and R. Rusakov. John the Ripper 1.7.8: DES speedup, 2011. URL http://www.openwall.com/lists/john-users/2011/06/22/1.Google ScholarGoogle Scholar
  21. A. Pnueli, M. Siegel, and E. Singerman. Translation validation. In TACAS, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. T. Pornin. Implantation et optimisation des primitives cryptographiques. PhD thesis, Laboratoire d'Informatique de l'École Normale Supérieure, 2001.Google ScholarGoogle Scholar
  1. Usuba: Optimizing & Trustworthy Bitslicing Compiler

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      WPMVP'18: Proceedings of the 2018 4th Workshop on Programming Models for SIMD/Vector Processing
      February 2018
      68 pages
      ISBN:9781450356466
      DOI:10.1145/3178433

      Copyright © 2018 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 24 February 2018

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      WPMVP'18 Paper Acceptance Rate8of12submissions,67%Overall Acceptance Rate20of30submissions,67%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader