diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-27 22:05:31 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-27 22:05:31 +0100 |
commit | 162af316d39f1bf526e3dc63e67dd6ae6f7be91b (patch) | |
tree | 1675c0c5626e374a32dc36e81ab328d18b5f5b11 /src/include | |
parent | 27a72fdafe67bcba304e274e839a2780009bd8da (diff) | |
download | exchange-162af316d39f1bf526e3dc63e67dd6ae6f7be91b.tar.xz |
cleaning up types used some more: also use a new struct for the transfer key secret
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_util.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/include/taler_util.h b/src/include/taler_util.h index 19e6bacf1..2c5faaa52 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -241,6 +241,20 @@ TALER_data_to_string_alloc (const void *buf, /* ****************** Refresh crypto primitives ************* */ /** + * Secret used to decrypt the key to decrypt link secrets. + */ +struct TALER_TransferSecret +{ + /** + * Secret used to encrypt/decrypt the `struct TALER_LinkSecret`. + * Must be (currently) a hash as this is what + * #GNUNET_CRYPTO_ecc_ecdh() returns to us. + */ + struct GNUNET_HashCode key; +}; + + +/** * Secret used to decrypt refresh links. */ struct TALER_LinkSecret @@ -312,15 +326,14 @@ struct TALER_RefreshLinkDecrypted * Use the @a trans_sec (from ECDHE) to decrypt the @a secret_enc * to obtain the @a secret to decrypt the linkage data. * - * @param secret_enc encrypted secret (FIXME: use different type!) - * @param trans_sec transfer secret (FIXME: use different type?) + * @param secret_enc encrypted secret + * @param trans_sec transfer secret * @param secret shared secret for refresh link decryption - * (FIXME: use different type?) * @return #GNUNET_OK on success */ int TALER_transfer_decrypt (const struct TALER_EncryptedLinkSecret *secret_enc, - const struct GNUNET_HashCode *trans_sec, + const struct TALER_TransferSecret *trans_sec, struct TALER_LinkSecret *secret); @@ -329,13 +342,13 @@ TALER_transfer_decrypt (const struct TALER_EncryptedLinkSecret *secret_enc, * to obtain the @a secret_enc. * * @param secret shared secret for refresh link decryption - * @param trans_sec transfer secret (FIXME: use different type?) + * @param trans_sec transfer secret * @param secret_enc[out] encrypted secret * @return #GNUNET_OK on success */ int TALER_transfer_encrypt (const struct TALER_LinkSecret *secret, - const struct GNUNET_HashCode *trans_sec, + const struct TALER_TransferSecret *trans_sec, struct TALER_EncryptedLinkSecret *secret_enc); |