/* Cleanup */
memwipe(secret_input, 0, sizeof(secret_input));
+ memwipe(dh_result, 0, sizeof(dh_result));
if (bad) {
memwipe(hs_ntor_intro_cell_keys_out, 0, sizeof(hs_ntor_intro_cell_keys_t));
}
&client_ephemeral_enc_keypair->pubkey,
hs_ntor_rend_cell_keys_out);
+ memwipe(dh_result1, 0, sizeof(dh_result1));
+ memwipe(dh_result2, 0, sizeof(dh_result2));
memwipe(rend_secret_hs_input, 0, sizeof(rend_secret_hs_input));
if (bad) {
memwipe(hs_ntor_rend_cell_keys_out, 0, sizeof(hs_ntor_rend_cell_keys_t));
&hs_ntor_intro_cell_keys_out[i]);
}
+ memwipe(dh_result, 0, sizeof(dh_result));
memwipe(secret_input, 0, sizeof(secret_input));
if (bad) {
memwipe(hs_ntor_intro_cell_keys_out, 0,
client_ephemeral_enc_pubkey,
hs_ntor_rend_cell_keys_out);
+ memwipe(dh_result1, 0, sizeof(dh_result1));
+ memwipe(dh_result2, 0, sizeof(dh_result2));
memwipe(rend_secret_hs_input, 0, sizeof(rend_secret_hs_input));
if (bad) {
memwipe(hs_ntor_rend_cell_keys_out, 0, sizeof(hs_ntor_rend_cell_keys_t));
crypto_xof(keys_out, HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN,
kdf_input, sizeof(kdf_input));
+ memwipe(kdf_input, 0, sizeof(kdf_input));
return 0;
}