comparison libtomcrypt/src/ciphers/rc5.c @ 1437:871b18fd7065 fuzz

merge from main (libtommath/libtomcrypt/curve25510-donna updates)
author Matt Johnston <matt@ucc.asn.au>
date Sat, 24 Jun 2017 22:51:45 +0800
parents f849a5ca2efc
children 6dba84798cd5
comparison
equal deleted inserted replaced
1432:41dca1e5ea34 1437:871b18fd7065
4 * algorithms in a highly modular and flexible manner. 4 * algorithms in a highly modular and flexible manner.
5 * 5 *
6 * The library is free for all purposes without any express 6 * The library is free for all purposes without any express
7 * guarantee it works. 7 * guarantee it works.
8 * 8 *
9 * Tom St Denis, [email protected], http://libtomcrypt.com 9 * Tom St Denis, [email protected], http://libtom.org
10 */ 10 */
11 11
12 /** 12 /**
13 @file rc5.c 13 @file rc5.c
14 RC5 code by Tom St Denis 14 LTC_RC5 code by Tom St Denis
15 */ 15 */
16 16
17 #include "tomcrypt.h" 17 #include "tomcrypt.h"
18 18
19 #ifdef RC5 19 #ifdef LTC_RC5
20 20
21 const struct ltc_cipher_descriptor rc5_desc = 21 const struct ltc_cipher_descriptor rc5_desc =
22 { 22 {
23 "rc5", 23 "rc5",
24 2, 24 2,
41 0x708c564bUL, 0x0ec3d004UL, 0xacfb49bdUL, 0x4b32c376UL, 0xe96a3d2fUL, 0x87a1b6e8UL, 0x25d930a1UL, 0xc410aa5aUL, 41 0x708c564bUL, 0x0ec3d004UL, 0xacfb49bdUL, 0x4b32c376UL, 0xe96a3d2fUL, 0x87a1b6e8UL, 0x25d930a1UL, 0xc410aa5aUL,
42 0x62482413UL, 0x007f9dccUL 42 0x62482413UL, 0x007f9dccUL
43 }; 43 };
44 44
45 /** 45 /**
46 Initialize the RC5 block cipher 46 Initialize the LTC_RC5 block cipher
47 @param key The symmetric key you wish to pass 47 @param key The symmetric key you wish to pass
48 @param keylen The key length in bytes 48 @param keylen The key length in bytes
49 @param num_rounds The number of rounds desired (0 for default) 49 @param num_rounds The number of rounds desired (0 for default)
50 @param skey The key in as scheduled by this function. 50 @param skey The key in as scheduled by this function.
51 @return CRYPT_OK if successful 51 @return CRYPT_OK if successful
117 return x; 117 return x;
118 } 118 }
119 #endif 119 #endif
120 120
121 /** 121 /**
122 Encrypts a block of text with RC5 122 Encrypts a block of text with LTC_RC5
123 @param pt The input plaintext (8 bytes) 123 @param pt The input plaintext (8 bytes)
124 @param ct The output ciphertext (8 bytes) 124 @param ct The output ciphertext (8 bytes)
125 @param skey The key as scheduled 125 @param skey The key as scheduled
126 @return CRYPT_OK if successful 126 @return CRYPT_OK if successful
127 */ 127 */
172 return err; 172 return err;
173 } 173 }
174 #endif 174 #endif
175 175
176 /** 176 /**
177 Decrypts a block of text with RC5 177 Decrypts a block of text with LTC_RC5
178 @param ct The input ciphertext (8 bytes) 178 @param ct The input ciphertext (8 bytes)
179 @param pt The output plaintext (8 bytes) 179 @param pt The output plaintext (8 bytes)
180 @param skey The key as scheduled 180 @param skey The key as scheduled
181 @return CRYPT_OK if successful 181 @return CRYPT_OK if successful
182 */ 182 */
228 return err; 228 return err;
229 } 229 }
230 #endif 230 #endif
231 231
232 /** 232 /**
233 Performs a self-test of the RC5 block cipher 233 Performs a self-test of the LTC_RC5 block cipher
234 @return CRYPT_OK if functional, CRYPT_NOP if self-test has been disabled 234 @return CRYPT_OK if functional, CRYPT_NOP if self-test has been disabled
235 */ 235 */
236 int rc5_test(void) 236 int rc5_test(void)
237 { 237 {
238 #ifndef LTC_TEST 238 #ifndef LTC_TEST
315 #endif 315 #endif
316 316
317 317
318 318
319 319
320 /* $Source: /cvs/libtom/libtomcrypt/src/ciphers/rc5.c,v $ */ 320 /* $Source$ */
321 /* $Revision: 1.12 $ */ 321 /* $Revision$ */
322 /* $Date: 2006/11/08 23:01:06 $ */ 322 /* $Date$ */