aesni: Use 4-way parallel AES-NI instructions for CTR en/decryption
authorMartin Willi <martin@revosec.ch>
Thu, 26 Mar 2015 10:26:51 +0000 (11:26 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 15 Apr 2015 09:35:27 +0000 (11:35 +0200)
commit8488dea2f98f2f6514ee006d4feab171b6d0db26
tree05be253da594ba027edfb761bcb1b41bf28fd76f
parent9e47c1fe77c27001046e805b06e4ffe88252f368
aesni: Use 4-way parallel AES-NI instructions for CTR en/decryption

CTR can be parallelized, and we do so by queueing instructions to the processor
pipeline. While we have enough registers for 128-bit decryption, the register
count is insufficient to hold all variables with larger key sizes. Nonetheless
is 4-way parallelism faster, depending on key size between ~10% and ~25%.
src/libstrongswan/plugins/aesni/aesni_ctr.c