1 // SPDX-License-Identifier: BSD-2-Clause
2 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3  *
4  * LibTomCrypt is a library that provides various cryptographic
5  * algorithms in a highly modular and flexible manner.
6  *
7  * The library is free for all purposes without any express
8  * guarantee it works.
9  */
10 
11 #include "tomcrypt_private.h"
12 
13 /**
14   @file ecc_free.c
15   ECC Crypto, Tom St Denis
16 */
17 
18 #ifdef LTC_MECC
19 
20 /**
21   Free an ECC key from memory
22   @param key   The key you wish to free
23 */
ecc_free(ecc_key * key)24 void ecc_free(ecc_key *key)
25 {
26    LTC_ARGCHKVD(key != NULL);
27 
28    mp_cleanup_multi(&key->dp.prime, &key->dp.order,
29                     &key->dp.A, &key->dp.B,
30                     &key->dp.base.x, &key->dp.base.y, &key->dp.base.z,
31                     &key->pubkey.x, &key->pubkey.y, &key->pubkey.z,
32                     &key->k, NULL);
33 }
34 
35 #endif
36 /* ref:         $Format:%D$ */
37 /* git commit:  $Format:%H$ */
38 /* commit time: $Format:%ai$ */
39 
40