KEYGEN: add deletion method
This commit is contained in:
parent
3ea4006b1c
commit
c3eb0e52f4
@ -90,3 +90,16 @@ cleanup:
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to free the inner structure
|
||||
* of a keypair. This will not call free()
|
||||
* on the pair itself.
|
||||
*
|
||||
* @param pair the pair to free the inner structure of
|
||||
*/
|
||||
void ntru_delete_keypair(keypair *pair)
|
||||
{
|
||||
fmpz_poly_clear(pair->priv_inv);
|
||||
fmpz_poly_clear(pair->priv);
|
||||
fmpz_poly_clear(pair->pub);
|
||||
}
|
||||
|
@ -68,5 +68,7 @@ bool ntru_create_keypair(
|
||||
keypair *pair,
|
||||
ntru_context *ctx);
|
||||
|
||||
void ntru_delete_keypair(keypair *pair);
|
||||
|
||||
|
||||
#endif /* NTRU_KEYPAIR_H */
|
||||
|
Loading…
Reference in New Issue
Block a user