Added cipher acceleration to SILC Accelerator. Added cipher softacc.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 28 Feb 2008 17:50:06 +0000 (19:50 +0200)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 28 Feb 2008 17:50:06 +0000 (19:50 +0200)
commit80dc2a39c614ea1376a2e19ebe2460af11c9afee
tree8f5dfc5721f02780c9c8571c1a52d016922ad193
parent9f20f0382b6229eca740925a73f96294f6dcedc6
Added cipher acceleration to SILC Accelerator.  Added cipher softacc.

The SILC Accelerator API now has silc_acc_cipher to accelerate ciphers.
The accelerators must internally implement the SILC Cipher API.

Added cipher software accelerator.  Cipher accelerator accelerates
ciphers using counter mode by precomputing the CTR key stream in
threads.  Encryption and decryption uses the precomputed key stream
and gets significant speed improvement in the process.  The threads
are reserved from the thread pool and they remain reserved as long
as the cipher is accelerated.

As a queue we use SilcThreadQueue from SRT which handles locking and
waiting automatically and supports multiple pipes for multiple key
streams, so it makes this whole thing very simple.

It can accelerate any cipher but AES is especially optimized.

Split the softacc into several files, own files for cipher and PKCS
acceleration.  Added test programs.
15 files changed:
TODO
distdir/crypto
lib/silcacc/Makefile.ad
lib/silcacc/silcacc.c
lib/silcacc/silcacc.h
lib/silcacc/silcacc_cipher.c [new file with mode: 0644]
lib/silcacc/silcacc_pkcs.c
lib/silcacc/softacc.c
lib/silcacc/softacc.h
lib/silcacc/softacc_cipher.c [new file with mode: 0644]
lib/silcacc/softacc_i.h [new file with mode: 0644]
lib/silcacc/softacc_pkcs.c [new file with mode: 0644]
lib/silcacc/tests/Makefile.am
lib/silcacc/tests/test_softacc_cipher.c [new file with mode: 0644]
lib/silcacc/tests/test_softacc_cipher2.c [new file with mode: 0644]