Lines Matching refs:i

62 #define GET_UINT32_BE(n,b,i)                            \  argument
64 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
65 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
66 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
67 | ( (uint32_t) (b)[(i) + 3] ); \
72 #define PUT_UINT32_BE(n,b,i) \ argument
74 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
75 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
76 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
77 (b)[(i) + 3] = (unsigned char) ( (n) ); \
186 unsigned int i; in mbedtls_sha256_process() local
188 for( i = 0; i < 8; i++ ) in mbedtls_sha256_process()
189 A[i] = ctx->state[i]; in mbedtls_sha256_process()
192 for( i = 0; i < 64; i++ ) in mbedtls_sha256_process()
194 if( i < 16 ) in mbedtls_sha256_process()
195 GET_UINT32_BE( W[i], data, 4 * i ); in mbedtls_sha256_process()
197 R( i ); in mbedtls_sha256_process()
199 P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], W[i], K[i] ); in mbedtls_sha256_process()
205 for( i = 0; i < 16; i++ ) in mbedtls_sha256_process()
206 GET_UINT32_BE( W[i], data, 4 * i ); in mbedtls_sha256_process()
208 for( i = 0; i < 16; i += 8 ) in mbedtls_sha256_process()
210 P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], W[i+0], K[i+0] ); in mbedtls_sha256_process()
211 P( A[7], A[0], A[1], A[2], A[3], A[4], A[5], A[6], W[i+1], K[i+1] ); in mbedtls_sha256_process()
212 P( A[6], A[7], A[0], A[1], A[2], A[3], A[4], A[5], W[i+2], K[i+2] ); in mbedtls_sha256_process()
213 P( A[5], A[6], A[7], A[0], A[1], A[2], A[3], A[4], W[i+3], K[i+3] ); in mbedtls_sha256_process()
214 P( A[4], A[5], A[6], A[7], A[0], A[1], A[2], A[3], W[i+4], K[i+4] ); in mbedtls_sha256_process()
215 P( A[3], A[4], A[5], A[6], A[7], A[0], A[1], A[2], W[i+5], K[i+5] ); in mbedtls_sha256_process()
216 P( A[2], A[3], A[4], A[5], A[6], A[7], A[0], A[1], W[i+6], K[i+6] ); in mbedtls_sha256_process()
217 P( A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[0], W[i+7], K[i+7] ); in mbedtls_sha256_process()
220 for( i = 16; i < 64; i += 8 ) in mbedtls_sha256_process()
222 P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], R(i+0), K[i+0] ); in mbedtls_sha256_process()
223 P( A[7], A[0], A[1], A[2], A[3], A[4], A[5], A[6], R(i+1), K[i+1] ); in mbedtls_sha256_process()
224 P( A[6], A[7], A[0], A[1], A[2], A[3], A[4], A[5], R(i+2), K[i+2] ); in mbedtls_sha256_process()
225 P( A[5], A[6], A[7], A[0], A[1], A[2], A[3], A[4], R(i+3), K[i+3] ); in mbedtls_sha256_process()
226 P( A[4], A[5], A[6], A[7], A[0], A[1], A[2], A[3], R(i+4), K[i+4] ); in mbedtls_sha256_process()
227 P( A[3], A[4], A[5], A[6], A[7], A[0], A[1], A[2], R(i+5), K[i+5] ); in mbedtls_sha256_process()
228 P( A[2], A[3], A[4], A[5], A[6], A[7], A[0], A[1], R(i+6), K[i+6] ); in mbedtls_sha256_process()
229 P( A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[0], R(i+7), K[i+7] ); in mbedtls_sha256_process()
233 for( i = 0; i < 8; i++ ) in mbedtls_sha256_process()
234 ctx->state[i] += A[i]; in mbedtls_sha256_process()
394 int i, j, k, buflen, ret = 0; in mbedtls_sha256_self_test() local
410 for( i = 0; i < 6; i++ ) in mbedtls_sha256_self_test()
412 j = i % 3; in mbedtls_sha256_self_test()
413 k = i < 3; in mbedtls_sha256_self_test()
433 if( memcmp( sha256sum, sha256_test_sum[i], 32 - k * 4 ) != 0 ) in mbedtls_sha256_self_test()