aboutsummaryrefslogtreecommitdiff
path: root/src/util/taler-helper-crypto-rsa.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-15 16:59:20 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-15 16:59:20 +0100
commit9eef09f6c0502cf40edc56a27c2eda9fe97c1063 (patch)
tree59f694499b226b00727c6b83f1aece0c27624ecc /src/util/taler-helper-crypto-rsa.h
parent736997ffe89afac91351606369b652e3b1c5d77b (diff)
complete first draft of taler-helper-crypto-rsa.c
Diffstat (limited to 'src/util/taler-helper-crypto-rsa.h')
-rw-r--r--src/util/taler-helper-crypto-rsa.h46
1 files changed, 41 insertions, 5 deletions
diff --git a/src/util/taler-helper-crypto-rsa.h b/src/util/taler-helper-crypto-rsa.h
index b5ad6775f..373cd5ea8 100644
--- a/src/util/taler-helper-crypto-rsa.h
+++ b/src/util/taler-helper-crypto-rsa.h
@@ -27,6 +27,9 @@
#define TALER_HELPER_RSA_MT_REQ_SIGN 3
#define TALER_HELPER_RSA_MT_REQ_REVOKE 4
+#define TALER_HELPER_RSA_MT_RES_SIGNATURE 5
+#define TALER_HELPER_RSA_MT_RES_SIGN_FAILURE 6
+
GNUNET_NETWORK_STRUCT_BEGIN
/**
@@ -110,11 +113,7 @@ struct TALER_CRYPTO_SignRequest
*/
struct GNUNET_HashCode h_denom_pub;
- /**
- * Hash of the value to sign (FDH still to be computed!).
- */
- struct GNUNET_HashCode h_message;
-
+ /* followed by message to sign */
};
@@ -141,6 +140,43 @@ struct TALER_CRYPTO_RevokeRequest
};
+/**
+ * Message sent if a signature was successfully computed.
+ */
+struct TALER_CRYPTO_SignResponse
+{
+ /**
+ * Type is #TALER_HELPER_RSA_MT_RES_SIGNATURE.
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * For now, always zero.
+ */
+ uint32_t reserved;
+
+ /* followed by RSA signature */
+};
+
+
+/**
+ * Message sent if signing failed.
+ */
+struct TALER_CRYPTO_SignFailure
+{
+ /**
+ * Type is #TALER_HELPER_RSA_MT_RES_SIGN_FAILURE.
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * If available, Taler error code. In NBO.
+ */
+ uint32_t ec;
+
+};
+
+
GNUNET_NETWORK_STRUCT_END