key-exchange: Joint ke_test_vector format for DH and KEM
Both Diffie-Hellman (DH) and Key Encapsulation Mechanism (KEM) based key exchange methods use a common ke_test_vector format. The set_seed() function is used to provide deterministic private key material for the crypto tests.
This commit is contained in:
committed by
Tobias Brunner
parent
47de9ef9a1
commit
40676786aa
@@ -134,16 +134,17 @@ struct key_exchange_t {
|
||||
__attribute__((warn_unused_result));
|
||||
|
||||
/**
|
||||
* Set an explicit own private key to use.
|
||||
* Set a seed used for the derivation of private key material.
|
||||
*
|
||||
* Calling this method is usually not required, as the DH backend generates
|
||||
* an appropriate private value itself. It is optional to implement, and
|
||||
* used mostly for testing purposes. The private key may be the actual key
|
||||
* or a seed for a DRBG.
|
||||
* Calling this method is usually not required, as the key exchange objects
|
||||
* generate the private key material themselves. This is optional to
|
||||
* implement, and used mostly for testing purposes. The private key may be
|
||||
* the actual key or a DRBG instance.
|
||||
*
|
||||
* @param value private key value to set
|
||||
* @param value optional seed value to set (can be chunk_empty)
|
||||
* @param drbg optional DRBG (can be NULL)
|
||||
*/
|
||||
bool (*set_private_key)(key_exchange_t *this, chunk_t value)
|
||||
bool (*set_seed)(key_exchange_t *this, chunk_t value, drbg_t *drbg)
|
||||
__attribute__((warn_unused_result));
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user