Home
last modified time | relevance | path

Searched refs:alg (Results 1 – 25 of 282) sorted by relevance

12345678910>>...12

/freebsd/sbin/md5/tests/
H A Dmd5_test.sh178 for alg in $algorithms ; do
180 atf_test_case self_test_${alg}
181 self_test_${alg}_head() {
182 atf_set descr \"self-test for \$name_bsd_${alg}\"
183 atf_set require.progs \"${alg}\"
185 self_test_${alg}_body() {
186 atf_check -o ignore ${alg} --self-test
191 atf_test_case bsd_${alg}_vec${i}
192 bsd_${alg}_vec${i}_head() {
193 atf_set descr \"BSD mode \$name_bsd_${alg} test vector ${i}\"
[all …]
/freebsd/crypto/openssh/
H A Ddigest-libc.c58 int alg; member
128 ssh_digest_by_alg(int alg) in ssh_digest_by_alg() argument
130 if (alg < 0 || alg >= SSH_DIGEST_MAX) in ssh_digest_by_alg()
132 if (digests[alg].id != alg) /* sanity */ in ssh_digest_by_alg()
134 return &(digests[alg]); in ssh_digest_by_alg()
140 int alg; in ssh_digest_alg_by_name() local
142 for (alg = 0; alg < SSH_DIGEST_MAX; alg++) { in ssh_digest_alg_by_name()
143 if (strcasecmp(name, digests[alg].name) == 0) in ssh_digest_alg_by_name()
144 return digests[alg].id; in ssh_digest_alg_by_name()
150 ssh_digest_alg_name(int alg) in ssh_digest_alg_name() argument
[all …]
H A Ddigest-openssl.c46 int alg; member
68 ssh_digest_by_alg(int alg) in ssh_digest_by_alg() argument
70 if (alg < 0 || alg >= SSH_DIGEST_MAX) in ssh_digest_by_alg()
72 if (digests[alg].id != alg) /* sanity */ in ssh_digest_by_alg()
74 if (digests[alg].mdfunc == NULL) in ssh_digest_by_alg()
76 return &(digests[alg]); in ssh_digest_by_alg()
82 int alg; in ssh_digest_alg_by_name() local
84 for (alg = 0; digests[alg].id != -1; alg++) { in ssh_digest_alg_by_name()
85 if (strcasecmp(name, digests[alg].name) == 0) in ssh_digest_alg_by_name()
86 return digests[alg].id; in ssh_digest_alg_by_name()
[all …]
H A Dhmac.c30 int alg; member
39 ssh_hmac_bytes(int alg) in ssh_hmac_bytes() argument
41 return ssh_digest_bytes(alg); in ssh_hmac_bytes()
45 ssh_hmac_start(int alg) in ssh_hmac_start() argument
51 ret->alg = alg; in ssh_hmac_start()
52 if ((ret->ictx = ssh_digest_start(alg)) == NULL || in ssh_hmac_start()
53 (ret->octx = ssh_digest_start(alg)) == NULL || in ssh_hmac_start()
54 (ret->digest = ssh_digest_start(alg)) == NULL) in ssh_hmac_start()
75 else if (ssh_digest_memory(ctx->alg, key, klen, ctx->buf, in ssh_hmac_init()
111 len = ssh_digest_bytes(ctx->alg); in ssh_hmac_final()
/freebsd/tools/tools/crypto/
H A Dcryptocheck.c164 static const struct alg { struct
275 static const struct alg *
286 static struct alg *
287 build_eta(const struct alg *cipher, const struct alg *mac) in build_eta()
289 struct alg *eta; in build_eta()
306 free_eta(struct alg *eta) in free_eta()
312 static struct alg *
315 const struct alg *cipher, *mac; in build_eta_name()
428 generate_iv(size_t len, const struct alg *alg) in generate_iv() argument
433 switch (alg->cipher) { in generate_iv()
[all …]
H A Dcryptotest.c116 struct alg { struct
171 struct alg*
182 struct alg*
246 runtest(struct alg *ealg, struct alg *alg, int count, int size, u_long cmd, struct timeval *tv) in runtest() argument
257 if (ealg == NULL && !alg->ishash) { in runtest()
258 ealg = alg; in runtest()
259 alg = NULL; in runtest()
273 if (alg != NULL) { in runtest()
274 sop.mackeylen = (alg->minkeylen + alg->maxkeylen)/2; in runtest()
281 sop.mac = alg->code; in runtest()
[all …]
/freebsd/crypto/openssl/crypto/property/
H A Dproperty.c108 ALGORITHM *alg);
226 static void impl_cache_flush_alg(ossl_uintmax_t idx, ALGORITHM *alg) in impl_cache_flush_alg() argument
228 lh_QUERY_doall(alg->cache, &impl_cache_free); in impl_cache_flush_alg()
229 lh_QUERY_flush(alg->cache); in impl_cache_flush_alg()
294 static int ossl_method_store_insert(OSSL_METHOD_STORE *store, ALGORITHM *alg) in ossl_method_store_insert() argument
296 return ossl_sa_ALGORITHM_set(store->algs, alg->nid, alg); in ossl_method_store_insert()
304 ALGORITHM *alg = NULL; in ossl_method_store_add() local
347 alg = ossl_method_store_retrieve(store, nid); in ossl_method_store_add()
348 if (alg == NULL) { in ossl_method_store_add()
349 if ((alg = OPENSSL_zalloc(sizeof(*alg))) == NULL in ossl_method_store_add()
[all …]
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dcipher_cts.h13 #define IMPLEMENT_cts_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \ argument
15 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
16 static int alg##_cts_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
21 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_cts_functions[] = { \
23 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
24 { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
25 { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void)) alg##_dupctx }, \
26 { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void)) alg##_cbc_cts_einit }, \
27 { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void)) alg##_cbc_cts_dinit }, \
34 (void (*)(void)) alg##_cts_##kbits##_##lcmode##_get_params }, \
[all …]
H A Dcipher_rc4.c73 #define IMPLEMENT_cipher(alg, UCALG, flags, kbits, blkbits, ivbits, typ) \ argument
74 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_get_params; \
75 static int alg##_##kbits##_get_params(OSSL_PARAM params[]) \
80 static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_newctx; \
81 static void * alg##_##kbits##_newctx(void *provctx) \
89 ossl_prov_cipher_hw_##alg(kbits), NULL); \
93 const OSSL_DISPATCH ossl_##alg##kbits##_functions[] = { \
95 (void (*)(void)) alg##_##kbits##_newctx }, \
96 { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
97 { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void)) alg##_dupctx }, \
[all …]
H A Dcipher_aes_siv.c255 #define IMPLEMENT_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \ argument
256 static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \
257 static OSSL_FUNC_cipher_freectx_fn alg##_##lc##_freectx; \
264 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
265 static OSSL_FUNC_cipher_get_ctx_params_fn alg##_##lc##_get_ctx_params; \
267 alg##_##lc##_gettable_ctx_params; \
268 static OSSL_FUNC_cipher_set_ctx_params_fn alg##_##lc##_set_ctx_params; \
270 alg##_##lc##_settable_ctx_params; \
271 static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
276 static void * alg##kbits##lc##_newctx(void *provctx) \
[all …]
H A Dcipher_rc5.c132 #define IMPLEMENT_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \ argument
134 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
135 static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
140 static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
141 static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \
150 ossl_prov_cipher_hw_##alg##_##lcmode(kbits),\
156 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = { \
158 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
159 { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
160 { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void)) alg##_dupctx }, \
[all …]
/freebsd/crypto/openssl/providers/implementations/include/prov/
H A Dciphercommon_aead.h14 #define IMPLEMENT_aead_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \ argument
15 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
16 static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
21 static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \
22 static void * alg##kbits##lc##_newctx(void *provctx) \
24 return alg##_##lc##_newctx(provctx, kbits); \
26 static void * alg##kbits##lc##_dupctx(void *src) \
28 return alg##_##lc##_dupctx(src); \
30 const OSSL_DISPATCH ossl_##alg##kbits##lc##_functions[] = { \
31 { OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))alg##kbits##lc##_newctx }, \
[all …]
H A Dciphercommon.h130 #define IMPLEMENT_generic_cipher_func(alg, UCALG, lcmode, UCMODE, flags, kbits,\
132 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = { \
134 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
135 { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
136 { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void)) alg##_dupctx }, \
143 (void (*)(void)) alg##_##kbits##_##lcmode##_get_params }, \
157 #define IMPLEMENT_var_keylen_cipher_func(alg, UCALG, lcmode, UCMODE, flags, \
159 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = { \
161 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
162 { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freect
129 IMPLEMENT_generic_cipher_func(alg,UCALG,lcmode,UCMODE,flags,kbits,blkbits,ivbits,typ) global() argument
156 IMPLEMENT_var_keylen_cipher_func(alg,UCALG,lcmode,UCMODE,flags,kbits,blkbits,ivbits,typ) global() argument
184 IMPLEMENT_generic_cipher_genfn(alg,UCALG,lcmode,UCMODE,flags,kbits,blkbits,ivbits,typ) global() argument
206 IMPLEMENT_generic_cipher(alg,UCALG,lcmode,UCMODE,flags,kbits,blkbits,ivbits,typ) global() argument
213 IMPLEMENT_var_keylen_cipher(alg,UCALG,lcmode,UCMODE,flags,kbits,blkbits,ivbits,typ) global() argument
[all...]
/freebsd/crypto/openssl/crypto/asn1/
H A Dx_algor.c31 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval)
33 if (alg == NULL)
37 if (alg->parameter == NULL)
38 alg->parameter = ASN1_TYPE_new();
39 if (alg->parameter == NULL)
43 ASN1_OBJECT_free(alg->algorithm);
44 alg->algorithm = aobj;
49 ASN1_TYPE_free(alg->parameter);
50 alg->parameter = NULL;
52 ASN1_TYPE_set(alg->parameter, ptype, pval);
[all …]
H A Dp5_pbe.c27 int PKCS5_pbe_set0_algor_ex(X509_ALGOR *algor, int alg, int iter,
72 if (X509_ALGOR_set0(algor, OBJ_nid2obj(alg), V_ASN1_SEQUENCE, pbe_str))
82 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, in PKCS5_pbe_set0_algor() argument
85 return PKCS5_pbe_set0_algor_ex(algor, alg, iter, salt, saltlen, NULL); in PKCS5_pbe_set0_algor()
90 X509_ALGOR *PKCS5_pbe_set_ex(int alg, int iter, in PKCS5_pbe_set_ex() argument
101 if (PKCS5_pbe_set0_algor_ex(ret, alg, iter, salt, saltlen, ctx)) in PKCS5_pbe_set_ex()
108 X509_ALGOR *PKCS5_pbe_set(int alg, int iter, in PKCS5_pbe_set() argument
111 return PKCS5_pbe_set_ex(alg, iter, salt, saltlen, NULL); in PKCS5_pbe_set()
/freebsd/crypto/openssl/crypto/engine/
H A Deng_fat.c50 static int int_def_cb(const char *alg, int len, void *arg) in int_def_cb() argument
53 if (alg == NULL) in int_def_cb()
55 if (strncmp(alg, "ALL", len) == 0) in int_def_cb()
57 else if (strncmp(alg, "RSA", len) == 0) in int_def_cb()
59 else if (strncmp(alg, "DSA", len) == 0) in int_def_cb()
61 else if (strncmp(alg, "DH", len) == 0) in int_def_cb()
63 else if (strncmp(alg, "EC", len) == 0) in int_def_cb()
65 else if (strncmp(alg, "RAND", len) == 0) in int_def_cb()
67 else if (strncmp(alg, "CIPHERS", len) == 0) in int_def_cb()
69 else if (strncmp(alg, "DIGESTS", len) == 0) in int_def_cb()
[all …]
/freebsd/contrib/llvm-project/libcxx/modules/std/
H A Dalgorithm.inc26 // [alg.nonmodifying], non-modifying sequence operations
27 // [alg.all.of], all of
33 // [alg.any.of], any of
39 // [alg.none.of], none of
46 // [alg.contains], contains
53 // [alg.foreach], for each
69 // [alg.find], find
81 // [alg.find.last], find last
89 // [alg.find.end], find end
96 // [alg.find.first.of], find first
[all …]
H A Dalgorithm.cppm
/freebsd/crypto/openssl/crypto/cms/
H A Dcms_rsa.c19 static RSA_OAEP_PARAMS *rsa_oaep_decode(const X509_ALGOR *alg) in rsa_oaep_decode() argument
24 alg->parameter); in rsa_oaep_decode()
120 X509_ALGOR *alg; in rsa_cms_encrypt() local
125 if (CMS_RecipientInfo_ktri_get0_algs(ri, NULL, NULL, &alg) <= 0) in rsa_cms_encrypt()
132 return X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaEncryption), in rsa_cms_encrypt()
171 if (!X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, os)) in rsa_cms_encrypt()
199 X509_ALGOR *alg; in rsa_cms_sign() local
206 CMS_SignerInfo_get0_algs(si, NULL, NULL, NULL, &alg); in rsa_cms_sign()
212 X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaEncryption), V_ASN1_NULL, 0); in rsa_cms_sign()
226 return X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_PKEY_RSA_PSS), V_ASN1_SEQUENCE, os); in rsa_cms_sign()
[all …]
/freebsd/crypto/openssl/crypto/evp/
H A Dkdf_meth.c187 void *alg; in EVP_KDF_gettable_ctx_params() local
191 alg = ossl_provider_ctx(EVP_KDF_get0_provider(kdf)); in EVP_KDF_gettable_ctx_params()
192 return kdf->gettable_ctx_params(NULL, alg); in EVP_KDF_gettable_ctx_params()
197 void *alg; in EVP_KDF_settable_ctx_params() local
201 alg = ossl_provider_ctx(EVP_KDF_get0_provider(kdf)); in EVP_KDF_settable_ctx_params()
202 return kdf->settable_ctx_params(NULL, alg); in EVP_KDF_settable_ctx_params()
207 void *alg; in EVP_KDF_CTX_gettable_params() local
211 alg = ossl_provider_ctx(EVP_KDF_get0_provider(ctx->meth)); in EVP_KDF_CTX_gettable_params()
212 return ctx->meth->gettable_ctx_params(ctx->algctx, alg); in EVP_KDF_CTX_gettable_params()
217 void *alg; in EVP_KDF_CTX_settable_params() local
[all …]
H A Dmac_meth.c201 void *alg; in EVP_MAC_gettable_ctx_params() local
205 alg = ossl_provider_ctx(EVP_MAC_get0_provider(mac)); in EVP_MAC_gettable_ctx_params()
206 return mac->gettable_ctx_params(NULL, alg); in EVP_MAC_gettable_ctx_params()
211 void *alg; in EVP_MAC_settable_ctx_params() local
215 alg = ossl_provider_ctx(EVP_MAC_get0_provider(mac)); in EVP_MAC_settable_ctx_params()
216 return mac->settable_ctx_params(NULL, alg); in EVP_MAC_settable_ctx_params()
221 void *alg; in EVP_MAC_CTX_gettable_params() local
225 alg = ossl_provider_ctx(EVP_MAC_get0_provider(ctx->meth)); in EVP_MAC_CTX_gettable_params()
226 return ctx->meth->gettable_ctx_params(ctx->algctx, alg); in EVP_MAC_CTX_gettable_params()
231 void *alg; in EVP_MAC_CTX_settable_params() local
[all …]
/freebsd/crypto/openssl/crypto/pkcs7/
H A Dpk7_attr.c57 X509_ALGOR *alg; in PKCS7_simple_smimecap() local
59 if ((alg = X509_ALGOR_new()) == NULL) { in PKCS7_simple_smimecap()
63 ASN1_OBJECT_free(alg->algorithm); in PKCS7_simple_smimecap()
64 alg->algorithm = OBJ_nid2obj(nid); in PKCS7_simple_smimecap()
66 if ((alg->parameter = ASN1_TYPE_new()) == NULL) { in PKCS7_simple_smimecap()
75 alg->parameter->value.integer = nbit; in PKCS7_simple_smimecap()
76 alg->parameter->type = V_ASN1_INTEGER; in PKCS7_simple_smimecap()
79 if (!sk_X509_ALGOR_push(sk, alg)) { in PKCS7_simple_smimecap()
86 X509_ALGOR_free(alg); in PKCS7_simple_smimecap()
/freebsd/sbin/md5/
H A Dmd5.c683 MDInput(const Algorithm_t *alg, FILE *f, char *buf, bool tee) in MDInput() argument
693 alg->Init(&context); in MDInput()
700 alg->Update(&context, block, len); in MDInput()
710 alg->Update(&context, "\n", 1); in MDInput()
720 alg->Update(&context, p, q - p); in MDInput()
738 alg->Update(&context, &byte, 1); in MDInput()
747 alg->End(&context, buf); in MDInput()
753 alg->Update(&context, "\n", 1); in MDInput()
757 return (alg->End(&context, buf)); in MDInput()
764 MDOutput(const Algorithm_t *alg, char *p, const char *name) in MDOutput() argument
[all …]
/freebsd/libexec/rc/rc.d/
H A Dsshd36 local alg=$1
37 local ALG="$(echo $alg | tr a-z A-Z)"
40 if ! checkyesno "sshd_${alg}_enable" ; then
44 case $alg in
46 keyfile="/etc/ssh/ssh_host_${alg}_key"
64 /usr/bin/ssh-keygen -q -t $alg -f "$keyfile" -N ""
/freebsd/crypto/openssl/crypto/perlasm/
H A Dsparcv9_modes.pl42 my ($alg,$bits) = @_;
45 .globl ${alg}${bits}_t4_cbc_encrypt
47 ${alg}${bits}_t4_cbc_encrypt:
75 call _${alg}${bits}_load_enckey
115 call _${alg}${bits}_encrypt_1x
224 call _${alg}${bits}_encrypt_1x
254 .type ${alg}${bits}_t4_cbc_encrypt,#function
255 .size ${alg}${bits}_t4_cbc_encrypt,.-${alg}${bits}_t4_cbc_encrypt
260 my ($alg,$bits) = @_;
263 .globl ${alg}${bits}_t4_cbc_decrypt
[all …]

12345678910>>...12