Intel AES-NI Application Performance

24
Less Painful Application Encryption April, 2015 Niall O’Connor Chief Technology Officer Boston Security Conference #4

Transcript of Intel AES-NI Application Performance

Page 1: Intel AES-NI Application Performance

Less Painful Application Encryption

April, 2015

Niall O’Connor

Chief Technology Officer

Boston Security Conference #4

Page 2: Intel AES-NI Application Performance

MAKE PERSONALIZED MEDICINE A REALITY

Page 3: Intel AES-NI Application Performance
Page 4: Intel AES-NI Application Performance

WE ENCRYPT A LOT OF DATA

Patient Data

PGP Encryption

Transform Raw

Data Into Results

AES 256 bit Encryption

AES Decryption

AES Decryption

AES Decryption

Page 5: Intel AES-NI Application Performance

Transparent Encryption & Optimization

Page 6: Intel AES-NI Application Performance

Encryption as a Persistence Rule

● Readable

● Understandable encryption model

● No database dependency

Page 7: Intel AES-NI Application Performance

ENCRYPTION PERFORMANCE IMPACT

IS OVERSTATED

…but worth minimizing.

Page 8: Intel AES-NI Application Performance

OPTIMIZING THE ADVANCED

ENCRYPTION STANDARD

(AES)

Page 9: Intel AES-NI Application Performance

Full RoundSubBytes – Each byte was substituted

ShiftRows – Last three rows of block is shifted cyclically

MixColumns – Block columns are shifted

AddRoundKey

Last RoundSubBytes

ShiftRows

AddRoundKey

128 bit Key = 10192 bit Key = 12256 bit Key = 14

First RoundAddRoundKey – Each byte is XOR’d with each byte of round key

KeyExpansion – create round keys from cipher key

AES Algorithm

Page 10: Intel AES-NI Application Performance

Block Cipher Mode of Operation

0

50

100

150

200

250

300

350

CFB CTR OFB CBC ECB

ms

Mode

44%

Page 11: Intel AES-NI Application Performance

ECB Not so Fast

Page 12: Intel AES-NI Application Performance

Block Cipher Mode of Operation

0

50

100

150

200

250

300

350

CFB CTR OFB CBC ECB

ms

Mode

36%

Page 13: Intel AES-NI Application Performance

Provider Library

0

50

100

150

200

250

BC SunJCE NSS

ms

Provider Library

Encrypt

Decrypt

36%

Page 14: Intel AES-NI Application Performance

ADVANCED ENCRYPTION STANDARD

NEW INSTRUCTIONS

(AES-NI)

Page 15: Intel AES-NI Application Performance

Full RoundSubBytes

ShiftRows

MixColumns

AddRoundKey

Last RoundSubBytes

ShiftRows

AddRoundKey

First RoundAddRoundKey

KeyExpansion

AESENC/AESDEC

AESENCLAST/AESDECLAST

AESENC/AESDEC

AESKEYGENASSIST

AES Algorithm Steps Intel AES-NI Hardware

Operations

Page 16: Intel AES-NI Application Performance

Provider Library (AES-NI)

0

50

100

150

200

250

BC SunJCE NSS

ms

Provider Library

AES

AES-NI

136.5ms

93%

Page 17: Intel AES-NI Application Performance

AES-NI Impact on Key Length

0

20

40

60

80

100

120

140

160

180

128 bit 192 bit 256 bit

AES

AES-NI

Page 18: Intel AES-NI Application Performance

AES-NI Key Length

0

5

10

15

20

25

30

35

40

128→192 128→256

Axi

s Ti

tle

Axis Title

AES

AES-ni

Page 19: Intel AES-NI Application Performance

GenoSpace Population Analytics

Page 20: Intel AES-NI Application Performance

Average Attribute Request Time

0

0.5

1

1.5

2

2.5

3

3.5

AES AES-NI

ms

Processing

DB.attributeDesc

Decrypt

Deserialization

DB.attribute

3.7%

Page 21: Intel AES-NI Application Performance

Platelet Count Request Time

0

0.5

1

1.5

2

2.5

3

3.5

AES AES-NI

ms

processing

DB.attributeDesc

decryptTime OFF

deserializeTime OFF

DB.attribute

8.9%

Page 22: Intel AES-NI Application Performance

Scaling Decryption Time

0

10

20

30

40

50

60

70

80

90

765 1000 10000 100000

ms

Patients

AES

AES-NI

Page 23: Intel AES-NI Application Performance

Conclusion

• Choose your Provider Library wisely• Operating mode• Key Length • Encryption not an application

bottleneck • Scalable data encryption

Page 24: Intel AES-NI Application Performance

Acknowledgements

Ketan Patel and David Houlding @ Intel

Ryan Kophs @ GenoSpace

Any Questions?

Niall O’Connor

Chief Technology Officer

Boston Security Conference #4