Lines Matching refs:algorithm
58 … sum = f + ((((uint32_t) dnskey->dnskey.protocol) << 8) + (uint32_t) dnskey->dnskey.algorithm); in dnssec_keytag()
451 int algorithm, in dnssec_ecdsa_verify() argument
465 if (algorithm == DNSSEC_ALGORITHM_ECDSAP256SHA256) { in dnssec_ecdsa_verify()
468 } else if (algorithm == DNSSEC_ALGORITHM_ECDSAP384SHA384) { in dnssec_ecdsa_verify()
602 int algorithm, in dnssec_eddsa_verify() argument
609 if (algorithm == DNSSEC_ALGORITHM_ED25519) { in dnssec_eddsa_verify()
749 static hash_md_t algorithm_to_implementation_id(uint8_t algorithm) { in algorithm_to_implementation_id() argument
757 switch (algorithm) { in algorithm_to_implementation_id()
831 fwrite_uint8(f, rrsig->rrsig.algorithm); in dnssec_rrset_serialize_sig()
903 switch (rrsig->rrsig.algorithm) { in dnssec_rrset_verify_sig()
907 rrsig->rrsig.algorithm, in dnssec_rrset_verify_sig()
916 md_algorithm = algorithm_to_implementation_id(rrsig->rrsig.algorithm); in dnssec_rrset_verify_sig()
955 switch (rrsig->rrsig.algorithm) { in dnssec_rrset_verify_sig()
971 rrsig->rrsig.algorithm, in dnssec_rrset_verify_sig()
1145 if (dnskey->dnskey.algorithm != rrsig->rrsig.algorithm) in dnssec_rrsig_match_dnskey()
1310 static hash_md_t digest_to_hash_md(uint8_t algorithm) { in digest_to_hash_md() argument
1314 switch (algorithm) { in digest_to_hash_md()
1350 if (dnskey->dnskey.algorithm != ds->ds.algorithm) in dnssec_verify_dnskey_by_ds()
1392 r = md_add_uint8(ctx, dnskey->dnskey.algorithm); in dnssec_verify_dnskey_by_ds()
1425 md_add_uint8(md, dnskey->dnskey.algorithm); in dnssec_verify_dnskey_by_ds()
1474 static hash_md_t nsec3_hash_to_hash_md(uint8_t algorithm) { in nsec3_hash_to_hash_md() argument
1478 switch (algorithm) { in nsec3_hash_to_hash_md()
1504 hash_md_t algorithm = nsec3_hash_to_hash_md(nsec3->nsec3.algorithm); in dnssec_nsec3_hash() local
1506 if (!algorithm) in dnssec_nsec3_hash()
1509 size_t hash_size = EVP_MD_size(algorithm); in dnssec_nsec3_hash()
1519 if (EVP_DigestInit_ex(ctx, algorithm, NULL) <= 0) in dnssec_nsec3_hash()
1536 if (EVP_DigestInit_ex(ctx, algorithm, NULL) <= 0) in dnssec_nsec3_hash()
1547 if (algorithm < 0) in dnssec_nsec3_hash()
1548 return algorithm; in dnssec_nsec3_hash()
1552 unsigned hash_size = gcry_md_get_algo_dlen(algorithm); in dnssec_nsec3_hash()
1563 gcry_error_t err = gcry_md_open(&md, algorithm, 0); in dnssec_nsec3_hash()
1607 if (!nsec3_hash_to_hash_md(rr->nsec3.algorithm)) in nsec3_is_good()
1610 if (nsec3_hash_to_hash_md(rr->nsec3.algorithm) < 0) in nsec3_is_good()
1636 if (rr->nsec3.algorithm != nsec3->nsec3.algorithm) in nsec3_is_good()