Home
last modified time | relevance | path

Searched refs:plain (Results 1 – 25 of 123) sorted by relevance

12345

/dragonfly/contrib/wpa_supplicant/src/crypto/
H A Dcrypto_internal-cipher.c110 if (plain != crypt) in crypto_cipher_encrypt()
111 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt()
126 plain += AES_BLOCK_SIZE; in crypto_cipher_encrypt()
140 plain += 8; in crypto_cipher_encrypt()
154 plain += 8; in crypto_cipher_encrypt()
167 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
174 if (plain != crypt) in crypto_cipher_decrypt()
175 os_memcpy(plain, crypt, len); in crypto_cipher_decrypt()
190 plain += AES_BLOCK_SIZE; in crypto_cipher_decrypt()
204 plain += 8; in crypto_cipher_decrypt()
[all …]
H A Dcrypto_libtomcrypt.c360 if (plain != crypt) in crypto_cipher_encrypt()
361 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt()
379 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
384 if (plain != crypt) in crypto_cipher_decrypt()
385 os_memcpy(plain, crypt, len); in crypto_cipher_decrypt()
617 u8 *plain, size_t *plain_len) in crypto_public_key_decrypt_pkcs1() argument
642 plain[0] != 0x00 || plain[1] != 0x01 || plain[2] != 0xff) { in crypto_public_key_decrypt_pkcs1()
648 pos = plain + 3; in crypto_public_key_decrypt_pkcs1()
651 if (pos - plain - 2 < 8) { in crypto_public_key_decrypt_pkcs1()
664 len -= pos - plain; in crypto_public_key_decrypt_pkcs1()
[all …]
H A Ddes-internal.c435 void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt) in des_block_encrypt() argument
438 work[0] = WPA_GET_BE32(plain); in des_block_encrypt()
439 work[1] = WPA_GET_BE32(plain + 4); in des_block_encrypt()
446 void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain) in des_block_decrypt() argument
452 WPA_PUT_BE32(plain, work[0]); in des_block_decrypt()
453 WPA_PUT_BE32(plain + 4, work[1]); in des_block_decrypt()
469 void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt) in des3_encrypt() argument
473 work[0] = WPA_GET_BE32(plain); in des3_encrypt()
474 work[1] = WPA_GET_BE32(plain + 4); in des3_encrypt()
492 WPA_PUT_BE32(plain, work[0]); in des3_decrypt()
[all …]
H A Ddes_i.h18 void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt);
19 void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain);
22 void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
23 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
H A Daes_wrap.h21 int __must_check aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain,
24 const u8 *cipher, u8 *plain);
54 const u8 *plain, size_t plain_len,
61 u8 *plain);
66 size_t M, const u8 *plain, size_t plain_len,
71 u8 *plain);
H A Daes-ccm.c149 size_t M, const u8 *plain, size_t plain_len, in aes_ccm_ae() argument
164 aes_ccm_auth(aes, plain, plain_len, x); in aes_ccm_ae()
168 aes_ccm_encr(aes, L, plain, plain_len, crypt, a); in aes_ccm_ae()
180 const u8 *aad, size_t aad_len, const u8 *auth, u8 *plain) in aes_ccm_ad() argument
199 aes_ccm_encr(aes, L, crypt, crypt_len, plain, a); in aes_ccm_ad()
202 aes_ccm_auth(aes, plain, crypt_len, x); in aes_ccm_ad()
H A Daes-unwrap.c27 u8 *plain) in aes_unwrap() argument
36 r = plain; in aes_unwrap()
51 r = plain + (n - 1) * 8; in aes_unwrap()
H A Dcrypto_nettle.c261 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
264 nettle_aes_encrypt(actx, AES_BLOCK_SIZE, crypt, plain); in aes_encrypt()
292 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
295 nettle_aes_decrypt(actx, AES_BLOCK_SIZE, plain, crypt); in aes_decrypt()
436 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
441 nettle_arcfour_crypt(&ctx->u.arcfour_ctx, len, crypt, plain); in crypto_cipher_encrypt()
452 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
456 nettle_arcfour_crypt(&ctx->u.arcfour_ctx, len, plain, crypt); in crypto_cipher_decrypt()
H A Dcrypto_gnutls.c237 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
240 gcry_cipher_encrypt(hd, crypt, 16, plain, 16); in aes_encrypt()
271 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
274 gcry_cipher_decrypt(hd, plain, 16, crypt, 16); in aes_decrypt()
481 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
484 if (gcry_cipher_encrypt(ctx->enc, crypt, len, plain, len) != in crypto_cipher_encrypt()
492 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
494 if (gcry_cipher_decrypt(ctx->dec, plain, len, crypt, len) != in crypto_cipher_decrypt()
H A Daes.h15 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt);
18 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
H A Dcrypto.h128 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt);
151 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
253 const u8 *plain, u8 *crypt, size_t len);
268 const u8 *crypt, u8 *plain, size_t len);
418 u8 *plain, size_t *plain_len);
H A Dcrypto_wolfssl.c328 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
330 wc_AesEncryptDirect(ctx, crypt, plain); in aes_encrypt()
361 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
363 wc_AesDecryptDirect(ctx, plain, crypt); in aes_decrypt()
426 u8 *plain) in aes_unwrap() argument
551 wc_Arc4Process(&ctx->enc.arc4, crypt, plain, len); in crypto_cipher_encrypt()
557 if (wc_AesCbcEncrypt(&ctx->enc.aes, crypt, plain, len) != 0) in crypto_cipher_encrypt()
563 if (wc_Des3_CbcEncrypt(&ctx->enc.des3, crypt, plain, len) != 0) in crypto_cipher_encrypt()
575 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
581 wc_Arc4Process(&ctx->dec.arc4, plain, crypt, len); in crypto_cipher_decrypt()
[all …]
/dragonfly/contrib/wpa_supplicant/src/tls/
H A Dpkcs1.c136 u8 *plain, size_t *plain_len) in pkcs1_decrypt_public_key() argument
142 if (crypto_rsa_exptmod(crypt, crypt_len, plain, &len, key, 0) < 0) in pkcs1_decrypt_public_key()
157 plain[0] != 0x00 || plain[1] != 0x01) { in pkcs1_decrypt_public_key()
163 pos = plain + 3; in pkcs1_decrypt_public_key()
165 if (plain[2] != 0xff) { in pkcs1_decrypt_public_key()
170 while (pos < plain + len && *pos == 0xff) in pkcs1_decrypt_public_key()
173 if (pos - plain - 2 < 8) { in pkcs1_decrypt_public_key()
180 if (pos + 16 /* min hash len */ >= plain + len || *pos != 0x00) { in pkcs1_decrypt_public_key()
186 len -= pos - plain; in pkcs1_decrypt_public_key()
189 os_memmove(plain, pos, len); in pkcs1_decrypt_public_key()
/dragonfly/sys/opencrypto/
H A Dskipjack.c127 skipjack_forwards(u_int8_t *plain, u_int8_t *cipher, u_int8_t **key_tables) in skipjack_forwards() argument
129 u_int8_t wh1 = plain[0]; u_int8_t wl1 = plain[1]; in skipjack_forwards()
130 u_int8_t wh2 = plain[2]; u_int8_t wl2 = plain[3]; in skipjack_forwards()
131 u_int8_t wh3 = plain[4]; u_int8_t wl3 = plain[5]; in skipjack_forwards()
132 u_int8_t wh4 = plain[6]; u_int8_t wl4 = plain[7]; in skipjack_forwards()
194 skipjack_backwards (u_int8_t *cipher, u_int8_t *plain, u_int8_t **key_tables) in skipjack_backwards() argument
254 plain [0] = wh1; plain [1] = wl1; in skipjack_backwards()
255 plain [2] = wh2; plain [3] = wl2; in skipjack_backwards()
256 plain [4] = wh3; plain [5] = wl3; in skipjack_backwards()
257 plain [6] = wh4; plain [7] = wl4; in skipjack_backwards()
H A Dskipjack.h17 extern void skipjack_forwards(u_int8_t *plain, u_int8_t *cipher, u_int8_t **key);
18 extern void skipjack_backwards(u_int8_t *cipher, u_int8_t *plain, u_int8_t **key);
/dragonfly/contrib/wpa_supplicant/src/wps/
H A Dwps_enrollee.c210 struct wpabuf *msg, *plain; in wps_build_m5() local
214 plain = wpabuf_alloc(200); in wps_build_m5()
215 if (plain == NULL) in wps_build_m5()
220 wpabuf_free(plain); in wps_build_m5()
232 wpabuf_clear_free(plain); in wps_build_m5()
236 wpabuf_clear_free(plain); in wps_build_m5()
368 end = wpabuf_put(plain, 0); in wps_build_ap_settings()
384 if (plain == NULL) in wps_build_m7()
389 wpabuf_free(plain); in wps_build_m7()
402 wpabuf_clear_free(plain); in wps_build_m7()
[all …]
H A Dwps_registrar.c1867 if (plain == NULL) { in wps_build_ap_cred()
1881 wpabuf_clear_free(plain); in wps_build_ap_cred()
1936 if (plain == NULL || in wps_build_m2()
2009 if (plain == NULL) in wps_build_m4()
2014 wpabuf_free(plain); in wps_build_m4()
2031 wpabuf_clear_free(plain); in wps_build_m4()
2045 if (plain == NULL) in wps_build_m6()
2050 wpabuf_free(plain); in wps_build_m6()
2066 wpabuf_clear_free(plain); in wps_build_m6()
2081 if (plain == NULL) in wps_build_m8()
[all …]
H A Dwps_common.c360 struct wpabuf *plain; in wps_get_oob_cred() local
362 plain = wpabuf_alloc(500); in wps_get_oob_cred()
363 if (plain == NULL) { in wps_get_oob_cred()
373 if (wps_build_cred(&data, plain) || in wps_get_oob_cred()
374 (rf_band && wps_build_rf_bands_attr(plain, rf_band)) || in wps_get_oob_cred()
375 (channel && wps_build_ap_channel(plain, channel)) || in wps_get_oob_cred()
376 wps_build_mac_addr(plain, wps->dev.mac_addr) || in wps_get_oob_cred()
377 wps_build_wfa_ext(plain, 0, NULL, 0, 0)) { in wps_get_oob_cred()
379 wpabuf_clear_free(plain); in wps_get_oob_cred()
408 return plain; in wps_get_oob_cred()
H A Dwps_attr_build.c385 struct wpabuf *plain) in wps_build_encr_settings() argument
394 pad_len = block_size - wpabuf_len(plain) % block_size; in wps_build_encr_settings()
395 os_memset(wpabuf_put(plain, pad_len), pad_len, pad_len); in wps_build_encr_settings()
398 wpabuf_put_be16(msg, block_size + wpabuf_len(plain)); in wps_build_encr_settings()
405 wpabuf_put_buf(msg, plain); in wps_build_encr_settings()
406 if (aes_128_cbc_encrypt(wps->keywrapkey, iv, data, wpabuf_len(plain))) in wps_build_encr_settings()
/dragonfly/contrib/wpa_supplicant/src/eap_peer/
H A Dikev2.c1109 if (plain == NULL) { in ikev2_build_sa_init()
1119 wpabuf_free(plain); in ikev2_build_sa_init()
1123 wpabuf_free(plain); in ikev2_build_sa_init()
1141 struct wpabuf *msg, *plain; in ikev2_build_sa_auth() local
1151 if (plain == NULL) { in ikev2_build_sa_auth()
1159 &data->keys, 0, msg, plain, in ikev2_build_sa_auth()
1161 wpabuf_free(plain); in ikev2_build_sa_auth()
1165 wpabuf_free(plain); in ikev2_build_sa_auth()
1185 if (plain == NULL) { in ikev2_build_notify()
1197 wpabuf_free(plain); in ikev2_build_notify()
[all …]
/dragonfly/contrib/wpa_supplicant/src/eap_common/
H A Dikev2_common.c176 const u8 *plain, u8 *crypt, size_t len) in ikev2_encr_encrypt() argument
199 if (crypto_cipher_encrypt(cipher, plain, crypt, len) < 0) { in ikev2_encr_encrypt()
211 const u8 *crypt, u8 *plain, size_t len) in ikev2_encr_decrypt() argument
234 if (crypto_cipher_decrypt(cipher, crypt, plain, len) < 0) { in ikev2_encr_decrypt()
532 struct wpabuf *plain, u8 next_payload) in ikev2_build_encrypted() argument
580 pad_len = iv_len - (wpabuf_len(plain) + 1) % iv_len; in ikev2_build_encrypted()
583 wpabuf_put(plain, pad_len); in ikev2_build_encrypted()
584 wpabuf_put_u8(plain, pad_len); in ikev2_build_encrypted()
587 wpabuf_head(plain), wpabuf_mhead(plain), in ikev2_build_encrypted()
588 wpabuf_len(plain)) < 0) in ikev2_build_encrypted()
[all …]
/dragonfly/contrib/wpa_supplicant/src/ap/
H A Dwpa_auth_ft.c94 *plain = NULL; in wpa_ft_rrb_decrypt()
101 if (!*plain) in wpa_ft_rrb_decrypt()
123 os_free(*plain); in wpa_ft_rrb_decrypt()
124 *plain = NULL; in wpa_ft_rrb_decrypt()
167 plain += len; in wpa_ft_rrb_get_tlv()
203 plain += len; in wpa_ft_rrb_dump()
293 plain += len; in wpa_ft_rrb_get_tlv_vlan()
446 if (!*plain) { in wpa_ft_rrb_lin()
451 pos = *plain; in wpa_ft_rrb_lin()
466 os_free(*plain); in wpa_ft_rrb_lin()
[all …]
/dragonfly/contrib/grep/lib/
H A Dobstack.c89 return h->chunkfun.plain (size); in call_chunkfun()
98 h->freefun.plain (old_chunk); in call_freefun()
155 h->chunkfun.plain = chunkfun; in _obstack_begin()
156 h->freefun.plain = freefun; in _obstack_begin()
/dragonfly/contrib/wpa_supplicant/src/eap_server/
H A Deap_server_tls.c271 struct wpabuf *plain, *encr; in eap_tls_process_msg() local
282 plain = wpabuf_alloc(1); in eap_tls_process_msg()
283 if (!plain) in eap_tls_process_msg()
285 wpabuf_put_u8(plain, 0); in eap_tls_process_msg()
286 encr = eap_server_tls_encrypt(sm, &data->ssl, plain); in eap_tls_process_msg()
287 wpabuf_free(plain); in eap_tls_process_msg()
/dragonfly/crypto/libressl/ssl/
H A Dtls12_record_layer.c887 uint8_t *plain; in tls12_record_layer_open_record_protected_aead() local
917 plain = (uint8_t *)CBS_data(fragment); in tls12_record_layer_open_record_protected_aead()
939 *out = plain; in tls12_record_layer_open_record_protected_aead()
961 uint8_t *plain; in tls12_record_layer_open_record_protected_cipher() local
1005 plain = (uint8_t *)CBS_data(fragment); in tls12_record_layer_open_record_protected_cipher()
1011 rrec.data = plain; in tls12_record_layer_open_record_protected_cipher()
1012 rrec.input = plain; in tls12_record_layer_open_record_protected_cipher()
1201 uint8_t *plain = NULL; in tls12_record_layer_seal_record_protected_cipher() local
1247 if (!CBB_finish(&cbb, &plain, &plain_len)) in tls12_record_layer_seal_record_protected_cipher()
1257 if (!EVP_Cipher(enc, enc_data, plain, plain_len)) in tls12_record_layer_seal_record_protected_cipher()
[all …]

12345