/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/ |
H A D | crypto_internal-cipher.c | 103 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_ in crypto_cipher_decrypt() 166 crypto_cipher_decrypt(struct crypto_cipher *ctx, const u8 *crypt, u8 *plain, size_t len) crypto_cipher_decrypt() argument [all...] |
H A D | crypto_libtomcrypt.c | 100 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument 103 return aes_ecb_encrypt(plain, crypt, skey) == CRYPT_OK ? 0 : -1; in aes_encrypt() 129 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument 132 return aes_ecb_encrypt(plain, (u8 *) crypt, skey) == CRYPT_OK ? 0 : -1; in aes_decrypt() 354 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument 360 if (plain != crypt) in crypto_cipher_encrypt() 361 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt() 368 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc); in crypto_cipher_encrypt() 379 u8 *plain, size_t len) in crypto_cipher_decrypt() 384 if (plain ! in crypto_cipher_decrypt() 378 crypto_cipher_decrypt(struct crypto_cipher *ctx, const u8 *crypt, u8 *plain, size_t len) crypto_cipher_decrypt() argument 615 crypto_public_key_decrypt_pkcs1(struct crypto_public_key *key, const u8 *crypt, size_t crypt_len, u8 *plain, size_t *plain_len) crypto_public_key_decrypt_pkcs1() argument [all...] |
H A D | des_i.h | 18 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 D | aes_wrap.h | 21 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 D | aes-ccm.c | 149 size_t M, const u8 *plain, size_t plain_len, in aes_ccm_ae() 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() 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() 148 aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, size_t M, const u8 *plain, size_t plain_len, const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth) aes_ccm_ae() argument 178 aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce, size_t M, const u8 *crypt, size_t crypt_len, const u8 *aad, size_t aad_len, const u8 *auth, u8 *plain) aes_ccm_ad() argument
|
H A D | aes-unwrap.c | 23 * @plain: Plaintext key, n * 64 bits 27 u8 *plain) in aes_unwrap() 36 r = plain; in aes_unwrap() 51 r = plain + (n - 1) * 8; in aes_unwrap() 71 * These are already in @plain due to the location of temporary in aes_unwrap() 26 aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, u8 *plain) aes_unwrap() argument
|
H A D | des-internal.c | 435 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() 483 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain) in des3_decrypt() argument [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/ |
H A D | crypto_internal-cipher.c | 103 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_ in crypto_cipher_decrypt() 166 crypto_cipher_decrypt(struct crypto_cipher *ctx, const u8 *crypt, u8 *plain, size_t len) crypto_cipher_decrypt() argument [all...] |
H A D | crypto_libtomcrypt.c | 100 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument 103 return aes_ecb_encrypt(plain, crypt, skey) == CRYPT_OK ? 0 : -1; in aes_encrypt() 129 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument 132 return aes_ecb_encrypt(plain, (u8 *) crypt, skey) == CRYPT_OK ? 0 : -1; in aes_decrypt() 354 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument 360 if (plain != crypt) in crypto_cipher_encrypt() 361 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt() 368 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc); in crypto_cipher_encrypt() 379 u8 *plain, size_t len) in crypto_cipher_decrypt() 384 if (plain ! in crypto_cipher_decrypt() 378 crypto_cipher_decrypt(struct crypto_cipher *ctx, const u8 *crypt, u8 *plain, size_t len) crypto_cipher_decrypt() argument 615 crypto_public_key_decrypt_pkcs1(struct crypto_public_key *key, const u8 *crypt, size_t crypt_len, u8 *plain, size_t *plain_len) crypto_public_key_decrypt_pkcs1() argument [all...] |
H A D | des_i.h | 18 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 D | aes_wrap.h | 21 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 D | aes-ccm.c | 149 size_t M, const u8 *plain, size_t plain_len, in aes_ccm_ae() 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() 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() 148 aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, size_t M, const u8 *plain, size_t plain_len, const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth) aes_ccm_ae() argument 178 aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce, size_t M, const u8 *crypt, size_t crypt_len, const u8 *aad, size_t aad_len, const u8 *auth, u8 *plain) aes_ccm_ad() argument
|
H A D | aes-unwrap.c | 23 * @plain: Plaintext key, n * 64 bits 27 u8 *plain) in aes_unwrap() 36 r = plain; in aes_unwrap() 51 r = plain + (n - 1) * 8; in aes_unwrap() 71 * These are already in @plain due to the location of temporary in aes_unwrap() 26 aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, u8 *plain) aes_unwrap() argument
|
H A D | des-internal.c | 435 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() 483 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain) in des3_decrypt() argument [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/tls/ |
H A D | pkcs1.c | 136 u8 *plain, size_t *plain_len) in pkcs1_decrypt_public_key() 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() 160 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in pkcs1_decrypt_public_key() 164 pos = plain + 3; in pkcs1_decrypt_public_key() 166 if (plain[2] != 0xff) { in pkcs1_decrypt_public_key() 169 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in pkcs1_decrypt_public_key() 172 while (pos < plain + len && *pos == 0xff) in pkcs1_decrypt_public_key() 175 if (pos - plain in pkcs1_decrypt_public_key() 134 pkcs1_decrypt_public_key(struct crypto_rsa_key *key, const u8 *crypt, size_t crypt_len, u8 *plain, size_t *plain_len) pkcs1_decrypt_public_key() argument [all...] |
/third_party/node/test/parallel/ |
H A D | test-crypto-authenticated-stream.js | 49 const plain = new stream.PassThrough(); 52 plain.pipe(c).pipe(crypt); 53 plain.end(expected); 61 const plain = new Sink(); 62 crypt.pipe(d).pipe(plain); 66 plain.on('close', common.mustCall(() => { 67 const actual = Buffer.concat(plain.chunks); 84 const plain = fs.createReadStream(filename('a')); 86 plain.pipe(c).pipe(crypt); 107 const plain [all...] |
H A D | test-crypto-padding.js | 62 function enc(plain, pad) { 65 let hex = encrypt.update(plain, 'ascii', 'hex'); 73 let plain = decrypt.update(encd, 'hex'); 74 plain += decrypt.final('latin1'); 75 return plain;
|
H A D | test-crypto-authenticated.js | 109 plaintextLength: Buffer.from(test.plain, inputEncoding).length 122 let hex = encrypt.update(test.plain, inputEncoding, 'hex'); 155 assert.strictEqual(msg, test.plain); 171 let hex = encrypt.update(test.plain, 'ascii', 'hex'); 194 assert.strictEqual(msg, test.plain); 564 const plain = Buffer.from('Hello world', 'utf8'); 573 const ciphertext = Buffer.concat([cipher.update(plain), cipher.final()]); 589 assert(result.equals(plain)); 597 const plain = Buffer.from('Hello world', 'utf8'); 604 const ciphertext = Buffer.concat([cipher.update(plain), ciphe 630 plain: '4c616469657320616e642047656e746c656d656e206f662074686520636c6173' + global() property [all...] |
H A D | test-http-header-read.js | 32 const plain = 'text/plain'; 33 res.setHeader(contentType, plain); 40 assert.strictEqual(plain, res.getHeader(contentType));
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/tls/ |
H A D | pkcs1.c | 136 u8 *plain, size_t *plain_len) in pkcs1_decrypt_public_key() 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() 134 pkcs1_decrypt_public_key(struct crypto_rsa_key *key, const u8 *crypt, size_t crypt_len, u8 *plain, size_t *plain_len) pkcs1_decrypt_public_key() argument [all...] |
/third_party/openssl/test/ |
H A D | destest.c | 247 static unsigned char plain[24] = { variable 513 DES_cfb_encrypt(plain, cfb_buf1, bits, sizeof(plain), &ks, &cfb_tmp, in cfb_test() 515 if (!TEST_mem_eq(cfb_cipher, sizeof(plain), cfb_buf1, sizeof(plain))) in cfb_test() 518 DES_cfb_encrypt(cfb_buf1, cfb_buf2, bits, sizeof(plain), &ks, &cfb_tmp, in cfb_test() 520 return TEST_mem_eq(plain, sizeof(plain), cfb_buf2, sizeof(plain)); in cfb_test() 555 DES_cfb64_encrypt(plain, cfb_buf in test_des_cfb64() [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/wps/ |
H A D | wps_enrollee.c | 210 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_clear_free(plain); in wps_build_m5() 236 wpabuf_clear_free(plain); in wps_build_m5() 349 static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain) in wps_build_ap_settings() argument 379 struct wpabuf *msg, *plain; wps_build_m7() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/wps/ |
H A D | wps_enrollee.c | 210 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_clear_free(plain); in wps_build_m5() 236 wpabuf_clear_free(plain); in wps_build_m5() 349 static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain) in wps_build_ap_settings() argument 379 struct wpabuf *msg, *plain; wps_build_m7() local [all...] |
/third_party/ffmpeg/libavutil/tests/ |
H A D | aes_ctr.c | 25 static const DECLARE_ALIGNED(8, uint8_t, plain)[] = { 52 av_aes_ctr_crypt(ae, tmp, plain, sizeof(tmp)); in main() 55 if (memcmp(tmp, plain, sizeof(tmp)) != 0){ in main()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_common/ |
H A D | ikev2_common.c | 176 const u8 *plain, u8 *crypt, size_t len) in ikev2_encr_encrypt() 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() 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() 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() 175 ikev2_encr_encrypt(int alg, const u8 *key, size_t key_len, const u8 *iv, const u8 *plain, u8 *crypt, size_t len) ikev2_encr_encrypt() argument 210 ikev2_encr_decrypt(int alg, const u8 *key, size_t key_len, const u8 *iv, const u8 *crypt, u8 *plain, size_t len) ikev2_encr_decrypt() argument 530 ikev2_build_encrypted(int encr_id, int integ_id, struct ikev2_keys *keys, int initiator, struct wpabuf *msg, struct wpabuf *plain, u8 next_payload) ikev2_build_encrypted() argument [all...] |