Lines Matching refs:i

60 #define GET_UINT32_BE(n,b,i)                            \  argument
62 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
63 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
64 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
65 | ( (uint32_t) (b)[(i) + 3] ); \
70 #define PUT_UINT32_BE(n,b,i) \ argument
72 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
73 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
74 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
75 (b)[(i) + 3] = (unsigned char) ( (n) ); \
291 for( i = 1; i <= 4; i++ ) \
292 if( shifts[(INDEX)][(OFFSET)][i -1] ) \
293 ROTL(TK + i * 4, TK, ( 15 * i ) % 32); \
295 for( i = 0; i < 20; i++ ) \
296 if( indexes[(INDEX)][(OFFSET)][i] != -1 ) { \
297 RK[indexes[(INDEX)][(OFFSET)][i]] = TK[ i ]; \
346 size_t i; in mbedtls_camellia_setkey_enc() local
366 for( i = 0; i < keybits / 8; ++i ) in mbedtls_camellia_setkey_enc()
367 t[i] = key[i]; in mbedtls_camellia_setkey_enc()
370 for( i = 0; i < 8; i++ ) in mbedtls_camellia_setkey_enc()
371 t[24 + i] = ~t[16 + i]; in mbedtls_camellia_setkey_enc()
377 for( i = 0; i < 6; i++ ) { in mbedtls_camellia_setkey_enc()
378 GET_UINT32_BE( SIGMA[i][0], SIGMA_CHARS[i], 0 ); in mbedtls_camellia_setkey_enc()
379 GET_UINT32_BE( SIGMA[i][1], SIGMA_CHARS[i], 4 ); in mbedtls_camellia_setkey_enc()
389 for( i = 0; i < 8; i++ ) in mbedtls_camellia_setkey_enc()
390 GET_UINT32_BE( KC[i], t, i * 4 ); in mbedtls_camellia_setkey_enc()
393 for( i = 0; i < 4; ++i ) in mbedtls_camellia_setkey_enc()
394 KC[8 + i] = KC[i] ^ KC[4 + i]; in mbedtls_camellia_setkey_enc()
399 for( i = 0; i < 4; ++i ) in mbedtls_camellia_setkey_enc()
400 KC[8 + i] ^= KC[i]; in mbedtls_camellia_setkey_enc()
407 for( i = 0; i < 4; ++i ) in mbedtls_camellia_setkey_enc()
408 KC[12 + i] = KC[4 + i] ^ KC[8 + i]; in mbedtls_camellia_setkey_enc()
435 for( i = 0; i < 20; i++ ) { in mbedtls_camellia_setkey_enc()
436 if( transposes[idx][i] != -1 ) { in mbedtls_camellia_setkey_enc()
437 RK[32 + 12 * idx + i] = RK[transposes[idx][i]]; in mbedtls_camellia_setkey_enc()
451 size_t i; in mbedtls_camellia_setkey_dec() local
473 for( i = 22 + 8 * idx, SK -= 6; i > 0; i--, SK -= 4 ) in mbedtls_camellia_setkey_dec()
565 int i; in mbedtls_camellia_crypt_cbc() local
578 for( i = 0; i < 16; i++ ) in mbedtls_camellia_crypt_cbc()
579 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_camellia_crypt_cbc()
592 for( i = 0; i < 16; i++ ) in mbedtls_camellia_crypt_cbc()
593 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_camellia_crypt_cbc()
668 int c, i; in mbedtls_camellia_crypt_ctr() local
677 for( i = 16; i > 0; i-- ) in mbedtls_camellia_crypt_ctr()
678 if( ++nonce_counter[i - 1] != 0 ) in mbedtls_camellia_crypt_ctr()
896 int i, j, u, v; in mbedtls_camellia_self_test() local
922 for( i = 0; i < CAMELLIA_TESTS_ECB; i++ ) { in mbedtls_camellia_self_test()
923 memcpy( key, camellia_test_ecb_key[u][i], 16 + 8 * u ); in mbedtls_camellia_self_test()
927 memcpy( src, camellia_test_ecb_cipher[u][i], 16 ); in mbedtls_camellia_self_test()
928 memcpy( dst, camellia_test_ecb_plain[i], 16 ); in mbedtls_camellia_self_test()
931 memcpy( src, camellia_test_ecb_plain[i], 16 ); in mbedtls_camellia_self_test()
932 memcpy( dst, camellia_test_ecb_cipher[u][i], 16 ); in mbedtls_camellia_self_test()
976 for( i = 0; i < CAMELLIA_TESTS_CBC; i++ ) { in mbedtls_camellia_self_test()
980 memcpy( src, camellia_test_cbc_cipher[u][i], 16 ); in mbedtls_camellia_self_test()
981 memcpy( dst, camellia_test_cbc_plain[i], 16 ); in mbedtls_camellia_self_test()
984 memcpy( src, camellia_test_cbc_plain[i], 16 ); in mbedtls_camellia_self_test()
985 memcpy( dst, camellia_test_cbc_cipher[u][i], 16 ); in mbedtls_camellia_self_test()
1011 for( i = 0; i < 6; i++ ) in mbedtls_camellia_self_test()
1013 u = i >> 1; in mbedtls_camellia_self_test()
1014 v = i & 1; in mbedtls_camellia_self_test()