|
| 1 | +\code |
| 2 | +/* Remarks for TestU01: |
| 3 | + * The only changes I have made in the authors' code below is to rename the |
| 4 | + * types u8, u32. I have also removed 3 unused defined constants. |
| 5 | + * (R. Simard for TestU01) |
| 6 | + * |
| 7 | + *===========================================================================*/ |
| 8 | + |
| 9 | +/** |
| 10 | + * rijndael-alg-fst.h |
| 11 | + * |
| 12 | + * @version 3.0 (December 2000) |
| 13 | + * |
| 14 | + * Optimised ANSI C code for the Rijndael cipher (now AES) |
| 15 | + * |
| 16 | + * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be> |
| 17 | + * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be> |
| 18 | + * @author Paulo Barreto <paulo.barreto@terra.com.br> |
| 19 | + * |
| 20 | + * This code is hereby placed in the public domain. |
| 21 | + * |
| 22 | + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS |
| 23 | + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 24 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 25 | + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE |
| 26 | + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 27 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 28 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 29 | + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 30 | + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 31 | + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 32 | + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 33 | + */ |
| 34 | +#ifndef __RIJNDAEL_ALG_FST_H |
| 35 | +#define __RIJNDAEL_ALG_FST_H |
| 36 | +#include "gdef.h" |
| 37 | + |
| 38 | + |
| 39 | +int rijndaelKeySetupEnc(uint32_t rk[/*4*(Nr + 1)*/], const uint8_t cipherKey[], int keyBits); |
| 40 | +int rijndaelKeySetupDec(uint32_t rk[/*4*(Nr + 1)*/], const uint8_t cipherKey[], int keyBits); |
| 41 | +void rijndaelEncrypt(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, const uint8_t pt[16], uint8_t ct[16]); |
| 42 | +void rijndaelDecrypt(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, const uint8_t ct[16], uint8_t pt[16]); |
| 43 | + |
| 44 | +#ifdef INTERMEDIATE_VALUE_KAT |
| 45 | +void rijndaelEncryptRound(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, uint8_t block[16], int rounds); |
| 46 | +void rijndaelDecryptRound(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, uint8_t block[16], int rounds); |
| 47 | +#endif /* INTERMEDIATE_VALUE_KAT */ |
| 48 | + |
| 49 | +#endif /* __RIJNDAEL_ALG_FST_H */ |
| 50 | +\endcode |
0 commit comments