Cleaning.

This commit is contained in:
Mikaël Ates 2011-02-01 10:28:01 +01:00
parent b7fcd2db0b
commit 28e75eebf3
2 changed files with 9 additions and 8 deletions

View File

@ -272,9 +272,10 @@ cryptic_clsig_load_certificate_with_committed_value(CrypticClsig *clsig,
goto_cleanup_if_fail_with_rc_with_warning_openssl(BN_add(clsig->v,clsig->v,vprime));
cryptic_check_good_rc(cryptic_clsig_verify_signature_not_randomized(clsig));
rc = CRYPTIC_NO_ERROR;
rc = cryptic_clsig_verify_signature_not_randomized(clsig);
if(rc == 1){
rc = CRYPTIC_NO_ERROR;
}
cleanup:
cryptic_release_ctx(ctx);
cryptic_release_bn(tmp);
@ -344,7 +345,7 @@ cryptic_clsig_load_certificate_with_index_with_committed_value(CrypticClsig *cls
/* commitment = committed_dlrep * S^vprime */
/* commitment * S^-vprime = committed_dlrep */
/* clsig->dlrep := clsig->dlrep * committed_dlrep */
/* clsig->v := clsig->v + vprime */
/* clsig->v := clsig->v + vprime */
goto_cleanup_if_fail_with_rc_with_warning_openssl(BN_mod_inverse(tmp,clsig->S,clsig->modulus,ctx));
goto_cleanup_if_fail_with_rc_with_warning_openssl(BN_mod_exp(tmp,tmp,vprime,clsig->modulus,ctx) == 1);
goto_cleanup_if_fail_with_rc_with_warning_openssl(BN_mod_mul(tmp,tmp,commitment,clsig->modulus,ctx) == 1);
@ -360,9 +361,10 @@ cryptic_clsig_load_certificate_with_index_with_committed_value(CrypticClsig *cls
goto_cleanup_if_fail_with_rc_with_warning_openssl(BN_add(clsig->v,clsig->v,vprime));
cryptic_check_good_rc(cryptic_clsig_verify_signature_not_randomized(clsig));
rc = CRYPTIC_NO_ERROR;
rc = cryptic_clsig_verify_signature_not_randomized(clsig);
if(rc == 1){
rc = CRYPTIC_NO_ERROR;
}
cleanup:
cryptic_release_ctx(ctx);
cryptic_release_bn(tmp);

View File

@ -1,4 +1,3 @@
/* Cryptic -- Cryptographic tools and protocols
* Copyright (C) 2009 Mikaël Ates <mates@entrouvert.com>
*