Home
last modified time | relevance | path

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

12345678910>>...16

/freebsd/crypto/krb5/src/lib/gssapi/krb5/
H A Dutil_seqnum.c36 unsigned char plain[8]; in kg_make_seq_num() local
38 plain[4] = direction; in kg_make_seq_num()
39 plain[5] = direction; in kg_make_seq_num()
40 plain[6] = direction; in kg_make_seq_num()
41 plain[7] = direction; in kg_make_seq_num()
45 store_32_be(seqnum, plain); in kg_make_seq_num()
48 &plain[0], 8, in kg_make_seq_num()
53 store_32_le(seqnum, plain); in kg_make_seq_num()
54 return(kg_encrypt(context, key, KG_USAGE_SEQ, cksum, plain, buf, 8)); in kg_make_seq_num()
62 unsigned char plain[8]; in kg_get_seq_num() local
[all …]
H A Dunwrap.c48 uint8_t bigend_seqnum[4], *plain = NULL; in decrypt_v1() local
54 plain = malloc(len); in decrypt_v1()
55 if (plain == NULL) in decrypt_v1()
59 ret = kg_decrypt(context, key, KG_USAGE_SEAL, NULL, in, plain, len); in decrypt_v1()
69 ret = kg_arcfour_docrypt(enc_key, 0, bigend_seqnum, 4, in, len, plain); in decrypt_v1()
74 *out = plain; in decrypt_v1()
75 plain = NULL; in decrypt_v1()
78 free(plain); in decrypt_v1()
91 const uint8_t *plain, *header, *seqbytes, *cksum; in unwrap_v1() local
134 plain = in->ptr; in unwrap_v1()
[all …]
H A Dk5seal.c82 unsigned char *plain; in make_seal_token_v1() local
167 if ((plain = (unsigned char *) xmalloc(msglen ? msglen : 1)) == NULL) { in make_seal_token_v1()
174 plain))) { in make_seal_token_v1()
175 xfree(plain); in make_seal_token_v1()
181 memcpy(plain+conflen, text->value, text->length); in make_seal_token_v1()
182 if (pad) memset(plain+conflen+text->length, pad, pad); in make_seal_token_v1()
188 xfree(plain); in make_seal_token_v1()
194 memcpy(data_ptr + 8, plain, msglen); in make_seal_token_v1()
202 xfree(plain); in make_seal_token_v1()
228 xfree (plain); in make_seal_token_v1()
[all …]
H A Dk5sealv3.c81 krb5_data plain = empty_data(); in gss_krb5int_make_seal_token_v3() local
132 err = alloc_data(&plain, message->length + 16 + ec); in gss_krb5int_make_seal_token_v3()
137 encrypt_size = krb5_encrypt_size(plain.length, key->keyblock.enctype); in gss_krb5int_make_seal_token_v3()
163 memcpy(plain.data, message->value, message->length); in gss_krb5int_make_seal_token_v3()
165 memset(plain.data + message->length, 'x', ec); in gss_krb5int_make_seal_token_v3()
166 memcpy(plain.data + message->length + ec, outbuf, 16); in gss_krb5int_make_seal_token_v3()
171 err = krb5_k_encrypt(context, key, key_usage, 0, &plain, &cipher); in gss_krb5int_make_seal_token_v3()
195 err = alloc_data(&plain, message->length + 16); in gss_krb5int_make_seal_token_v3()
233 memcpy(plain.data, message->value, message->length); in gss_krb5int_make_seal_token_v3()
234 memcpy(plain.data + message->length, outbuf, 16); in gss_krb5int_make_seal_token_v3()
[all …]
/freebsd/contrib/netbsd-tests/lib/libdes/
H A Dt_des.c291 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 …]
/freebsd/crypto/openssl/test/
H A Ddestest.c345 static unsigned char plain[24] = { in test_des_ede_ecb()
614 DES_cfb_encrypt(plain, cfb_buf1, bits, sizeof(plain), &ks, &cfb_tmp,
616 if (!TEST_mem_eq(cfb_cipher, sizeof(plain), cfb_buf1, sizeof(plain))) in test_des_ofb()
619 DES_cfb_encrypt(cfb_buf1, cfb_buf2, bits, sizeof(plain), &ks, &cfb_tmp, in test_des_ofb()
621 return TEST_mem_eq(plain, sizeof(plain), cfb_buf2, sizeof(plain)); in test_des_ofb()
656 DES_cfb64_encrypt(plain, cfb_buf in test_des_ede_ofb64()
254 static unsigned char plain[24] = { global() variable
[all...]
/freebsd/contrib/wpa/src/crypto/
H A 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 …]
H A Dcrypto_libtomcrypt.c100 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() argument
384 if (plain != crypt) in crypto_cipher_decrypt()
[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()
483 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain) in des3_decrypt() argument
[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);
/freebsd/contrib/wpa/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()
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 - 2 < 8) { in pkcs1_decrypt_public_key()
179 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in pkcs1_decrypt_public_key()
[all …]
/freebsd/crypto/krb5/src/lib/crypto/crypto_tests/
H A Dt_fork.c62 krb5_data state_rc4, plain = string2data("plain"), decrypted; in main() local
69 t(krb5_c_random_seed(ctx, &plain)); in main()
77 prepare_enc_data(key_aes, plain.length, &out_aes); in main()
78 prepare_enc_data(key_aes, plain.length, &out_rc4); in main()
80 t(krb5_k_encrypt(ctx, key_aes, 0, NULL, &plain, &out_aes)); in main()
81 t(krb5_k_encrypt(ctx, key_rc4, 0, &state_rc4, &plain, &out_rc4)); in main()
88 t(alloc_data(&decrypted, plain.length)); in main()
90 assert(data_eq(plain, decrypted)); in main()
92 assert(data_eq(plain, decrypted)); in main()
95 t(krb5_k_encrypt(ctx, key_rc4, 0, &state_rc4, &plain, &out_rc4)); in main()
H A Dcamellia-test.c34 static char plain[16], cipher[16], zero[16]; variable
50 memcpy(cipher, plain, 16); in enc()
82 memset(plain, 0, sizeof(plain)); in vk_test_1()
83 hexdump("PT", plain, 16); in vk_test_1()
111 memset(plain, 0, sizeof(plain)); in vt_test_1()
112 set_bit(plain, i); in vt_test_1()
114 hexdump("PT", plain, 16); in vt_test_1()
H A Daes-test.c36 static char plain[16], cipher[16], zero[16]; variable
52 memcpy(cipher, plain, 16); in enc()
84 memset(plain, 0, sizeof(plain)); in vk_test_1()
85 hexdump("PT", plain, 16); in vk_test_1()
113 memset(plain, 0, sizeof(plain)); in vt_test_1()
114 set_bit(plain, i); in vt_test_1()
116 hexdump("PT", plain, 16); in vt_test_1()
H A Dt_decrypt.c552 krb5_data plain, seed = string2data("seed"); in generate() local
563 plain = string2data(plaintexts[j]); in generate()
564 ret = krb5_c_encrypt_length(context, enctypes[i], plain.length, in generate()
569 ret = krb5_c_encrypt(context, &kb, j, NULL, &plain, &enc); in generate()
588 krb5_data plain; in main() local
603 ret = alloc_data(&plain, test->ciphertext.length); in main()
610 &plain) != 0) { in main()
614 assert(plain.length >= test->plaintext.length); in main()
615 if (memcmp(plain.data, test->plaintext.data, in main()
620 free(plain.data); in main()
/freebsd/crypto/krb5/src/lib/kdb/
H A Ddecrypt_key.c66 krb5_data plain = empty_data(); in krb5_dbe_def_decrypt_key_data() local
87 ret = alloc_data(&plain, kd->key_data_length[0] - 2); in krb5_dbe_def_decrypt_key_data()
91 ret = krb5_c_decrypt(context, mkey, 0, 0, &cipher, &plain); in krb5_dbe_def_decrypt_key_data()
97 if ((unsigned int)keylen > plain.length) { in krb5_dbe_def_decrypt_key_data()
106 kb.contents = (uint8_t *)plain.data; in krb5_dbe_def_decrypt_key_data()
107 plain = empty_data(); in krb5_dbe_def_decrypt_key_data()
133 zapfree(plain.data, plain.length); in krb5_dbe_def_decrypt_key_data()
/freebsd/crypto/openssh/
H A Dcipher-aes.c76 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()
/freebsd/contrib/file/magic/Magdir/
H A Dssh12 #!:mime text/plain
19 #!:mime text/plain
26 #!:mime text/plain
32 #!:mime text/plain
36 #!:mime text/plain
41 #!:mime text/plain
45 #!:mime text/plain
49 #!:mime text/plain
53 #!:mime text/plain
57 #!:mime text/plain
[all …]
/freebsd/share/mk/
H A Dplain.test.mk9 .error plain.test.mk cannot be included directly.
31 TEST_INTERFACE.${_T}= plain
42 TEST_INTERFACE.${_T}= plain
52 TEST_INTERFACE.${_T}= plain
62 TEST_INTERFACE.${_T}= plain
/freebsd/contrib/bearssl/test/
H A Dtest_crypto.c3604 unsigned char plain[16]; in monte_carlo_AES_decrypt() local
3613 hextobin(plain, splain); in monte_carlo_AES_decrypt()
3649 check_equals("MC AES decrypt", buf, plain, sizeof buf); in monte_carlo_AES_decrypt()
3673 unsigned char plain[16]; in test_AES_generic() local
3686 hextobin(plain, KAT_AES[u + 1]); in test_AES_generic()
3689 memcpy(buf, plain, sizeof plain); in test_AES_generic()
3696 check_equals("KAT AES decrypt", buf, plain, sizeof plain); in test_AES_generic()
3703 unsigned char plain[200]; in test_AES_generic() local
3717 data_len = hextobin(plain, KAT_AES_CBC[u + 2]); in test_AES_generic()
3721 memcpy(buf, plain, data_len); in test_AES_generic()
[all …]
/freebsd/crypto/krb5/src/lib/krb5/krb/
H A Drd_cred.c47 krb5_data plain = empty_data(); in decrypt_encpart() local
55 ret = alloc_data(&plain, ctext->ciphertext.length); in decrypt_encpart()
60 KRB5_KEYUSAGE_KRB_CRED_ENCPART, 0, ctext, &plain); in decrypt_encpart()
65 KRB5_KEYUSAGE_KRB_CRED_ENCPART, 0, ctext, &plain); in decrypt_encpart()
69 ret = decode_krb5_enc_cred_part(&plain, encpart_out); in decrypt_encpart()
70 zapfree(plain.data, plain.length); in decrypt_encpart()
/freebsd/contrib/wpa/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()
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
[all …]
/freebsd/tools/lua/
H A Dtemplate.lua157 return function(view, plain)
158 if plain == true then return view end
165 return plain == false and assert(read_file(path)) or read_file(path) or view
326 function template.precompile(view, path, strip, plain)
327 local chunk = dump(template.compile(view, nil, plain), strip ~= false)
344 function template.compile(view, cache_key, plain)
347 return load_chunk(template.parse(view, plain)), false
352 local func = load_chunk(template.parse(view, plain))
365 function template.parse(view, plain)
367 if plain ~= true then
[all …]
/freebsd/crypto/heimdal/lib/krb5/
H A Drd_priv.c47 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()

12345678910>>...16