Lines Matching refs:i
323 int i; in mbedtls_des_key_set_parity() local
325 for( i = 0; i < MBEDTLS_DES_KEY_SIZE; i++ ) in mbedtls_des_key_set_parity()
326 key[i] = odd_parity_table[key[i] / 2]; in mbedtls_des_key_set_parity()
334 int i; in mbedtls_des_key_check_key_parity() local
336 for( i = 0; i < MBEDTLS_DES_KEY_SIZE; i++ ) in mbedtls_des_key_check_key_parity()
337 if( key[i] != odd_parity_table[key[i] / 2] ) in mbedtls_des_key_check_key_parity()
389 int i; in mbedtls_des_key_check_weak() local
391 for( i = 0; i < WEAK_KEY_COUNT; i++ ) in mbedtls_des_key_check_weak()
392 if( memcmp( weak_key_table[i], key, MBEDTLS_DES_KEY_SIZE) == 0 ) in mbedtls_des_key_check_weak()
401 int i; in mbedtls_des_setkey() local
429 for( i = 0; i < 16; i++ ) in mbedtls_des_setkey()
431 if( i < 2 || i == 8 || i == 15 ) in mbedtls_des_setkey()
484 int i; in mbedtls_des_setkey_dec() local
488 for( i = 0; i < 16; i += 2 ) in mbedtls_des_setkey_dec()
490 SWAP( ctx->sk[i ], ctx->sk[30 - i] ); in mbedtls_des_setkey_dec()
491 SWAP( ctx->sk[i + 1], ctx->sk[31 - i] ); in mbedtls_des_setkey_dec()
501 int i; in des3_set2key() local
506 for( i = 0; i < 32; i += 2 ) in des3_set2key()
508 dsk[i ] = esk[30 - i]; in des3_set2key()
509 dsk[i + 1] = esk[31 - i]; in des3_set2key()
511 esk[i + 32] = dsk[62 - i]; in des3_set2key()
512 esk[i + 33] = dsk[63 - i]; in des3_set2key()
514 esk[i + 64] = esk[i ]; in des3_set2key()
515 esk[i + 65] = esk[i + 1]; in des3_set2key()
517 dsk[i + 64] = dsk[i ]; in des3_set2key()
518 dsk[i + 65] = dsk[i + 1]; in des3_set2key()
554 int i; in des3_set3key() local
560 for( i = 0; i < 32; i += 2 ) in des3_set3key()
562 dsk[i ] = esk[94 - i]; in des3_set3key()
563 dsk[i + 1] = esk[95 - i]; in des3_set3key()
565 esk[i + 32] = dsk[62 - i]; in des3_set3key()
566 esk[i + 33] = dsk[63 - i]; in des3_set3key()
568 dsk[i + 64] = esk[30 - i]; in des3_set3key()
569 dsk[i + 65] = esk[31 - i]; in des3_set3key()
609 int i; in mbedtls_des_crypt_ecb() local
619 for( i = 0; i < 8; i++ ) in mbedtls_des_crypt_ecb()
645 int i; in mbedtls_des_crypt_cbc() local
656 for( i = 0; i < 8; i++ ) in mbedtls_des_crypt_cbc()
657 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_des_crypt_cbc()
678 for( i = 0; i < 8; i++ ) in mbedtls_des_crypt_cbc()
679 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_des_crypt_cbc()
703 int i; in mbedtls_des3_crypt_ecb() local
713 for( i = 0; i < 8; i++ ) in mbedtls_des3_crypt_ecb()
719 for( i = 0; i < 8; i++ ) in mbedtls_des3_crypt_ecb()
725 for( i = 0; i < 8; i++ ) in mbedtls_des3_crypt_ecb()
751 int i; in mbedtls_des3_crypt_cbc() local
762 for( i = 0; i < 8; i++ ) in mbedtls_des3_crypt_cbc()
763 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_des3_crypt_cbc()
784 for( i = 0; i < 8; i++ ) in mbedtls_des3_crypt_cbc()
785 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_des3_crypt_cbc()
861 int i, j, u, v, ret = 0; in mbedtls_des_self_test() local
875 for( i = 0; i < 6; i++ ) in mbedtls_des_self_test()
877 u = i >> 1; in mbedtls_des_self_test()
878 v = i & 1; in mbedtls_des_self_test()
887 switch( i ) in mbedtls_des_self_test()
952 for( i = 0; i < 6; i++ ) in mbedtls_des_self_test()
954 u = i >> 1; in mbedtls_des_self_test()
955 v = i & 1; in mbedtls_des_self_test()
966 switch( i ) in mbedtls_des_self_test()