PuTTY AES & SHA NI

AES and SHA new instructions in PuTTY

This project is maintained by pavelkryukov

PuTTY: Build Status Build status Total alerts

Demonstration suites for encryption using Intel AES instruction set and ARM Cryptography Extension in PuTTY SSH client and derived tools.

Motivation

Impact

Credits

AES NI

Details:

SHA NI

Details:

PuTTY Continious integration

Details:

Code Coverage Chart!

Code Coverage

CPUs with AES NI support

Get sure that your CPU supports AES-NI by running make aescpuid && ./aescpuid. You may use Intel Product Specification Advanced Search to check if your CPU supports AES-NI and SHA-NI.

AES encryption and decryption

To observe boost of AES-NI algorithm, one may create standalone AES-256 encryptor and decryptor tools using PuTTY source code. After cloning repository and PuTTY submodule, binaries are buildable with CMake:

Type SW AES AES NI
Encrypt aes-demo-sw-encode aes-demo-hw-encode
Decrypt aes-demo-sw-decode aes-demo-hw-decode

Syntax is the same as ‘cp’ command. Please note that file size must be a multiple of 16 bytes. <sshdemo> src dst

AES performance tests

To run performance test, use make perf-geomean-aes.txt. The output is geometric mean of speedups per encryption/decryption of different data sets with memory range from 16 bytes to 16 Mbytes.

Raw performance data is stored to perf-original.txt and perf-output.txt, the first one is for standard version, second is for AES-NI version. Format of output files is following: code keylen blocklen time, where code 0 is encryption, code 1 is decryption, and code 2 is for encryption in sdctr mode.

AES and SHA functional tests

Since 2019, all cryptography functional tests are included to the PuTTY repository. To run the tests in Bash, simply execute following commands in a configured PuTTY workspace:

make testcrypt
export PUTTY_TESTCRYPT=/path/to/the/testcrypt
./test/cryptsuite.py

The same works for Windows environment if you use appropriate CMD or PowerShell commands.

Thanks