Lines Matching refs:params
27 unsigned int crypto_ecdh_key_len(const struct ecdh *params) in crypto_ecdh_key_len() argument
29 return ECDH_KPP_SECRET_MIN_SIZE + params->key_size; in crypto_ecdh_key_len()
34 const struct ecdh *params) in crypto_ecdh_encode_key() argument
45 if (len != crypto_ecdh_key_len(params)) in crypto_ecdh_encode_key()
49 ptr = ecdh_pack_data(ptr, ¶ms->curve_id, sizeof(params->curve_id)); in crypto_ecdh_encode_key()
50 ptr = ecdh_pack_data(ptr, ¶ms->key_size, sizeof(params->key_size)); in crypto_ecdh_encode_key()
51 ecdh_pack_data(ptr, params->key, params->key_size); in crypto_ecdh_encode_key()
58 struct ecdh *params) in crypto_ecdh_decode_key() argument
73 ptr = ecdh_unpack_data(¶ms->curve_id, ptr, sizeof(params->curve_id)); in crypto_ecdh_decode_key()
74 ptr = ecdh_unpack_data(¶ms->key_size, ptr, sizeof(params->key_size)); in crypto_ecdh_decode_key()
75 if (secret.len != crypto_ecdh_key_len(params)) in crypto_ecdh_decode_key()
81 params->key = (void *)ptr; in crypto_ecdh_decode_key()