Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 63) sorted by relevance

123

/mbedtls-3.5.0/library/
Dchacha20.c61 static inline void chacha20_quarter_round(uint32_t state[16], in chacha20_quarter_round()
68 state[a] += state[b]; in chacha20_quarter_round()
69 state[d] ^= state[a]; in chacha20_quarter_round()
70 state[d] = ROTL32(state[d], 16); in chacha20_quarter_round()
73 state[c] += state[d]; in chacha20_quarter_round()
74 state[b] ^= state[c]; in chacha20_quarter_round()
75 state[b] = ROTL32(state[b], 12); in chacha20_quarter_round()
78 state[a] += state[b]; in chacha20_quarter_round()
79 state[d] ^= state[a]; in chacha20_quarter_round()
80 state[d] = ROTL32(state[d], 8); in chacha20_quarter_round()
[all …]
Daesni.c86 __m128i state; in mbedtls_aesni_crypt_ecb() local
87 memcpy(&state, input, 16); in mbedtls_aesni_crypt_ecb()
88 state = _mm_xor_si128(state, rk[0]); // state ^= *rk; in mbedtls_aesni_crypt_ecb()
94 state = _mm_aesdec_si128(state, *rk); in mbedtls_aesni_crypt_ecb()
98 state = _mm_aesdeclast_si128(state, *rk); in mbedtls_aesni_crypt_ecb()
101 state = _mm_aesenc_si128(state, *rk); in mbedtls_aesni_crypt_ecb()
105 state = _mm_aesenclast_si128(state, *rk); in mbedtls_aesni_crypt_ecb()
108 memcpy(output, &state, 16); in mbedtls_aesni_crypt_ecb()
232 static __m128i aesni_set_rk_128(__m128i state, __m128i xword) in aesni_set_rk_128() argument
245 xword = _mm_xor_si128(xword, state); // X+r3:X+r2:X+r1:r4 in aesni_set_rk_128()
[all …]
Dcmac.c210 mbedtls_platform_zeroize(cmac_ctx->state, sizeof(cmac_ctx->state)); in mbedtls_cipher_cmac_starts()
219 unsigned char *state; in mbedtls_cipher_cmac_update() local
230 state = ctx->cmac_ctx->state; in mbedtls_cipher_cmac_update()
240 mbedtls_xor(state, cmac_ctx->unprocessed_block, state, block_size); in mbedtls_cipher_cmac_update()
242 if ((ret = mbedtls_cipher_update(ctx, state, block_size, state, in mbedtls_cipher_cmac_update()
258 mbedtls_xor(state, input, state, block_size); in mbedtls_cipher_cmac_update()
260 if ((ret = mbedtls_cipher_update(ctx, state, block_size, state, in mbedtls_cipher_cmac_update()
285 unsigned char *state, *last_block; in mbedtls_cipher_cmac_finish() local
299 state = cmac_ctx->state; in mbedtls_cipher_cmac_finish()
317 mbedtls_xor(state, M_last, state, block_size); in mbedtls_cipher_cmac_finish()
[all …]
Dsha256.c232 ctx->state[0] = 0x6A09E667; in mbedtls_sha256_starts()
233 ctx->state[1] = 0xBB67AE85; in mbedtls_sha256_starts()
234 ctx->state[2] = 0x3C6EF372; in mbedtls_sha256_starts()
235 ctx->state[3] = 0xA54FF53A; in mbedtls_sha256_starts()
236 ctx->state[4] = 0x510E527F; in mbedtls_sha256_starts()
237 ctx->state[5] = 0x9B05688C; in mbedtls_sha256_starts()
238 ctx->state[6] = 0x1F83D9AB; in mbedtls_sha256_starts()
239 ctx->state[7] = 0x5BE0CD19; in mbedtls_sha256_starts()
243 ctx->state[0] = 0xC1059ED8; in mbedtls_sha256_starts()
244 ctx->state[1] = 0x367CD507; in mbedtls_sha256_starts()
[all …]
Dchachapoly.c87 ctx->state = CHACHAPOLY_STATE_INIT; in mbedtls_chachapoly_init()
101 ctx->state = CHACHAPOLY_STATE_INIT; in mbedtls_chachapoly_free()
145 ctx->state = CHACHAPOLY_STATE_AAD; in mbedtls_chachapoly_starts()
158 if (ctx->state != CHACHAPOLY_STATE_AAD) { in mbedtls_chachapoly_update_aad()
174 if ((ctx->state != CHACHAPOLY_STATE_AAD) && in mbedtls_chachapoly_update()
175 (ctx->state != CHACHAPOLY_STATE_CIPHERTEXT)) { in mbedtls_chachapoly_update()
179 if (ctx->state == CHACHAPOLY_STATE_AAD) { in mbedtls_chachapoly_update()
180 ctx->state = CHACHAPOLY_STATE_CIPHERTEXT; in mbedtls_chachapoly_update()
221 if (ctx->state == CHACHAPOLY_STATE_INIT) { in mbedtls_chachapoly_finish()
225 if (ctx->state == CHACHAPOLY_STATE_AAD) { in mbedtls_chachapoly_finish()
[all …]
Dccm.c124 ctx->state |= CCM_STATE__ERROR; in mbedtls_ccm_crypt()
137 ctx->state = CCM_STATE__CLEAR; in mbedtls_ccm_clear_state()
151 if (!(ctx->state & CCM_STATE__STARTED) || !(ctx->state & CCM_STATE__LENGTHS_SET)) { in ccm_calculate_first_block_if_ready()
187 ctx->state |= CCM_STATE__ERROR; in ccm_calculate_first_block_if_ready()
193 ctx->state |= CCM_STATE__ERROR; in ccm_calculate_first_block_if_ready()
234 ctx->state |= CCM_STATE__STARTED; in mbedtls_ccm_starts()
263 ctx->state |= CCM_STATE__LENGTHS_SET; in mbedtls_ccm_set_lengths()
274 if (ctx->state & CCM_STATE__ERROR) { in mbedtls_ccm_update_ad()
279 if (ctx->state & CCM_STATE__AUTH_DATA_FINISHED) { in mbedtls_ccm_update_ad()
283 if (!(ctx->state & CCM_STATE__AUTH_DATA_STARTED)) { in mbedtls_ccm_update_ad()
[all …]
Dsha512.c263 ctx->state[0] = UL64(0x6A09E667F3BCC908); in mbedtls_sha512_starts()
264 ctx->state[1] = UL64(0xBB67AE8584CAA73B); in mbedtls_sha512_starts()
265 ctx->state[2] = UL64(0x3C6EF372FE94F82B); in mbedtls_sha512_starts()
266 ctx->state[3] = UL64(0xA54FF53A5F1D36F1); in mbedtls_sha512_starts()
267 ctx->state[4] = UL64(0x510E527FADE682D1); in mbedtls_sha512_starts()
268 ctx->state[5] = UL64(0x9B05688C2B3E6C1F); in mbedtls_sha512_starts()
269 ctx->state[6] = UL64(0x1F83D9ABFB41BD6B); in mbedtls_sha512_starts()
270 ctx->state[7] = UL64(0x5BE0CD19137E2179); in mbedtls_sha512_starts()
274 ctx->state[0] = UL64(0xCBBB9D5DC1059ED8); in mbedtls_sha512_starts()
275 ctx->state[1] = UL64(0x629A292A367CD507); in mbedtls_sha512_starts()
[all …]
Dripemd160.c68 ctx->state[0] = 0x67452301; in mbedtls_ripemd160_starts()
69 ctx->state[1] = 0xEFCDAB89; in mbedtls_ripemd160_starts()
70 ctx->state[2] = 0x98BADCFE; in mbedtls_ripemd160_starts()
71 ctx->state[3] = 0x10325476; in mbedtls_ripemd160_starts()
72 ctx->state[4] = 0xC3D2E1F0; in mbedtls_ripemd160_starts()
105 local.A = local.Ap = ctx->state[0]; in mbedtls_internal_ripemd160_process()
106 local.B = local.Bp = ctx->state[1]; in mbedtls_internal_ripemd160_process()
107 local.C = local.Cp = ctx->state[2]; in mbedtls_internal_ripemd160_process()
108 local.D = local.Dp = ctx->state[3]; in mbedtls_internal_ripemd160_process()
109 local.E = local.Ep = ctx->state[4]; in mbedtls_internal_ripemd160_process()
[all …]
Dmd5.c67 ctx->state[0] = 0x67452301; in mbedtls_md5_starts()
68 ctx->state[1] = 0xEFCDAB89; in mbedtls_md5_starts()
69 ctx->state[2] = 0x98BADCFE; in mbedtls_md5_starts()
70 ctx->state[3] = 0x10325476; in mbedtls_md5_starts()
110 local.A = ctx->state[0]; in mbedtls_internal_md5_process()
111 local.B = ctx->state[1]; in mbedtls_internal_md5_process()
112 local.C = ctx->state[2]; in mbedtls_internal_md5_process()
113 local.D = ctx->state[3]; in mbedtls_internal_md5_process()
199 ctx->state[0] += local.A; in mbedtls_internal_md5_process()
200 ctx->state[1] += local.B; in mbedtls_internal_md5_process()
[all …]
Dsha1.c67 ctx->state[0] = 0x67452301; in mbedtls_sha1_starts()
68 ctx->state[1] = 0xEFCDAB89; in mbedtls_sha1_starts()
69 ctx->state[2] = 0x98BADCFE; in mbedtls_sha1_starts()
70 ctx->state[3] = 0x10325476; in mbedtls_sha1_starts()
71 ctx->state[4] = 0xC3D2E1F0; in mbedtls_sha1_starts()
119 local.A = ctx->state[0]; in mbedtls_internal_sha1_process()
120 local.B = ctx->state[1]; in mbedtls_internal_sha1_process()
121 local.C = ctx->state[2]; in mbedtls_internal_sha1_process()
122 local.D = ctx->state[3]; in mbedtls_internal_sha1_process()
123 local.E = ctx->state[4]; in mbedtls_internal_sha1_process()
[all …]
Decdsa.c54 } state; member
64 ctx->state = ecdsa_ver_init; in ecdsa_restart_ver_init()
94 } state; member
106 ctx->state = ecdsa_sig_init; in ecdsa_restart_sig_init()
131 } state; member
140 ctx->state = ecdsa_det_init; in ecdsa_restart_det_init()
280 if (rs_ctx->sig->state == ecdsa_sig_mul) { in mbedtls_ecdsa_sign_restartable()
283 if (rs_ctx->sig->state == ecdsa_sig_modn) { in mbedtls_ecdsa_sign_restartable()
311 rs_ctx->sig->state = ecdsa_sig_mul; in mbedtls_ecdsa_sign_restartable()
325 rs_ctx->sig->state = ecdsa_sig_modn; in mbedtls_ecdsa_sign_restartable()
[all …]
Dssl_ticket.c311 unsigned char *state = state_len_bytes + TICKET_CRYPT_LEN_BYTES; in mbedtls_ssl_ticket_write() local
350 state, end - state, in mbedtls_ssl_ticket_write()
361 state, clear_len, in mbedtls_ssl_ticket_write()
362 state, end - state, in mbedtls_ssl_ticket_write()
372 state, clear_len, in mbedtls_ssl_ticket_write()
373 state, end - state, &ciph_len, in mbedtls_ssl_ticket_write()
Decp.c144 } state; member
156 ctx->state = ecp_rsm_init; in ecp_restart_rsm_init()
193 } state; member
203 ctx->state = ecp_rsma_mul1; in ecp_restart_ma_init()
1874 if (rs_ctx->rsm->state == ecp_rsm_pre_dbl) { in ecp_precompute_comb()
1877 if (rs_ctx->rsm->state == ecp_rsm_pre_norm_dbl) { in ecp_precompute_comb()
1880 if (rs_ctx->rsm->state == ecp_rsm_pre_add) { in ecp_precompute_comb()
1883 if (rs_ctx->rsm->state == ecp_rsm_pre_norm_add) { in ecp_precompute_comb()
1893 rs_ctx->rsm->state = ecp_rsm_pre_dbl; in ecp_precompute_comb()
1929 rs_ctx->rsm->state = ecp_rsm_pre_norm_dbl; in ecp_precompute_comb()
[all …]
Dssl_tls12_client.c1166 ssl->state = MBEDTLS_SSL_CLIENT_HELLO; in ssl_parse_hello_verify_request()
1374 ssl->state++; in ssl_parse_server_hello()
1383 ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC; in ssl_parse_server_hello()
2087 ssl->state++; in ssl_parse_server_key_exchange()
2108 ssl->state++; in ssl_parse_server_key_exchange()
2450 ssl->state++; in ssl_parse_server_key_exchange()
2468 ssl->state++; in ssl_parse_certificate_request()
2495 ssl->state++; in ssl_parse_certificate_request()
2513 ssl->state++; in ssl_parse_certificate_request()
2686 ssl->state++; in ssl_parse_server_hello_done()
[all …]
Dpsa_crypto.c5169 if (hkdf->state < HKDF_STATE_KEYED ||
5177 hkdf->state = HKDF_STATE_OUTPUT;
5378 switch (tls12_prf->state) {
5380 tls12_prf->state = PSA_TLS12_PRF_STATE_OUTPUT;
6060 if (hkdf->state != HKDF_STATE_INIT) {
6069 hkdf->state = HKDF_STATE_STARTED;
6079 if (hkdf->state != HKDF_STATE_INIT) {
6094 if (hkdf->state == HKDF_STATE_INIT) {
6106 hkdf->state = HKDF_STATE_STARTED;
6108 if (hkdf->state != HKDF_STATE_STARTED) {
[all …]
Dssl_tls12_server.c1656 ssl->state++; in ssl_parse_client_hello()
2081 ssl->state = MBEDTLS_SSL_SERVER_HELLO_VERIFY_REQUEST_SENT; in ssl_write_hello_verify_request()
2228 ssl->state++; in ssl_write_server_hello()
2252 ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC; in ssl_write_server_hello()
2377 ssl->state++; in ssl_write_certificate_request()
2400 ssl->state++; in ssl_write_certificate_request()
3199 ssl->state++; in ssl_write_server_key_exchange()
3253 ssl->state++; in ssl_write_server_key_exchange()
3275 ssl->state++; in ssl_write_server_hello_done()
3982 ssl->state++; in ssl_parse_client_key_exchange()
[all …]
/mbedtls-3.5.0/docs/architecture/testing/
Dpsa-storage-format-testing.md23state of the storage after the key is created. The test case creates a key as indicated by the par…
27 … version W ≥ V, it creates and reads back a storage state which is known to be identical to the st…
43 The PSA subsystem provides storage on top of the PSA trusted storage interface. The state of the st…
46 * The [random generator injected seed or state file](#random-generator-state) (`PSA_CRYPTO_ITS_RAND…
48 * [Driver state files](#driver-state-files).
109 ## Random generator state
113 ## Driver state files
/mbedtls-3.5.0/tests/scripts/
Dcheck_names.py472 state = states.OUTSIDE_KEYWORD
479 if (state == states.OUTSIDE_KEYWORD and
483 state = states.IN_BRACES
484 elif (state == states.OUTSIDE_KEYWORD and
486 state = states.IN_BETWEEN
487 elif (state == states.IN_BETWEEN and
489 state = states.IN_BRACES
490 elif (state == states.IN_BRACES and
492 state = states.OUTSIDE_KEYWORD
493 elif (state == states.IN_BRACES and
Dgenerate_test_code.py713 state = __state_read_name
724 if state == __state_read_args:
731 if state == __state_read_name:
734 state = __state_read_args
735 elif state == __state_read_args:
753 state = __state_read_name
754 if state == __state_read_args:
/mbedtls-3.5.0/tests/suites/
Dtest_suite_psa_crypto_init.function41 fake_entropy_state_t *state = state_arg;
44 if (state->step >= state->max_steps) {
48 *olen = MIN(len, state->length_sequence[state->step]);
52 ++state->step;
Dtest_suite_chachapoly.function99 /* Initial state: finish, update, update_aad forbidden */
109 /* Still initial state: finish, update, update_aad forbidden */
/mbedtls-3.5.0/docs/architecture/
Dtls13-support.md146 (1) These options must remain in their default state of enabled.
187 DTLS retransmission state machine.
388 The TLS 1.3 handshake protocol is implemented as a state machine. The
391 possible states of the state machine.
398 given state to be duplicated across several state handlers. For example, on
405 and outbound keys are updated. The `MBEDTLS_SSL_CLIENT_CERTIFICATE` state on
422 * coordination stage: check if the state should be bypassed. This stage is
435 `MBEDTLS_ERR_SSL_WANT_READ` without changing the current state and it will be
454 * state change: the state change is done in the main state handler to ease the
455 navigation of the state machine transitions.
[all …]
/mbedtls-3.5.0/include/mbedtls/
Dripemd160.h44 uint32_t MBEDTLS_PRIVATE(state)[5]; /*!< intermediate digest state */
Dmd5.h53 uint32_t MBEDTLS_PRIVATE(state)[4]; /*!< intermediate digest state */
Dsha1.h59 uint32_t MBEDTLS_PRIVATE(state)[5]; /*!< The intermediate digest state. */

123