summaryrefslogtreecommitdiff
path: root/src/util/crypto_wire.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-22 02:33:51 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-22 02:33:51 +0100
commite200e860321abdff235863bd83e663ae57cf037a (patch)
treedd0c3429a3e0438fad970bfa2eee303b5c3c9ec5 /src/util/crypto_wire.c
parentbdc797a5830983e22b42bf8d97c25d80ad9f6346 (diff)
downloadexchange-e200e860321abdff235863bd83e663ae57cf037a.tar.gz
exchange-e200e860321abdff235863bd83e663ae57cf037a.tar.bz2
exchange-e200e860321abdff235863bd83e663ae57cf037a.zip
implement helper functions for p2p signatures, clean up existing signature logic
Diffstat (limited to 'src/util/crypto_wire.c')
-rw-r--r--src/util/crypto_wire.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/src/util/crypto_wire.c b/src/util/crypto_wire.c
index 93a952983..aa504b81e 100644
--- a/src/util/crypto_wire.c
+++ b/src/util/crypto_wire.c
@@ -23,45 +23,6 @@
#include "taler_signatures.h"
-enum GNUNET_GenericReturnValue
-TALER_exchange_wire_signature_check (
- const char *payto_uri,
- const struct TALER_MasterPublicKeyP *master_pub,
- const struct TALER_MasterSignatureP *master_sig)
-{
- struct TALER_MasterWireDetailsPS wd = {
- .purpose.purpose = htonl (TALER_SIGNATURE_MASTER_WIRE_DETAILS),
- .purpose.size = htonl (sizeof (wd))
- };
-
- TALER_payto_hash (payto_uri,
- &wd.h_wire_details);
- return GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_WIRE_DETAILS,
- &wd,
- &master_sig->eddsa_signature,
- &master_pub->eddsa_pub);
-}
-
-
-void
-TALER_exchange_wire_signature_make (
- const char *payto_uri,
- const struct TALER_MasterPrivateKeyP *master_priv,
- struct TALER_MasterSignatureP *master_sig)
-{
- struct TALER_MasterWireDetailsPS wd = {
- .purpose.purpose = htonl (TALER_SIGNATURE_MASTER_WIRE_DETAILS),
- .purpose.size = htonl (sizeof (wd))
- };
-
- TALER_payto_hash (payto_uri,
- &wd.h_wire_details);
- GNUNET_CRYPTO_eddsa_sign (&master_priv->eddsa_priv,
- &wd,
- &master_sig->eddsa_signature);
-}
-
-
void
TALER_merchant_wire_signature_hash (const char *payto_uri,
const struct TALER_WireSaltP *salt,
@@ -80,47 +41,4 @@ TALER_merchant_wire_signature_hash (const char *payto_uri,
}
-enum GNUNET_GenericReturnValue
-TALER_merchant_wire_signature_check (
- const char *payto_uri,
- const struct TALER_WireSaltP *salt,
- const struct TALER_MerchantPublicKeyP *merch_pub,
- const struct TALER_MerchantSignatureP *merch_sig)
-{
- struct TALER_MerchantWireDetailsPS wd = {
- .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_WIRE_DETAILS),
- .purpose.size = htonl (sizeof (wd))
- };
-
- TALER_merchant_wire_signature_hash (payto_uri,
- salt,
- &wd.h_wire_details);
- return GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_WIRE_DETAILS,
- &wd,
- &merch_sig->eddsa_sig,
- &merch_pub->eddsa_pub);
-}
-
-
-void
-TALER_merchant_wire_signature_make (
- const char *payto_uri,
- const struct TALER_WireSaltP *salt,
- const struct TALER_MerchantPrivateKeyP *merch_priv,
- struct TALER_MerchantSignatureP *merch_sig)
-{
- struct TALER_MerchantWireDetailsPS wd = {
- .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_WIRE_DETAILS),
- .purpose.size = htonl (sizeof (wd))
- };
-
- TALER_merchant_wire_signature_hash (payto_uri,
- salt,
- &wd.h_wire_details);
- GNUNET_CRYPTO_eddsa_sign (&merch_priv->eddsa_priv,
- &wd,
- &merch_sig->eddsa_sig);
-}
-
-
/* end of crypto_wire.c */