| /tools/crypto/tcrypt/ |
| D | tcrypt_speed_compare.py | 61 alg = match.group(1) 63 return alg, op 94 alg, op = "", "" 101 alg, op = _alg, _op 102 if alg not in result: 103 result[alg] = {} 104 if op not in result[alg]: 105 result[alg][op] = [] 109 result[alg][op].append(parsed_result) 115 for alg in base.keys(): [all …]
|
| /tools/testing/selftests/tpm2/ |
| D | tpm2.py | 204 def __init__(self, alg): argument 205 self.alg = alg 208 return '0x%0x' % (alg) 220 def __init__(self, alg): argument 221 self.alg = alg 224 return '0x%0x' % (alg) 325 def get_digest_size(alg): argument 326 ds = ALG_DIGEST_SIZE_MAP.get(alg) 328 raise UnknownAlgorithmIdError(alg) 332 def get_hash_function(alg): argument [all …]
|
| /tools/crypto/ |
| D | gen_fips140_testvecs.py | 110 for alg in ['sha1', 'sha256', 'hmac_sha256', 'sha512', 'sha3_256']: 111 if alg.startswith('hmac_'): 112 h = hmac.new(hmac_key, message, alg.removeprefix('hmac_')) 114 h = hashlib.new(alg, message)
|
| /tools/testing/selftests/zram/ |
| D | zram_lib.sh | 156 for alg in $zram_algs; do 158 echo "$alg" > $sys_path || \ 159 echo "FAIL can't set '$alg' to $sys_path" 161 echo "$sys_path = '$alg'"
|
| /tools/testing/selftests/net/ |
| D | ipsec.c | 832 struct xfrm_algo alg; in xfrm_state_pack_algo() member 837 } alg = {}; in xfrm_state_pack_algo() local 853 strncpy(alg.u.alg.alg_name, desc->a_algo, ALGO_LEN - 1); in xfrm_state_pack_algo() 854 if (xfrm_fill_key(desc->a_algo, alg.u.alg.alg_key, in xfrm_state_pack_algo() 855 sizeof(alg.buf), &alg.u.alg.alg_key_len)) in xfrm_state_pack_algo() 864 strncpy(alg.u.alg.alg_name, desc->c_algo, ALGO_LEN - 1); in xfrm_state_pack_algo() 865 if (xfrm_fill_key(desc->c_algo, alg.u.alg.alg_key, in xfrm_state_pack_algo() 866 sizeof(alg.buf), &alg.u.alg.alg_key_len)) in xfrm_state_pack_algo() 876 alg.u.aead.alg_icv_len = desc->icv_len; in xfrm_state_pack_algo() 877 strncpy(alg.u.aead.alg_name, desc->ae_algo, ALGO_LEN - 1); in xfrm_state_pack_algo() [all …]
|
| /tools/testing/selftests/bpf/ |
| D | test_tag.c | 116 static const struct sockaddr_alg alg = { in tag_from_alg() local 127 ret = bind(fd_base, (struct sockaddr *)&alg, sizeof(alg)); in tag_from_alg()
|
| /tools/testing/selftests/net/tcp_ao/ |
| D | key-management.c | 410 const char *alg; member 480 key->alg = test_algos[algos_index % algos_nr]; in init_key_in_collection() 516 msg, key->alg, key->client_keyid, key->server_keyid, in test_key_error() 524 uint8_t maclen, const char *alg, in test_add_key_cr() argument 531 if (!alg) in test_add_key_cr() 532 alg = DEFAULT_TEST_ALGO; in test_add_key_cr() 536 err = test_prepare_key(&tmp, alg, addr, set_current, set_rnext, in test_add_key_cr() 618 key->alg, set_current, set_rnext)) in key_collection_socket() 623 key->alg, rcvid, sndid, key->maclen, in key_collection_socket() 736 if (!strcmp("cmac(aes128)", key->alg)) { in verify_keys() [all …]
|
| /tools/testing/selftests/net/tcp_ao/lib/ |
| D | sock.c | 138 int test_prepare_key_sockaddr(struct tcp_ao_add *ao, const char *alg, in test_prepare_key_sockaddr() argument 158 if (strlen(alg) > 64) in test_prepare_key_sockaddr() 160 strncpy(ao->alg_name, alg, 64); in test_prepare_key_sockaddr()
|
| D | aolib.h | 369 extern int test_prepare_key_sockaddr(struct tcp_ao_add *ao, const char *alg, 376 const char *alg, union tcp_addr taddr, in test_prepare_key() argument 385 return test_prepare_key_sockaddr(ao, alg, (void *)&addr, sizeof(addr), in test_prepare_key()
|