Improve Serpent key setup speed
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Mon, 4 Nov 2013 19:28:22 +0000 (21:28 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Wed, 6 Nov 2013 17:23:01 +0000 (19:23 +0200)
commit9897ccb381503455edc490679b2e9251a09ac5cb
tree719cbc4faf4d171ee97c9fd545f3f32147dcc2e9
parentb8515aa70b00baba3fba8121ed305edcd029c8c7
Improve Serpent key setup speed

* cipher/serpent.c (SBOX, SBOX_INVERSE): Remove index argument.
(serpent_subkeys_generate): Use smaller temporary arrays for subkey
generation and perform stack clearing locally.
(serpent_setkey_internal): Use wipememory to clear stack and remove
_gcry_burn_stack.
(serpent_setkey): Remove unneeded _gcry_burn_stack.
--

Avoid using large arrays and large stack burning to gain extra speed for
key setup.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/serpent.c