summaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-01-17 18:19:09 +0100
committerChristian Grothoff <christian@grothoff.org>2016-01-17 18:19:09 +0100
commitc1f28638c9929424f9ad395c7016e6ea2022d751 (patch)
treec99637be9f515bee58f2791f74f3f70f11e29c68 /src/include/taler_crypto_lib.h
parent00612f5e19582db782832c69d093049c5f75dd9b (diff)
downloadexchange-c1f28638c9929424f9ad395c7016e6ea2022d751.tar.gz
exchange-c1f28638c9929424f9ad395c7016e6ea2022d751.tar.bz2
exchange-c1f28638c9929424f9ad395c7016e6ea2022d751.zip
working on #3888
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 16240e5a3..87020fbbe 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -428,6 +428,37 @@ struct TALER_RefreshLinkDecrypted
};
+/**
+ * Binary information encoded in Crockford's Base32 in wire transfer
+ * subjects of transfers from Taler to a merchant. The actual value
+ * is chosen by the mint and has no particular semantics, other than
+ * being unique so that the mint can lookup details about the wire
+ * transfer when needed.
+ */
+struct TALER_WireTransferIdentifierP
+{
+
+ /**
+ * Raw value. Note that typical payment systems (SEPA, ACH) support
+ * at least two lines of 27 ASCII characters to encode a transaction
+ * subject or "details", for a total of 54 characters. (The payment
+ * system protocols often support more lines, but the forms presented
+ * to customers are usually limited to 54 characters.)
+ *
+ * With a Base32-encoding of 5 bit per character, this gives us 270
+ * bits or (rounded down) 33 bytes. So we use the first 32 bytes to
+ * encode the actual value (i.e. a 256-bit / 32-byte public key or
+ * a hash code), and the last byte for a minimalistic checksum.
+ */
+ uint8_t raw[32];
+
+ /**
+ * Checksum using CRC8 over the @e raw data.
+ */
+ uint8_t crc8;
+};
+
+
GNUNET_NETWORK_STRUCT_END