Home
last modified time | relevance | path

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

12345678910>>...15

/external/wpa_supplicant_8/src/tls/
Dpkcs1.c129 u8 *plain, size_t *plain_len) in pkcs1_decrypt_public_key() argument
135 if (crypto_rsa_exptmod(crypt, crypt_len, plain, &len, key, 0) < 0) in pkcs1_decrypt_public_key()
148 plain[0] != 0x00 || (plain[1] != 0x00 && plain[1] != 0x01)) { in pkcs1_decrypt_public_key()
154 pos = plain + 3; in pkcs1_decrypt_public_key()
155 if (plain[1] == 0x00) { in pkcs1_decrypt_public_key()
157 if (plain[2] != 0x00) { in pkcs1_decrypt_public_key()
162 while (pos + 1 < plain + len && *pos == 0x00 && pos[1] == 0x00) in pkcs1_decrypt_public_key()
166 if (plain[2] != 0xff) { in pkcs1_decrypt_public_key()
171 while (pos < plain + len && *pos == 0xff) in pkcs1_decrypt_public_key()
175 if (pos - plain - 2 < 8) { in pkcs1_decrypt_public_key()
[all …]
/external/wpa_supplicant_8/src/crypto/
Dcrypto_internal-cipher.c103 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
110 if (plain != crypt) in crypto_cipher_encrypt()
111 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt()
122 ctx->u.aes.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
126 plain += AES_BLOCK_SIZE; in crypto_cipher_encrypt()
136 ctx->u.des3.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
140 plain += 8; in crypto_cipher_encrypt()
150 ctx->u.des3.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
154 plain += 8; in crypto_cipher_encrypt()
167 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
[all …]
Dcrypto_libtomcrypt.c99 void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
102 aes_ecb_encrypt(plain, crypt, skey); in aes_encrypt()
128 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
131 aes_ecb_encrypt(plain, (u8 *) crypt, skey); in aes_decrypt()
350 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
356 if (plain != crypt) in crypto_cipher_encrypt()
357 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt()
364 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc); in crypto_cipher_encrypt()
375 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
380 if (plain != crypt) in crypto_cipher_decrypt()
[all …]
Ddes-internal.c434 void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt) in des_block_encrypt() argument
437 work[0] = WPA_GET_BE32(plain); in des_block_encrypt()
438 work[1] = WPA_GET_BE32(plain + 4); in des_block_encrypt()
445 void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain) in des_block_decrypt() argument
451 WPA_PUT_BE32(plain, work[0]); in des_block_decrypt()
452 WPA_PUT_BE32(plain + 4, work[1]); in des_block_decrypt()
468 void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt) in des3_encrypt() argument
472 work[0] = WPA_GET_BE32(plain); in des3_encrypt()
473 work[1] = WPA_GET_BE32(plain + 4); in des3_encrypt()
482 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain) in des3_decrypt() argument
[all …]
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);
Daes_wrap.h21 int __must_check aes_wrap(const u8 *kek, int n, const u8 *plain, u8 *cipher);
22 int __must_check aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain);
45 const u8 *plain, size_t plain_len,
52 u8 *plain);
57 size_t M, const u8 *plain, size_t plain_len,
62 u8 *plain);
Dcrypto_gnutls.c110 void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
113 gcry_cipher_encrypt(hd, crypt, 16, plain, 16); in aes_encrypt()
140 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
143 gcry_cipher_decrypt(hd, plain, 16, crypt, 16); in aes_decrypt()
274 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
277 if (gcry_cipher_encrypt(ctx->enc, crypt, len, plain, len) != in crypto_cipher_encrypt()
285 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
287 if (gcry_cipher_decrypt(ctx->dec, plain, len, crypt, len) != in crypto_cipher_decrypt()
Dcrypto.h104 void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt);
126 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
227 const u8 *plain, u8 *crypt, size_t len);
242 const u8 *crypt, u8 *plain, size_t len);
388 u8 *plain, size_t *plain_len);
Daes-unwrap.c25 int aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain) in aes_unwrap() argument
33 r = plain; in aes_unwrap()
48 r = plain + (n - 1) * 8; in aes_unwrap()
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()
/external/openssl/crypto/des/
Ddestest.c290 static unsigned char plain[24]= variable
612 for (i=0; i<sizeof(plain); i++) in main()
613 des_cfb_encrypt(&(plain[i]),&(cfb_buf1[i]), in main()
615 if (memcmp(cfb_cipher8,cfb_buf1,sizeof(plain)) != 0) in main()
622 for (i=0; i<sizeof(plain); i++) in main()
625 if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) in main()
639 des_ofb_encrypt(plain,ofb_buf1,64,sizeof(plain)/8,ks,&ofb_tmp); in main()
653 if (memcmp(plain,ofb_buf2,sizeof(ofb_buf2)) != 0) in main()
660 plain[8+0], plain[8+1], plain[8+2], plain[8+3], in main()
661 plain[8+4], plain[8+5], plain[8+6], plain[8+7]); in main()
[all …]
/external/wpa_supplicant_6/wpa_supplicant/src/crypto/
Dcrypto_internal.c39 void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
40 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
310 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
317 if (plain != crypt) in crypto_cipher_encrypt()
318 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt()
329 ctx->u.aes.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
334 plain += ctx->u.aes.block_size; in crypto_cipher_encrypt()
344 ctx->u.des3.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
348 plain += 8; in crypto_cipher_encrypt()
361 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
[all …]
Dcrypto_libtomcrypt.c104 void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
107 aes_ecb_encrypt(plain, crypt, skey); in aes_encrypt()
133 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
136 aes_ecb_encrypt(plain, (u8 *) crypt, skey); in aes_decrypt()
357 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
363 if (plain != crypt) in crypto_cipher_encrypt()
364 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt()
371 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc); in crypto_cipher_encrypt()
382 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
387 if (plain != crypt) in crypto_cipher_decrypt()
[all …]
Dcrypto.h105 void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt);
127 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
227 const u8 *plain, u8 *crypt, size_t len);
242 const u8 *crypt, u8 *plain, size_t len);
386 u8 *plain, size_t *plain_len);
Dcrypto_openssl.c174 void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
176 AES_encrypt(plain, crypt, ctx); in aes_encrypt()
200 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
202 AES_decrypt(crypt, plain, ctx); in aes_decrypt()
334 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
338 if (!EVP_EncryptUpdate(&ctx->enc, crypt, &outl, plain, len)) in crypto_cipher_encrypt()
345 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
349 if (!EVP_DecryptUpdate(&ctx->dec, plain, &outl, crypt, len)) in crypto_cipher_decrypt()
Dcrypto_gnutls.c122 void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
125 gcry_cipher_encrypt(hd, crypt, 16, plain, 16); in aes_encrypt()
152 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
155 gcry_cipher_decrypt(hd, plain, 16, crypt, 16); in aes_decrypt()
286 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
289 if (gcry_cipher_encrypt(ctx->enc, crypt, len, plain, len) != in crypto_cipher_encrypt()
297 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
299 if (gcry_cipher_decrypt(ctx->dec, plain, len, crypt, len) != in crypto_cipher_decrypt()
/external/openssh/
Dcipher-aes.c79 u_char *cprev, *cnow, *plain, *ivp; in ssh_rijndael_cbc() local
92 plain = (u_char *)src; in ssh_rijndael_cbc()
94 for (i = 0; i < blocks; i++, plain+=RIJNDAEL_BLOCKSIZE, in ssh_rijndael_cbc()
97 buf[j] = plain[j] ^ cprev[j]; in ssh_rijndael_cbc()
104 plain = dest+len-RIJNDAEL_BLOCKSIZE; in ssh_rijndael_cbc()
108 plain-=RIJNDAEL_BLOCKSIZE) { in ssh_rijndael_cbc()
109 rijndael_decrypt(&c->r_ctx, cnow, plain); in ssh_rijndael_cbc()
112 plain[j] ^= ivp[j]; in ssh_rijndael_cbc()
/external/chromium/third_party/libjingle/source/talk/xmpp/
Dsaslmechanism.cc56 SaslMechanism::Base64Encode(const std::string & plain) { in Base64Encode() argument
57 return Base64::Encode(plain); in Base64Encode()
66 SaslMechanism::Base64EncodeFromArray(const char * plain, size_t length) { in Base64EncodeFromArray() argument
68 Base64::EncodeFromArray(plain, length, &result); in Base64EncodeFromArray()
/external/wpa_supplicant_6/wpa_supplicant/tests/
Dtest_aes.c109 u8 plain[32]; in test_cbc() member
150 memcpy(buf, tv->plain, tv->len); in test_cbc()
158 if (memcmp(buf, tv->plain, tv->len) != 0) { in test_cbc()
237 u8 plain[] = { in main() local
251 if (aes_wrap(kek, 2, plain, result)) { in main()
263 if (memcmp(result, plain, 16) != 0) { in main()
/external/wpa_supplicant_6/wpa_supplicant/src/wps/
Dwps_enrollee.c195 struct wpabuf *msg, *plain; in wps_build_m5() local
199 plain = wpabuf_alloc(200); in wps_build_m5()
200 if (plain == NULL) in wps_build_m5()
205 wpabuf_free(plain); in wps_build_m5()
212 wps_build_e_snonce1(wps, plain) || in wps_build_m5()
213 wps_build_key_wrap_auth(wps, plain) || in wps_build_m5()
214 wps_build_encr_settings(wps, msg, plain) || in wps_build_m5()
216 wpabuf_free(plain); in wps_build_m5()
220 wpabuf_free(plain); in wps_build_m5()
277 static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain) in wps_build_ap_settings() argument
[all …]
Dwps_attr_build.c229 struct wpabuf *plain) in wps_build_encr_settings() argument
238 pad_len = block_size - wpabuf_len(plain) % block_size; in wps_build_encr_settings()
239 os_memset(wpabuf_put(plain, pad_len), pad_len, pad_len); in wps_build_encr_settings()
242 wpabuf_put_be16(msg, block_size + wpabuf_len(plain)); in wps_build_encr_settings()
249 wpabuf_put_buf(msg, plain); in wps_build_encr_settings()
250 if (aes_128_cbc_encrypt(wps->keywrapkey, iv, data, wpabuf_len(plain))) in wps_build_encr_settings()
/external/wpa_supplicant_8/src/wps/
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()
227 wps_build_e_snonce1(wps, plain) || in wps_build_m5()
228 wps_build_key_wrap_auth(wps, plain) || in wps_build_m5()
229 wps_build_encr_settings(wps, msg, plain) || in wps_build_m5()
232 wpabuf_free(plain); in wps_build_m5()
236 wpabuf_free(plain); in wps_build_m5()
320 static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain) in wps_build_ap_settings() argument
[all …]
/external/wpa_supplicant_8/src/eap_common/
Dikev2_common.c184 void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
185 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
190 const u8 *plain, u8 *crypt, size_t len) in ikev2_encr_encrypt() argument
234 if (crypto_cipher_encrypt(cipher, plain, crypt, len) < 0) { in ikev2_encr_encrypt()
249 const u8 *crypt, u8 *plain, size_t len) in ikev2_encr_decrypt() argument
273 des3_decrypt(crypt, &des3key, plain); in ikev2_encr_decrypt()
274 plain += 8; in ikev2_encr_decrypt()
297 if (crypto_cipher_decrypt(cipher, crypt, plain, len) < 0) { in ikev2_encr_decrypt()
594 struct wpabuf *plain, u8 next_payload) in ikev2_build_encrypted() argument
642 pad_len = iv_len - (wpabuf_len(plain) + 1) % iv_len; in ikev2_build_encrypted()
[all …]
/external/wpa_supplicant_6/wpa_supplicant/src/eap_common/
Dikev2_common.c189 void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
190 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
195 const u8 *plain, u8 *crypt, size_t len) in ikev2_encr_encrypt() argument
239 if (crypto_cipher_encrypt(cipher, plain, crypt, len) < 0) { in ikev2_encr_encrypt()
254 const u8 *crypt, u8 *plain, size_t len) in ikev2_encr_decrypt() argument
278 des3_decrypt(crypt, &des3key, plain); in ikev2_encr_decrypt()
279 plain += 8; in ikev2_encr_decrypt()
302 if (crypto_cipher_decrypt(cipher, crypt, plain, len) < 0) { in ikev2_encr_decrypt()
599 struct wpabuf *plain, u8 next_payload) in ikev2_build_encrypted() argument
647 pad_len = iv_len - (wpabuf_len(plain) + 1) % iv_len; in ikev2_build_encrypted()
[all …]
/external/wpa_supplicant_8/src/eap_peer/
Dikev2.c1167 struct wpabuf *plain = wpabuf_alloc(data->IDr_len + 1000); in ikev2_build_sa_init() local
1168 if (plain == NULL) { in ikev2_build_sa_init()
1172 if (ikev2_build_idr(data, plain, in ikev2_build_sa_init()
1176 &data->keys, 0, msg, plain, in ikev2_build_sa_init()
1178 wpabuf_free(plain); in ikev2_build_sa_init()
1182 wpabuf_free(plain); in ikev2_build_sa_init()
1200 struct wpabuf *msg, *plain; in ikev2_build_sa_auth() local
1209 plain = wpabuf_alloc(data->IDr_len + 1000); in ikev2_build_sa_auth()
1210 if (plain == NULL) { in ikev2_build_sa_auth()
1215 if (ikev2_build_idr(data, plain, IKEV2_PAYLOAD_AUTHENTICATION) || in ikev2_build_sa_auth()
[all …]

12345678910>>...15