From 0a0feeea8679d96cf2b5679562654512d467f0c2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 15 Apr 2015 18:34:14 +0200 Subject: finish #3777 including testing --- src/include/taler_crypto_lib.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/include/taler_crypto_lib.h') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index dedeef5b0..752d2bfd8 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -441,6 +441,24 @@ TALER_link_decrypt_secret (const struct TALER_EncryptedLinkSecretP *secret_enc, struct TALER_LinkSecretP *secret); +/** + * Decrypt the shared @a secret from the information in the + * encrypted link secret @e secret_enc using the transfer + * public key and the coin's private key. + * + * @param secret_enc encrypted link secret + * @param transfer_pub transfer public key + * @param coin_priv coin private key + * @param[out] secret set to the shared secret + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error + */ +int +TALER_link_decrypt_secret2 (const struct TALER_EncryptedLinkSecretP *secret_enc, + const struct TALER_TransferPublicKeyP *trans_pub, + const union TALER_CoinSpendPrivateKeyP *coin_priv, + struct TALER_LinkSecretP *secret); + + /** * Encrypt the shared @a secret to generate the encrypted link secret. * Also creates the transfer key. -- cgit v1.2.3