| /NextBSD/crypto/openssl/crypto/des/ |
| HD | destest.c | 306 static unsigned char plain[24] = { variable 615 for (i = 0; i < sizeof(plain); i++) in main() 616 des_cfb_encrypt(&(plain[i]), &(cfb_buf1[i]), in main() 618 if (memcmp(cfb_cipher8, cfb_buf1, sizeof(plain)) != 0) { in main() 624 for (i = 0; i < sizeof(plain); i++) in main() 627 if (memcmp(plain, cfb_buf2, sizeof(plain)) != 0) { in main() 640 des_ofb_encrypt(plain, ofb_buf1, 64, sizeof(plain) / 8, ks, &ofb_tmp); in main() 656 if (memcmp(plain, ofb_buf2, sizeof(ofb_buf2)) != 0) { in main() 662 printf("%02X %02X %02X %02X %02X %02X %02X %02X\n", plain[8 + 0], in main() 663 plain[8 + 1], plain[8 + 2], plain[8 + 3], plain[8 + 4], in main() [all …]
|
| /NextBSD/contrib/netbsd-tests/lib/libdes/ |
| HD | t_des.c | 291 static unsigned char plain[24] = variable 391 des_cfb_encrypt(plain, cfb_buf1, bits, sizeof(plain), ks, &cfb_tmp, in cfb_test() 393 if (memcmp(cfb_cipher, cfb_buf1, sizeof(plain)) != 0) in cfb_test() 396 des_cfb_encrypt(cfb_buf1, cfb_buf2, bits, sizeof(plain), ks, &cfb_tmp, in cfb_test() 398 if (memcmp(plain, cfb_buf2, sizeof(plain)) != 0) in cfb_test() 413 des_cfb64_encrypt(plain, cfb_buf1, 12, ks, &cfb_tmp, &n, DES_ENCRYPT); in cfb64_test() 414 des_cfb64_encrypt(&(plain[12]), &(cfb_buf1[12]), sizeof(plain) - 12, ks, in cfb64_test() 416 if (memcmp(cfb_cipher, cfb_buf1, sizeof(plain)) != 0) in cfb64_test() 422 sizeof(plain) - 17, ks, &cfb_tmp, &n, DES_DECRYPT); in cfb64_test() 423 if (memcmp(plain, cfb_buf2, sizeof(plain)) != 0) in cfb64_test() [all …]
|
| /NextBSD/contrib/wpa/src/crypto/ |
| HD | 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_t len) in crypto_cipher_decrypt() argument [all …]
|
| HD | crypto_libtomcrypt.c | 99 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 …]
|
| HD | des-internal.c | 434 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 …]
|
| HD | 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);
|
| HD | 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); 52 const u8 *plain, size_t plain_len, 59 u8 *plain); 64 size_t M, const u8 *plain, size_t plain_len, 69 u8 *plain);
|
| HD | crypto_gnutls.c | 110 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()
|
| HD | aes-ccm.c | 149 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()
|
| HD | aes-unwrap.c | 27 u8 *plain) in aes_unwrap() argument 36 r = plain; in aes_unwrap() 51 r = plain + (n - 1) * 8; in aes_unwrap()
|
| HD | crypto.h | 104 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); 392 u8 *plain, size_t *plain_len);
|
| /NextBSD/contrib/wpa/src/tls/ |
| HD | pkcs1.c | 136 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()
|
| /NextBSD/sys/opencrypto/ |
| HD | skipjack.c | 129 skipjack_forwards(u_int8_t *plain, u_int8_t *cipher, u_int8_t **key_tables) in skipjack_forwards() argument 131 u_int8_t wh1 = plain[0]; u_int8_t wl1 = plain[1]; in skipjack_forwards() 132 u_int8_t wh2 = plain[2]; u_int8_t wl2 = plain[3]; in skipjack_forwards() 133 u_int8_t wh3 = plain[4]; u_int8_t wl3 = plain[5]; in skipjack_forwards() 134 u_int8_t wh4 = plain[6]; u_int8_t wl4 = plain[7]; in skipjack_forwards() 196 skipjack_backwards (u_int8_t *cipher, u_int8_t *plain, u_int8_t **key_tables) in skipjack_backwards() argument 256 plain [0] = wh1; plain [1] = wl1; in skipjack_backwards() 257 plain [2] = wh2; plain [3] = wl2; in skipjack_backwards() 258 plain [4] = wh3; plain [5] = wl3; in skipjack_backwards() 259 plain [6] = wh4; plain [7] = wl4; in skipjack_backwards()
|
| HD | skipjack.h | 20 extern void skipjack_forwards(u_int8_t *plain, u_int8_t *cipher, u_int8_t **key); 21 extern void skipjack_backwards(u_int8_t *cipher, u_int8_t *plain, u_int8_t **key);
|
| /NextBSD/crypto/openssh/ |
| HD | cipher-aes.c | 76 u_char *cprev, *cnow, *plain, *ivp; in ssh_rijndael_cbc() local 89 plain = (u_char *)src; in ssh_rijndael_cbc() 91 for (i = 0; i < blocks; i++, plain+=RIJNDAEL_BLOCKSIZE, in ssh_rijndael_cbc() 94 buf[j] = plain[j] ^ cprev[j]; in ssh_rijndael_cbc() 101 plain = dest+len-RIJNDAEL_BLOCKSIZE; in ssh_rijndael_cbc() 105 plain-=RIJNDAEL_BLOCKSIZE) { in ssh_rijndael_cbc() 106 rijndael_decrypt(&c->r_ctx, cnow, plain); in ssh_rijndael_cbc() 109 plain[j] ^= ivp[j]; in ssh_rijndael_cbc()
|
| /NextBSD/targets/ |
| HD | Makefile | 74 plain := ${DIRDEPS:@d@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE_PREFIX:T}):?$d:}@} macro 75 .if ${plain} != ${DIRDEPS} 76 qual := ${DIRDEPS:${plain:${M_ListToSkip}}:@d@${all_machine_list:O:u:@m@${exists(${SRCTOP}/$d/${.MA… 77 DIRDEPS := ${plain} ${qual} 97 plain := ${DIRDEPS:@d@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE_PREFIX:T}):?$d:}@} macro 98 .if !empty(plain) && ${plain} != ${DIRDEPS} 99 qual := ${DIRDEPS:${plain:${M_ListToSkip}}:M*.${REQUESTED_MACHINE}} 103 DIRDEPS := ${plain} ${qual}
|
| /NextBSD/contrib/wpa/src/wps/ |
| HD | wps_enrollee.c | 205 struct wpabuf *msg, *plain; in wps_build_m5() local 209 plain = wpabuf_alloc(200); in wps_build_m5() 210 if (plain == NULL) in wps_build_m5() 215 wpabuf_free(plain); in wps_build_m5() 222 wps_build_e_snonce1(wps, plain) || in wps_build_m5() 223 wps_build_key_wrap_auth(wps, plain) || in wps_build_m5() 224 wps_build_encr_settings(wps, msg, plain) || in wps_build_m5() 227 wpabuf_free(plain); in wps_build_m5() 231 wpabuf_free(plain); in wps_build_m5() 344 static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain) in wps_build_ap_settings() argument [all …]
|
| HD | wps_registrar.c | 1775 struct wpabuf *msg, *plain; in wps_build_ap_cred() local 1781 plain = wpabuf_alloc(200); in wps_build_ap_cred() 1782 if (plain == NULL) { in wps_build_ap_cred() 1787 if (wps_build_ap_settings(wps, plain)) { in wps_build_ap_cred() 1788 wpabuf_free(plain); in wps_build_ap_cred() 1794 wpabuf_put_be16(msg, wpabuf_len(plain)); in wps_build_ap_cred() 1795 wpabuf_put_buf(msg, plain); in wps_build_ap_cred() 1796 wpabuf_free(plain); in wps_build_ap_cred() 1850 struct wpabuf *plain = wpabuf_alloc(500); in wps_build_m2() local 1851 if (plain == NULL || in wps_build_m2() [all …]
|
| /NextBSD/share/mk/ |
| HD | plain.test.mk | 10 .error plain.test.mk cannot be included directly. 32 TEST_INTERFACE.${_T}= plain 43 TEST_INTERFACE.${_T}= plain 52 TEST_INTERFACE.${_T}= plain
|
| /NextBSD/crypto/heimdal/lib/krb5/ |
| HD | rd_priv.c | 47 krb5_data plain; in krb5_rd_priv() local 96 &plain); in krb5_rd_priv() 101 ret = decode_EncKrbPrivPart (plain.data, plain.length, &part, &len); in krb5_rd_priv() 102 krb5_data_free (&plain); in krb5_rd_priv()
|
| HD | aes-test.c | 481 krb5_data *plain) in krb_checksum_iov() argument 488 p = plain->data; in krb_checksum_iov() 489 len = plain->length; in krb_checksum_iov() 595 krb5_data cipher, plain; in krb_enc_test() local 608 plain.length = krbencs[i].plen; in krb_enc_test() 609 plain.data = krbencs[i].pdata; in krb_enc_test() 611 ret = krb_enc(context, crypto, krbencs[i].usage, &cipher, &plain); in krb_enc_test() 616 ret = krb_enc_iov(context, crypto, krbencs[i].usage, &cipher, &plain); in krb_enc_test() 621 cipher.length, &plain); in krb_enc_test() 625 ret = krb_checksum_iov(context, crypto, krbencs[i].usage, &plain); in krb_enc_test() [all …]
|
| /NextBSD/contrib/wpa/src/eap_peer/ |
| HD | ikev2.c | 1109 struct wpabuf *plain = wpabuf_alloc(data->IDr_len + 1000); in ikev2_build_sa_init() local 1110 if (plain == NULL) { in ikev2_build_sa_init() 1114 if (ikev2_build_idr(data, plain, in ikev2_build_sa_init() 1118 &data->keys, 0, msg, plain, in ikev2_build_sa_init() 1120 wpabuf_free(plain); in ikev2_build_sa_init() 1124 wpabuf_free(plain); in ikev2_build_sa_init() 1142 struct wpabuf *msg, *plain; in ikev2_build_sa_auth() local 1151 plain = wpabuf_alloc(data->IDr_len + 1000); in ikev2_build_sa_auth() 1152 if (plain == NULL) { in ikev2_build_sa_auth() 1157 if (ikev2_build_idr(data, plain, IKEV2_PAYLOAD_AUTHENTICATION) || in ikev2_build_sa_auth() [all …]
|
| /NextBSD/contrib/wpa/src/eap_common/ |
| HD | ikev2_common.c | 177 const u8 *plain, u8 *crypt, size_t len) in ikev2_encr_encrypt() argument 200 if (crypto_cipher_encrypt(cipher, plain, crypt, len) < 0) { in ikev2_encr_encrypt() 212 const u8 *crypt, u8 *plain, size_t len) in ikev2_encr_decrypt() argument 235 if (crypto_cipher_decrypt(cipher, crypt, plain, len) < 0) { in ikev2_encr_decrypt() 533 struct wpabuf *plain, u8 next_payload) in ikev2_build_encrypted() argument 581 pad_len = iv_len - (wpabuf_len(plain) + 1) % iv_len; in ikev2_build_encrypted() 584 wpabuf_put(plain, pad_len); in ikev2_build_encrypted() 585 wpabuf_put_u8(plain, pad_len); in ikev2_build_encrypted() 588 wpabuf_head(plain), wpabuf_mhead(plain), in ikev2_build_encrypted() 589 wpabuf_len(plain)) < 0) in ikev2_build_encrypted() [all …]
|
| /NextBSD/crypto/openssl/crypto/idea/ |
| HD | ideatest.c | 94 static unsigned char plain[CFB_TEST_SIZE] = { variable 188 idea_cfb64_encrypt(plain, cfb_buf1, (long)12, &eks, in cfb64_test() 190 idea_cfb64_encrypt(&(plain[12]), &(cfb_buf1[12]), in cfb64_test() 206 if (memcmp(plain, cfb_buf2, CFB_TEST_SIZE) != 0) { in cfb64_test()
|
| /NextBSD/crypto/openssl/crypto/rc2/ |
| HD | rc2test.c | 126 static unsigned char plain[CFB_TEST_SIZE] = { variable 228 idea_cfb64_encrypt(plain, cfb_buf1, (long)12, &eks, in cfb64_test() 230 idea_cfb64_encrypt(&(plain[12]), &(cfb_buf1[12]), in cfb64_test() 246 if (memcmp(plain, cfb_buf2, CFB_TEST_SIZE) != 0) { in cfb64_test()
|