Botan  1.11.15
src/lib/block/noekeon_simd/noekeon_simd.h
Go to the documentation of this file.
00001 /*
00002 * Noekeon in SIMD
00003 * (C) 2010 Jack Lloyd
00004 *
00005 * Botan is released under the Simplified BSD License (see license.txt)
00006 */
00007 
00008 #ifndef BOTAN_NOEKEON_SIMD_H__
00009 #define BOTAN_NOEKEON_SIMD_H__
00010 
00011 #include <botan/noekeon.h>
00012 
00013 namespace Botan {
00014 
00015 /**
00016 * Noekeon implementation using SIMD operations
00017 */
00018 class BOTAN_DLL Noekeon_SIMD : public Noekeon
00019    {
00020    public:
00021       size_t parallelism() const { return 4; }
00022 
00023       void encrypt_n(const byte in[], byte out[], size_t blocks) const;
00024       void decrypt_n(const byte in[], byte out[], size_t blocks) const;
00025 
00026       BlockCipher* clone() const { return new Noekeon_SIMD; }
00027    };
00028 
00029 }
00030 
00031 #endif