aboutsummaryrefslogtreecommitdiff
path: root/src/util/secmod_signatures.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-17 23:02:05 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-17 23:02:05 +0100
commitb61f601028f38a6c56aa00f171fa20605ca8c663 (patch)
treed433a1e721677b1445151ad41acd0ca29914adc0 /src/util/secmod_signatures.c
parent2078dd1bfbf942d36923d24836a29e40ff24989a (diff)
downloadexchange-b61f601028f38a6c56aa00f171fa20605ca8c663.tar.xz
-use different hash for RSA vs. Denomination hashing
Diffstat (limited to 'src/util/secmod_signatures.c')
-rw-r--r--src/util/secmod_signatures.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/util/secmod_signatures.c b/src/util/secmod_signatures.c
index f49cc20a5..077ce229a 100644
--- a/src/util/secmod_signatures.c
+++ b/src/util/secmod_signatures.c
@@ -70,8 +70,8 @@ TALER_exchange_secmod_eddsa_verify (
void
-TALER_exchange_secmod_denom_sign (
- const struct TALER_DenominationHash *h_denom_pub,
+TALER_exchange_secmod_rsa_sign (
+ const struct TALER_RsaPubHashP *h_rsa,
const char *section_name,
struct GNUNET_TIME_Absolute start_sign,
struct GNUNET_TIME_Relative duration,
@@ -79,9 +79,9 @@ TALER_exchange_secmod_denom_sign (
struct TALER_SecurityModuleSignatureP *secm_sig)
{
struct TALER_DenominationKeyAnnouncementPS dka = {
- .purpose.purpose = htonl (TALER_SIGNATURE_SM_DENOMINATION_KEY),
+ .purpose.purpose = htonl (TALER_SIGNATURE_SM_RSA_DENOMINATION_KEY),
.purpose.size = htonl (sizeof (dka)),
- .h_denom_pub = *h_denom_pub,
+ .h_rsa = *h_rsa,
.anchor_time = GNUNET_TIME_absolute_hton (start_sign),
.duration_withdraw = GNUNET_TIME_relative_hton (duration)
};
@@ -97,8 +97,8 @@ TALER_exchange_secmod_denom_sign (
enum GNUNET_GenericReturnValue
-TALER_exchange_secmod_denom_verify (
- const struct TALER_DenominationHash *h_denom_pub,
+TALER_exchange_secmod_rsa_verify (
+ const struct TALER_RsaPubHashP *h_rsa,
const char *section_name,
struct GNUNET_TIME_Absolute start_sign,
struct GNUNET_TIME_Relative duration,
@@ -106,9 +106,9 @@ TALER_exchange_secmod_denom_verify (
const struct TALER_SecurityModuleSignatureP *secm_sig)
{
struct TALER_DenominationKeyAnnouncementPS dka = {
- .purpose.purpose = htonl (TALER_SIGNATURE_SM_DENOMINATION_KEY),
+ .purpose.purpose = htonl (TALER_SIGNATURE_SM_RSA_DENOMINATION_KEY),
.purpose.size = htonl (sizeof (dka)),
- .h_denom_pub = *h_denom_pub,
+ .h_rsa = *h_rsa,
.anchor_time = GNUNET_TIME_absolute_hton (start_sign),
.duration_withdraw = GNUNET_TIME_relative_hton (duration)
};
@@ -117,7 +117,7 @@ TALER_exchange_secmod_denom_verify (
strlen (section_name) + 1,
&dka.h_section_name);
return
- GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_SM_DENOMINATION_KEY,
+ GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_SM_RSA_DENOMINATION_KEY,
&dka,
&secm_sig->eddsa_signature,
&secm_pub->eddsa_pub);