cryptography on gpu

18
Cryptography on GPUs Erdem Sarılı İzmir Institute of Technology April 8th, 2011 İzmir

Upload: bassictr

Post on 27-Nov-2014

174 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Cryptography on GPU

Cryptography on GPUs

Erdem Sarılı

İzmir Institute of TechnologyApril 8th, 2011

İzmir

Page 2: Cryptography on GPU

2

Outline

• GPU– Architecture– Programming Principles & Programmability– Future Trends

• GPU Cryptography– Motivation– Ciphers

• GPU vs CPU Results• Conclusion• QuestionsApril 8th, 2011

Page 3: Cryptography on GPU

3

GPU: Architecture• Thread Processors,

Multiprocessors• SIMD mode• Special Function units• Synchronization: MP, TP• 2 Level Parallelism• Synchronization: Hardware

Support• Memory: Local, Device

Host• Context Switching

April 8th, 2011

•Wolfe, Michael. “Compilers and More: GPU Architecture and Applications”, 2008.•Owens, John & Davis ,UC. “GPU Architecture Overview”, 2007•Kilgariff, Emmett & Fernando, Randima. “The GeForce 6 Series GPU Architecture”, 2005. •Buck, Ian & Purcell Tim. “A Toolkit For Computation on GPUs”, 2004.

Page 4: Cryptography on GPU

4

GPU: Programming Principles & Programmability

• Compute Intensity / Arithmetic Intesity“Getting good performance on today's accelerators depends on selecting a region that has enough work to amortize the overhead of moving data between the host and accelerator.”[1]

• Data Parallelism“GPU is designed as a throughput engine; it's designed to get a lot of work done on a lot of data, all very quickly, all in parallel”[2]

• Data Locality“The memory is designed for efficient access to contiguous blocks of memory, meaning adjacent threads using adjacent data. Your program will run noticeably slower if it does random memory fetches...”[2]

April 8th, 2011

[1] Wolfe, Michael. “Compilers and More: A GPU and Accelator Programming Model Applications”, 2008.[2] Wolfe, Michael. “Compilers and More: GPU Architecture and Applications”, 2008.

Page 5: Cryptography on GPU

5

GPU: Programming Principles & Programmability

• Programming Units: Kernels

April 8th, 2011

Buck, Ian & Purcell Tim. “A Toolkit For Computation on GPUs”, 2004.

Page 6: Cryptography on GPU

6

GPU: Programming Principles & Programmability

• Nvidia CUDA

• AMD Accelerated Parallel Processing (APP) SDK (formerly ATI Stream)

April 8th, 2011

Page 7: Cryptography on GPU

7

GPU: Future Trends

• Increasing Number of Cores– Nvidia Fermi: 512 cores, Cache Leveling,

Concurrent Kernel Execution, ECC• APU: CPU + GPU– AMD Fusion– INTEL Sandy Bridge

April 8th, 2011

Page 8: Cryptography on GPU

8

GPU Cryptography: Motivation

• Heavy Computational Work• Insecure Protocols:“... many network administrators choose to employ insecure security

standards such as WEP (37%), or not apply security to their networks at all (57%).” [1]

• Huge CPU time on cryptographic operations.“Recent study reveals that 70% of the CPU time in such a

transaction(HTTPS) is spent on cryptographic operations.”[2]

April 8th, 2011

[1] Boeing, Adrian. “Survey and future trends of efficient cryptographic function implementations on GPGPUs”, 2008.[2] Neves, Samuel. “Cryptography in GPUs”, 2009.

Page 9: Cryptography on GPU

9

GPU Cryptography: Motivation

• Peak Ops/s Superiority of GPU over CPU

April 8th, 2011

“NVIDA CUDA Compute Unified Device Architecture, Programming Guide”, 2008.

Page 10: Cryptography on GPU

10

GPU Cryptography: Motivation

• GPU 100x faster that CPU, myth?Intel: 2,5x overall[1]Nvidia: 10 papers resulting over 100x

speed up with GPU[2]

April 8th, 2011

[1] Lee, Victor W & Various Researchers.“Debunking the 100X GPU vs. CPU Myth: An Evaluation of Throughput Computing on CPU and GPU”, 2010. [2] Keane, Andy. “ “GPUs Are Only Up to14 Times Faster Than CPUs” Says Intel”, 2010

Page 11: Cryptography on GPU

11

GPU Cryptography: Ciphers• AES

– Block Cipher• RC4

– Stream Cipher– 3 Steps: Initialize, Produce Byte Stream, Encrypt– WEP, WPA

• MD5– Pad to length divisible by 512– Block by Block

• SHA– Similar to MD5

• Modular Exponentiation– Part of RSA

April 8th, 2011

Page 12: Cryptography on GPU

12

GPU vs CPU Results

April 8th, 2011

Boeing, Adrian. “Survey and future trends of efficient cryptographic function implementations on GPGPUs”, 2008.

Page 13: Cryptography on GPU

13

GPU vs CPU Results : SiSoft - Benchmarks : CPU vs. GPGPU: Cryptographic Performance

April 8th, 2011

AVERAGE PERFORMANCE: 733,5 MB/s

Page 14: Cryptography on GPU

14

GPU vs CPU Results : SiSoft - Benchmarks : CPU vs. GPGPU: Cryptographic Performance

April 8th, 2011

AVERAGE PERFORMANCE: 2925,84 MB/s

Page 15: Cryptography on GPU

15

GPU vs CPU Results : SiSoft - Benchmarks : CPU vs. GPGPU: Cryptographic Performance

April 8th, 2011

AVERAGE PERFORMANCE: 592,67 MB/s

Page 16: Cryptography on GPU

16

GPU vs CPU Results : SiSoft - Benchmarks : CPU vs. GPGPU: Cryptographic Performance

April 8th, 2011

AVERAGE PERFORMANCE: 3087,5 MB/s

Page 17: Cryptography on GPU

17

Conclusion

• Better Performance vs. More Programming Effort

• I/O Bottleneck• With developments of APUs– Increase in use of secure platforms and standarts:

e.g. RSA, HTTPS– Insecure platforms and standarts cracked even

easier: e.g. WEP

April 8th, 2011

Page 18: Cryptography on GPU

Thank You

Questions