middleware/wolfssl_3.9.8/wolfcrypt/src/curve25519.c
/* Clean the memory of a key */
Clean the memory of a key
Clean the memory of a key
void wc_curve25519_free(curve25519_key* key)
{
   if (key == NULL)
       return;
   key->dp = NULL;
   ForceZero(key->p.point, sizeof(key->p.point));
   ForceZero(key->k.point, sizeof(key->k.point));
   #ifdef FREESCALE_LTC_ECC
       ForceZero(key->p.point, sizeof(key->p.pointY));
       ForceZero(key->k.point, sizeof(key->k.pointY));
   #endif
}
void wc_curve25519_free ( curve25519_key * key ) { if ( key == NULL ) return ; key -> dp = NULL ; ForceZero ( key -> p . point , sizeof ( key -> p . point ) ) ; ForceZero ( key -> k . point , sizeof ( key -> k . point ) ) ; #ifdef FREESCALE_LTC_ECC ForceZero ( key -> p . point , sizeof ( key -> p . pointY ) ) ; ForceZero ( key -> k . point , sizeof ( key -> k . pointY ) ) ; #endif }
Clean the memory of a key
Clean the memory of a key