1 / 20

AES Encryption Code Generator

AES Encryption Code Generator. Undergraduate Research Project by Paul Magrath. Supervised by Dr David Gregg. Motivation. What is AES? Why is it interesting? Widely used. New intrinsics. Motivation. How do we write optimized code for these new instructions? Problem: Hand coded assembly.

kaloni
Download Presentation

AES Encryption Code Generator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AES Encryption Code Generator Undergraduate Research Project by Paul Magrath. Supervised by Dr David Gregg.

  2. Motivation • What is AES? • Why is it interesting? • Widely used. • New intrinsics. AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  3. Motivation • How do we write optimized code for these new instructions? • Problem: Hand coded assembly. • Solution: A domain specific code generator. AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  4. Motivation • Why a domain specific code generator? • Effective • Proven • Speed • Maintainability • Tunability AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  5. Motivation • So: AES Encryption Code Generator. AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  6. Background • AES-NI arrives in ‘Westmere’ (due 2010) AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  7. AES Code Generator • Takes in input AES encryption loop file. • Generates variants of loop. • Compiles, runs repeatedly and get median of runtimes of each variant. • Reports best variant runtime achieved. AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  8. AES Code Generator AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  9. AES Code Generator • Steaming store • Unwind inner loop • Use local variables • Unwind outer loop • Interleave • Parallel (OpenMP) • Prefetch to cache • Prefetch to register Variant Options AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  10. AES Code Generator • Implementation: • Python wrapper • C++ application • PapiEx integration AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  11. AES Code Generator • Testing: • Intel C Compiler • GNU C Compiler • 32 Bit • 64 Bit • Simulator AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  12. AES Code Generator • Experimental Results from: • Intel Core 2 Quad • Intel Core 2 Duo • Intel Pentium 4 Dual AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  13. Experimental Results • So...what was learnt? AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  14. The Basics Cycles vs Variants Applied Variant Applied AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  15. Unwinding Outer Loop Level of Unwinding and Local Variables AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  16. Parallel – Intel Core 2 Quad Level of Unwinding and Local Variables AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  17. Parallel – Intel Core 2 Duo Level of Unwinding and Local Variables AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  18. Generator Tunability • Intel Core 2 Quad Core (64-bit) • Intel Pentium 4 Dual Processor (64-bit) AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  19. Future Work • Genetic search algorithms. • Intel Shannon. AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

  20. Questions? AES Encryption Code Generator - Paul Magrath - Trinity College, Dublin

More Related