crypto/ringlwe/ringlwe_key.c
/* Deallocate public key / private key pair data structure */
Deallocate public key / private key pair data structure
Deallocate public key / private key pair data structure
void RLWE_PAIR_free(RLWE_PAIR *r) {
  if (r == NULL) return;
  RLWE_PUB_free(r->pub);
  if (r->s && r->param_data) {
    OPENSSL_cleanse(r->s, 2 * r->param_data->m * sizeof(RINGELT));
  }
  if (r->s) {
    OPENSSL_free(r->s);
  }
  OPENSSL_cleanse((void *)r, sizeof(RLWE_PAIR));
  OPENSSL_free(r);
}
void RLWE_PAIR_free ( RLWE_PAIR * r ) { if ( r == NULL ) return ; RLWE_PUB_free ( r -> pub ) ; if ( r -> s && r -> param_data ) { OPENSSL_cleanse ( r -> s , 2 * r -> param_data -> m * sizeof ( RINGELT ) ) ; } if ( r -> s ) { OPENSSL_free ( r -> s ) ; } OPENSSL_cleanse ( ( void * ) r , sizeof ( RLWE_PAIR ) ) ; OPENSSL_free ( r ) ; }
Deallocate public key / private key pair data structure
Deallocate public key / private key pair data structure