Lines Matching refs:params
31 unsigned int crypto_ecdh_key_len(const struct ecdh *params) in crypto_ecdh_key_len() argument
33 return ECDH_KPP_SECRET_MIN_SIZE + params->key_size; in crypto_ecdh_key_len()
38 const struct ecdh *params) in crypto_ecdh_encode_key() argument
49 if (len != crypto_ecdh_key_len(params)) in crypto_ecdh_encode_key()
53 ptr = ecdh_pack_data(ptr, ¶ms->curve_id, sizeof(params->curve_id)); in crypto_ecdh_encode_key()
54 ptr = ecdh_pack_data(ptr, ¶ms->key_size, sizeof(params->key_size)); in crypto_ecdh_encode_key()
55 ecdh_pack_data(ptr, params->key, params->key_size); in crypto_ecdh_encode_key()
62 struct ecdh *params) in crypto_ecdh_decode_key() argument
74 ptr = ecdh_unpack_data(¶ms->curve_id, ptr, sizeof(params->curve_id)); in crypto_ecdh_decode_key()
75 ptr = ecdh_unpack_data(¶ms->key_size, ptr, sizeof(params->key_size)); in crypto_ecdh_decode_key()
76 if (secret.len != crypto_ecdh_key_len(params)) in crypto_ecdh_decode_key()
82 params->key = (void *)ptr; in crypto_ecdh_decode_key()