1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
3 
4 #include "tomcrypt_private.h"
5 
6 /**
7   @file ecc_free.c
8   ECC Crypto, Tom St Denis
9 */
10 
11 #ifdef LTC_MECC
12 
13 /**
14   Free an ECC key from memory
15   @param key   The key you wish to free
16 */
ecc_free(ecc_key * key)17 void ecc_free(ecc_key *key)
18 {
19    LTC_ARGCHKVD(key != NULL);
20 
21    mp_cleanup_multi(&key->dp.prime, &key->dp.order,
22                     &key->dp.A, &key->dp.B,
23                     &key->dp.base.x, &key->dp.base.y, &key->dp.base.z,
24                     &key->pubkey.x, &key->pubkey.y, &key->pubkey.z,
25                     &key->k, NULL);
26 }
27 
28 #endif
29