Home
last modified time | relevance | path

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

123456789

/freebsd-13.1/tools/tools/crypto/
H A Dcryptocheck.c267 build_eta(const struct alg *cipher, const struct alg *mac) in build_eta()
269 struct alg *eta; in build_eta()
408 generate_iv(size_t len, const struct alg *alg) in generate_iv() argument
555 run_hash_test(const struct alg *alg, size_t size) in run_hash_test() argument
600 ocf_hmac(const struct alg *alg, const char *buffer, size_t size, in ocf_hmac() argument
633 run_hmac_test(const struct alg *alg, size_t size) in run_hmac_test() argument
750 run_cipher_test(const struct alg *alg, size_t size) in run_cipher_test() argument
1116 run_gmac_test(const struct alg *alg, size_t size) in run_gmac_test() argument
1192 run_digest_test(const struct alg *alg, size_t size) in run_digest_test() argument
1623 run_test_sizes(const struct alg *alg) in run_test_sizes() argument
[all …]
H A Dcryptotest.c118 struct alg { struct
173 struct alg*
184 struct alg*
248 runtest(struct alg *ealg, struct alg *alg, int count, int size, u_long cmd, struct timeval *tv) in runtest() argument
276 sop.mackeylen = (alg->minkeylen + alg->maxkeylen)/2; in runtest()
293 alg? alg->name : ""); in runtest()
342 if (alg) in runtest()
363 if (alg) in runtest()
464 size, alg->name, alg->blocksize, in runtests()
541 struct alg *alg = NULL, *ealg = NULL; in main() local
[all …]
/freebsd-13.1/crypto/openssh/
H A Ddigest-libc.c48 int alg; member
118 ssh_digest_by_alg(int alg) in ssh_digest_by_alg() argument
120 if (alg < 0 || alg >= SSH_DIGEST_MAX) in ssh_digest_by_alg()
122 if (digests[alg].id != alg) /* sanity */ in ssh_digest_by_alg()
124 return &(digests[alg]); in ssh_digest_by_alg()
130 int alg; in ssh_digest_alg_by_name() local
132 for (alg = 0; alg < SSH_DIGEST_MAX; alg++) { in ssh_digest_alg_by_name()
148 ssh_digest_bytes(int alg) in ssh_digest_bytes() argument
164 ssh_digest_start(int alg) in ssh_digest_start() argument
175 ret->alg = alg; in ssh_digest_start()
[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()
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()
100 ssh_digest_bytes(int alg) in ssh_digest_bytes() argument
114 ssh_digest_start(int alg) in ssh_digest_start() argument
121 ret->alg = alg; in ssh_digest_start()
[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()
H A Ddigest.h39 const char *ssh_digest_alg_name(int alg);
42 size_t ssh_digest_bytes(int alg);
52 int ssh_digest_memory(int alg, const void *m, size_t mlen,
56 int ssh_digest_buffer(int alg, const struct sshbuf *b, u_char *d, size_t dlen)
60 struct ssh_digest_ctx *ssh_digest_start(int alg);
H A Dssh-sk.c56 int (*sk_enroll)(int alg, const uint8_t *challenge,
295 switch (alg) { in sshsk_key_from_response()
307 error_f("unsupported algorithm %d", alg); in sshsk_key_from_response()
462 int alg; in sshsk_enroll() local
480 alg = SSH_SK_ECDSA; in sshsk_enroll()
484 alg = SSH_SK_ED25519; in sshsk_enroll()
629 int type, alg; in sshsk_sign() local
646 alg = SSH_SK_ECDSA; in sshsk_sign()
650 alg = SSH_SK_ED25519; in sshsk_sign()
783 switch (rks[i]->alg) { in sshsk_load_resident()
[all …]
/freebsd-13.1/crypto/openssl/crypto/engine/
H A Deng_fat.c52 if (alg == NULL) in int_def_cb()
54 if (strncmp(alg, "ALL", len) == 0) in int_def_cb()
56 else if (strncmp(alg, "RSA", len) == 0) in int_def_cb()
58 else if (strncmp(alg, "DSA", len) == 0) in int_def_cb()
60 else if (strncmp(alg, "DH", len) == 0) in int_def_cb()
62 else if (strncmp(alg, "EC", len) == 0) in int_def_cb()
64 else if (strncmp(alg, "RAND", len) == 0) in int_def_cb()
66 else if (strncmp(alg, "CIPHERS", len) == 0) in int_def_cb()
68 else if (strncmp(alg, "DIGESTS", len) == 0) in int_def_cb()
70 else if (strncmp(alg, "PKEY", len) == 0) in int_def_cb()
[all …]
/freebsd-13.1/crypto/openssl/crypto/asn1/
H A Dx_algor.c31 if (alg == NULL)
35 if (alg->parameter == NULL)
36 alg->parameter = ASN1_TYPE_new();
37 if (alg->parameter == NULL)
41 ASN1_OBJECT_free(alg->algorithm);
42 alg->algorithm = aobj;
47 ASN1_TYPE_free(alg->parameter);
48 alg->parameter = NULL;
50 ASN1_TYPE_set(alg->parameter, ptype, pval);
72 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md) in X509_ALGOR_set_md() argument
[all …]
H A Dp5_pbe.c27 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
69 if (X509_ALGOR_set0(algor, OBJ_nid2obj(alg), V_ASN1_SEQUENCE, pbe_str))
81 X509_ALGOR *PKCS5_pbe_set(int alg, int iter, in PKCS5_pbe_set() argument
91 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen)) in PKCS5_pbe_set()
/freebsd-13.1/crypto/openssl/crypto/pkcs7/
H A Dpk7_attr.c53 X509_ALGOR *alg; in PKCS7_simple_smimecap() local
55 if ((alg = X509_ALGOR_new()) == NULL) { in PKCS7_simple_smimecap()
59 ASN1_OBJECT_free(alg->algorithm); in PKCS7_simple_smimecap()
60 alg->algorithm = OBJ_nid2obj(nid); in PKCS7_simple_smimecap()
62 if ((alg->parameter = ASN1_TYPE_new()) == NULL) { in PKCS7_simple_smimecap()
71 alg->parameter->value.integer = nbit; in PKCS7_simple_smimecap()
72 alg->parameter->type = V_ASN1_INTEGER; in PKCS7_simple_smimecap()
75 if (!sk_X509_ALGOR_push(sk, alg)) { in PKCS7_simple_smimecap()
82 X509_ALGOR_free(alg); in PKCS7_simple_smimecap()
/freebsd-13.1/sbin/md5/
H A Dmd5.c449 printf("%s (%s) = %s", alg->name, *argv, p); in MDOutput()
466 MDTimeTrial(const Algorithm_t *alg) in MDTimeTrial() argument
488 alg->Init(&context); in MDTimeTrial()
490 alg->Update(&context, block, TEST_BLOCK_LEN); in MDTimeTrial()
491 p = alg->End(&context, buf); in MDTimeTrial()
642 MDTestSuite(const Algorithm_t *alg) in MDTestSuite() argument
647 printf("%s test suite:\n", alg->name); in MDTestSuite()
671 alg->Init(&context); in MDFilter()
675 alg->Update(&context, buffer, len); in MDFilter()
677 p = alg->End(&context, buf); in MDFilter()
[all …]
/freebsd-13.1/libexec/rc/rc.d/
H A Dsshd31 local alg=$1
32 local ALG="$(echo $alg | tr a-z A-Z)"
35 if ! checkyesno "sshd_${alg}_enable" ; then
39 case $alg in
41 keyfile="/etc/ssh/ssh_host_${alg}_key"
59 /usr/bin/ssh-keygen -q -t $alg -f "$keyfile" -N ""
/freebsd-13.1/crypto/openssl/crypto/rsa/
H A Drsa_ameth.c69 rsa->pss = rsa_pss_decode(alg); in rsa_param_decode()
99 X509_ALGOR *alg; in rsa_pub_decode() local
108 if (!rsa_param_decode(rsa, alg)) { in rsa_pub_decode()
186 const X509_ALGOR *alg; in rsa_priv_decode() local
195 if (!rsa_param_decode(rsa, alg)) { in rsa_priv_decode()
469 X509_ALGOR *alg = NULL; in rsa_pkey_ctrl() local
530 if (alg) in rsa_pkey_ctrl()
581 if (!alg) in rsa_algor_to_md()
754 X509_ALGOR *alg; in rsa_cms_verify() local
802 X509_ALGOR *alg; in rsa_cms_sign() local
[all …]
/freebsd-13.1/crypto/openssl/crypto/perlasm/
H A Dsparcv9_modes.pl42 my ($alg,$bits) = @_;
47 ${alg}${bits}_t4_cbc_encrypt:
255 .size ${alg}${bits}_t4_cbc_encrypt,.-${alg}${bits}_t4_cbc_encrypt
260 my ($alg,$bits) = @_;
265 ${alg}${bits}_t4_cbc_decrypt:
617 .size ${alg}${bits}_t4_cbc_decrypt,.-${alg}${bits}_t4_cbc_decrypt
622 my ($alg,$bits) = @_;
919 .size ${alg}${bits}_t4_ctr32_encrypt,.-${alg}${bits}_t4_ctr32_encrypt
924 my ($alg,$bits,$dir) = @_;
937 call ${alg}_t4_encrypt
[all …]
/freebsd-13.1/sys/contrib/libsodium/src/libsodium/crypto_pwhash/
H A Dcrypto_pwhash.c132 unsigned long long opslimit, size_t memlimit, int alg) in crypto_pwhash() argument
134 switch (alg) { in crypto_pwhash()
137 opslimit, memlimit, alg); in crypto_pwhash()
140 opslimit, memlimit, alg); in crypto_pwhash()
159 unsigned long long opslimit, size_t memlimit, int alg) in crypto_pwhash_str_alg() argument
161 switch (alg) { in crypto_pwhash_str_alg()
/freebsd-13.1/crypto/openssl/doc/man3/
H A DX509_ALGOR_dup.pod11 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *alg);
12 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval);
14 const void **ppval, const X509_ALGOR *alg);
15 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
21 X509_ALGOR_dup() returns a copy of B<alg>.
23 X509_ALGOR_set0() sets the algorithm OID of B<alg> to B<aobj> and the
32 and B<*ppval> from the B<AlgorithmIdentifier> B<alg>.
34 X509_ALGOR_set_md() sets the B<AlgorithmIdentifier> B<alg> to appropriate
/freebsd-13.1/sys/net80211/
H A Dieee80211_freebsd.h445 ieee80211_scanner_register(alg, &v); \
447 ieee80211_scanner_unregister(alg, &v); \
457 alg##_modevent(int type) \
460 ieee80211_aclator_register(&alg); \
462 ieee80211_aclator_unregister(&alg); \
464 TEXT_SET(acl_set, alg##_modevent); \
472 #define IEEE80211_AUTH_ALG(name, alg, v) \ argument
491 alg##_modevent(int type) \
494 ieee80211_ratectl_register(alg, &v); \
496 ieee80211_ratectl_unregister(alg); \
[all …]
/freebsd-13.1/contrib/ldns/
H A Dkeys.c458 ldns_signing_algorithm alg; in ldns_key_new_frm_fp_l() local
478 alg = 0; in ldns_key_new_frm_fp_l()
511 alg = LDNS_SIGN_RSAMD5; in ldns_key_new_frm_fp_l()
518 alg = LDNS_SIGN_DSA; in ldns_key_new_frm_fp_l()
530 alg = LDNS_SIGN_RSASHA1; in ldns_key_new_frm_fp_l()
568 alg = LDNS_SIGN_ECC_GOST; in ldns_key_new_frm_fp_l()
617 alg = LDNS_SIGN_HMACMD5; in ldns_key_new_frm_fp_l()
620 alg = LDNS_SIGN_HMACSHA1; in ldns_key_new_frm_fp_l()
627 alg = LDNS_SIGN_HMACSHA1; in ldns_key_new_frm_fp_l()
644 switch(alg) { in ldns_key_new_frm_fp_l()
[all …]
/freebsd-13.1/contrib/wpa/src/crypto/
H A Dcrypto_nettle.c60 ctx = os_malloc(alg->context_size); in nettle_digest_vector()
63 alg->init(ctx); in nettle_digest_vector()
65 alg->update(ctx, len[i], addr[i]); in nettle_digest_vector()
66 alg->digest(ctx, alg->digest_size, mac); in nettle_digest_vector()
67 bin_clear_free(ctx, alg->context_size); in nettle_digest_vector()
404 enum crypto_cipher_alg alg; member
411 struct crypto_cipher * crypto_cipher_init(enum crypto_cipher_alg alg, in crypto_cipher_init() argument
421 ctx->alg = alg; in crypto_cipher_init()
423 switch (alg) { in crypto_cipher_init()
439 switch (ctx->alg) { in crypto_cipher_encrypt()
[all …]
H A Dcrypto_internal-cipher.c18 enum crypto_cipher_alg alg; member
43 struct crypto_cipher * crypto_cipher_init(enum crypto_cipher_alg alg, in crypto_cipher_init() argument
53 ctx->alg = alg; in crypto_cipher_init()
55 switch (alg) { in crypto_cipher_init()
108 switch (ctx->alg) { in crypto_cipher_encrypt()
172 switch (ctx->alg) { in crypto_cipher_decrypt()
232 switch (ctx->alg) { in crypto_cipher_deinit()
/freebsd-13.1/crypto/openssl/crypto/ocsp/
H A Docsp_lib.c48 X509_ALGOR *alg; in OCSP_cert_id_new() local
55 alg = &cid->hashAlgorithm; in OCSP_cert_id_new()
56 ASN1_OBJECT_free(alg->algorithm); in OCSP_cert_id_new()
61 if ((alg->algorithm = OBJ_nid2obj(nid)) == NULL) in OCSP_cert_id_new()
63 if ((alg->parameter = ASN1_TYPE_new()) == NULL) in OCSP_cert_id_new()
65 alg->parameter->type = V_ASN1_NULL; in OCSP_cert_id_new()
/freebsd-13.1/contrib/wpa/src/tls/
H A Dpkcs5.c25 } alg; member
54 oid->oid[6] == alg; in pkcs5_is_oid()
63 oid->oid[5] == alg; in enc_alg_is_oid()
74 oid->oid[7] == alg; in pkcs12_is_pbe_oid()
283 params->alg = pkcs5_get_alg(&oid); in pkcs5_get_params()
284 if (params->alg == PKCS5_ALG_UNKNOWN) { in pkcs5_get_params()
290 if (params->alg == PKCS5_ALG_PBES2) in pkcs5_get_params()
497 if (params->alg != PKCS5_ALG_SHA1_3DES_CBC) in pkcs12_crypto_init_sha1()
537 if (params->alg == PKCS5_ALG_PBES2) in pkcs5_crypto_init()
540 if (params->alg == PKCS5_ALG_SHA1_3DES_CBC) in pkcs5_crypto_init()
[all …]
/freebsd-13.1/contrib/wpa/src/common/
H A Ddefs.h185 static inline int wpa_auth_alg_fils(int alg) in wpa_auth_alg_fils() argument
187 return !!(alg & (WPA_AUTH_ALG_FILS | WPA_AUTH_ALG_FILS_SK_PFS)); in wpa_auth_alg_fils()
206 static inline int wpa_alg_bip(enum wpa_alg alg) in wpa_alg_bip() argument
208 return alg == WPA_ALG_BIP_CMAC_128 || in wpa_alg_bip()
209 alg == WPA_ALG_BIP_GMAC_128 || in wpa_alg_bip()
210 alg == WPA_ALG_BIP_GMAC_256 || in wpa_alg_bip()
211 alg == WPA_ALG_BIP_CMAC_256; in wpa_alg_bip()
/freebsd-13.1/tests/sys/opencrypto/
H A Dcryptotest.py349 alg = cryptodev.CRYPTO_SHA1
351 alg = cryptodev.CRYPTO_SHA2_224
353 alg = cryptodev.CRYPTO_SHA2_256
355 alg = cryptodev.CRYPTO_SHA2_384
357 alg = cryptodev.CRYPTO_SHA2_512
371 c = Crypto(mac=alg, crid=crid,
401 alg = cryptodev.CRYPTO_SHA1_HMAC
404 alg = cryptodev.CRYPTO_SHA2_224_HMAC
407 alg = cryptodev.CRYPTO_SHA2_256_HMAC
410 alg = cryptodev.CRYPTO_SHA2_384_HMAC
[all …]

123456789