[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-donau] branch master updated: [secmod] remove unneccessary helper
From: |
gnunet |
Subject: |
[taler-donau] branch master updated: [secmod] remove unneccessary helper related definitions from donau_crypto_lib |
Date: |
Wed, 17 Jan 2024 13:04:14 +0100 |
This is an automated email from the git hooks/post-receive script.
pius-loosli pushed a commit to branch master
in repository donau.
The following commit(s) were added to refs/heads/master by this push:
new 76ef2a0 [secmod] remove unneccessary helper related definitions from
donau_crypto_lib
76ef2a0 is described below
commit 76ef2a0a3710519faa56cba3971313bcbb06105a
Author: Pius Loosli <loosp2@bfh.ch>
AuthorDate: Wed Jan 17 13:03:59 2024 +0100
[secmod] remove unneccessary helper related definitions from
donau_crypto_lib
---
src/include/donau_crypto_lib.h | 414 -----------------------------------------
1 file changed, 414 deletions(-)
diff --git a/src/include/donau_crypto_lib.h b/src/include/donau_crypto_lib.h
index ad7f950..d972b86 100644
--- a/src/include/donau_crypto_lib.h
+++ b/src/include/donau_crypto_lib.h
@@ -502,418 +502,4 @@ struct TALER_DonauBatchIssueValues
};
-/* ********************* Helper-based RSA operations
************************** */
-/**
- * Function called with information about available keys for signing. Usually
- * only called once per key upon connect. Also called again in case a key is
- * being revoked, in that case with an @a end_time of zero.
- *
- * @param cls closure
- * @param section_name name of the donation unit type in the configuration;
- * NULL if the key has been revoked or purged
- * @param start_time when does the key become available for signing;
- * zero if the key has been revoked or purged
- * @param validity_duration how long does the key remain available for signing;
- * zero if the key has been revoked or purged
- * @param h_rsa hash of the RSA @a donation_unit_pub that is available (or was
purged)
- * @param bs_pub the public key itself, NULL if the key was revoked or purged
- * @param sm_pub public key of the security module, NULL if the key was
revoked or purged
- * @param sm_sig signature from the security module, NULL if the key was
revoked or purged
- * The signature was already verified against @a sm_pub.
- */
-typedef void
-(*DONAU_CRYPTO_RsaDonationUnitKeyStatusCallback)(
- void *cls,
- const char *section_name,
- struct GNUNET_TIME_Timestamp start_time,
- struct GNUNET_TIME_Relative validity_duration,
- const struct TALER_RsaPubHashP *h_rsa,
- struct GNUNET_CRYPTO_BlindSignPublicKey *bs_pub,
- const struct TALER_SecurityModulePublicKeyP *sm_pub,
- const struct TALER_SecurityModuleSignatureP *sm_sig);
-
-/**
- * Handle for talking to an Donation unit key signing helper.
- */
-struct DONAU_CRYPTO_RsaDonationUnitHelper;
-
-
-/**
- * Initiate connection to an donation unit key helper.
- *
- * @param cfg configuration to use
- * @param section configuration section prefix to use, usually 'taler' or
'donau'
- * @param dkc function to call with key information
- * @param dkc_cls closure for @a dkc
- * @return NULL on error (such as bad @a cfg).
- */
-struct DONAU_CRYPTO_RsaDonationUnitHelper *
-DONAU_CRYPTO_helper_rsa_connect (
- const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- DONAU_CRYPTO_RsaDonationUnitKeyStatusCallback dkc,
- void *dkc_cls);
-
-
-/**
- * Function to call to 'poll' for updates to the available key material.
- * Should be called whenever it is important that the key material status is
- * current, like when handling a "/keys" request. This function basically
- * briefly checks if there are messages from the helper announcing changes to
- * donation unit keys.
- *
- * @param dh helper process connection
- */
-void
-DONAU_CRYPTO_helper_rsa_poll (struct DONAU_CRYPTO_RsaDonationUnitHelper *dh);
-
-/**
- * Close connection to @a dh.
- *
- * @param[in] dh connection to close
- */
-void
-DONAU_CRYPTO_helper_rsa_disconnect (
- struct DONAU_CRYPTO_RsaDonationUnitHelper *dh);
-
-
-/* **************** Helper-based CS operations **************** */
-
-/**
- * Handle for talking to an DonationUnit key signing helper.
- */
-struct DONAU_CRYPTO_CsDonationUnitHelper;
-
-/**
- * Function called with information about available keys for signing. Usually
- * only called once per key upon connect. Also called again in case a key is
- * being revoked, in that case with an @a end_time of zero.
- *
- * @param cls closure
- * @param section_name name of the donation unit type in the configuration;
- * NULL if the key has been revoked or purged
- * @param start_time when does the key become available for signing;
- * zero if the key has been revoked or purged
- * @param validity_duration how long does the key remain available for signing;
- * zero if the key has been revoked or purged
- * @param h_cs hash of the CS @a donation_unit_pub that is available (or was
purged)
- * @param bsign_pub the public key itself, NULL if the key was revoked or
purged
- * @param sm_pub public key of the security module, NULL if the key was
revoked or purged
- * @param sm_sig signature from the security module, NULL if the key was
revoked or purged
- * The signature was already verified against @a sm_pub.
- */
-typedef void
-(*DONAU_CRYPTO_CsDonationUnitKeyStatusCallback)(
- void *cls,
- const char *section_name,
- struct GNUNET_TIME_Timestamp start_time,
- struct GNUNET_TIME_Relative validity_duration,
- const struct TALER_CsPubHashP *h_cs,
- struct GNUNET_CRYPTO_BlindSignPublicKey *bsign_pub,
- const struct TALER_SecurityModulePublicKeyP *sm_pub,
- const struct TALER_SecurityModuleSignatureP *sm_sig);
-
-
-/**
- * Initiate connection to an donation unit key helper.
- *
- * @param cfg configuration to use
- * @param section configuration section prefix to use, usually 'taler' or
'donau'
- * @param dkc function to call with key information
- * @param dkc_cls closure for @a dkc
- * @return NULL on error (such as bad @a cfg).
- */
-struct DONAU_CRYPTO_CsDonationUnitHelper *
-DONAU_CRYPTO_helper_cs_connect (
- const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- DONAU_CRYPTO_CsDonationUnitKeyStatusCallback dkc,
- void *dkc_cls);
-
-
-/**
- * Function to call to 'poll' for updates to the available key material.
- * Should be called whenever it is important that the key material status is
- * current, like when handling a "/keys" request. This function basically
- * briefly checks if there are messages from the helper announcing changes to
- * donation unit keys.
- *
- * @param dh helper process connection
- */
-void
-DONAU_CRYPTO_helper_cs_poll (struct DONAU_CRYPTO_CsDonationUnitHelper *dh);
-
-
-/**
- * Request helper @a dh to sign @a req.
- *
- * This operation will block until the signature has been obtained. Should
- * this process receive a signal (that is not ignored) while the operation is
- * pending, the operation will fail. Note that the helper may still believe
- * that it created the signature. Thus, signals may result in a small
- * differences in the signature counters. Retrying in this case may work.
- *
- * @param dh helper process connection
- * @param req information about the key to sign with and the value to sign
- * @param for_melt true if for melt operation
- * @param[out] bs set to the blind signature
- * @return #TALER_EC_NONE on success
- */
-enum TALER_ErrorCode
-DONAU_CRYPTO_helper_cs_sign (
- struct DONAU_CRYPTO_CsDonationUnitHelper *dh,
- const struct TALER_CRYPTO_CsSignRequest *req,
- bool for_melt,
- struct DONAU_BlindedDonationUnitSignature *bs);
-
-
-/**
- * Request helper @a dh to sign batch of @a reqs requests.
- *
- * This operation will block until the signature has been obtained. Should
- * this process receive a signal (that is not ignored) while the operation is
- * pending, the operation will fail. Note that the helper may still believe
- * that it created the signature. Thus, signals may result in a small
- * differences in the signature counters. Retrying in this case may work.
- *
- * @param dh helper process connection
- * @param reqs information about the keys to sign with and the values to sign
- * @param reqs_length length of the @a reqs array
- * @param for_melt true if this is for a melt operation
- * @param[out] bss array set to the blind signatures, must be of length @a
reqs_length!
- * @return #TALER_EC_NONE on success
- */
-enum TALER_ErrorCode
-DONAU_CRYPTO_helper_cs_batch_sign (
- struct DONAU_CRYPTO_CsDonationUnitHelper *dh,
- unsigned int reqs_length,
- const struct TALER_CRYPTO_CsSignRequest reqs[static reqs_length],
- bool for_melt,
- struct DONAU_BlindedDonationUnitSignature bss[static reqs_length]);
-
-
-/**
- * Ask the helper to revoke the public key associated with @a h_cs.
- * Will cause the helper to tell all clients that the key is now unavailable,
- * and to create a replacement key.
- *
- * This operation will block until the revocation request has been
- * transmitted. Should this process receive a signal (that is not ignored)
- * while the operation is pending, the operation may fail. If the key is
- * unknown, this function will also appear to have succeeded. To be sure that
- * the revocation worked, clients must watch the donation unit key status
- * callback.
- *
- * @param dh helper to process connection
- * @param h_cs hash of the CS public key to revoke
- */
-void
-DONAU_CRYPTO_helper_cs_revoke (
- struct DONAU_CRYPTO_CsDonationUnitHelper *dh,
- const struct TALER_CsPubHashP *h_cs);
-
-
-/**
- * Ask the helper to derive R using the information
- * from @a cdr.
- *
- * This operation will block until the R has been obtained. Should
- * this process receive a signal (that is not ignored) while the operation is
- * pending, the operation will fail. Note that the helper may still believe
- * that it created the signature. Thus, signals may result in a small
- * differences in the signature counters. Retrying in this case may work.
- *
- * @param dh helper to process connection
- * @param cdr derivation input data
- * @param for_melt true if this is for a melt operation
- * @param[out] crp set to the pair of R values
- * @return set to the error code (or #TALER_EC_NONE on success)
- */
-enum TALER_ErrorCode
-DONAU_CRYPTO_helper_cs_r_derive (
- struct DONAU_CRYPTO_CsDonationUnitHelper *dh,
- const struct TALER_CRYPTO_CsDeriveRequest *cdr,
- bool for_melt,
- struct GNUNET_CRYPTO_CSPublicRPairP *crp);
-
-
-/**
- * Ask the helper to derive R using the information from @a cdrs.
- *
- * This operation will block until the R has been obtained. Should
- * this process receive a signal (that is not ignored) while the operation is
- * pending, the operation will fail. Note that the helper may still believe
- * that it created the signature. Thus, signals may result in a small
- * differences in the signature counters. Retrying in this case may work.
- *
- * @param dh helper to process connection
- * @param cdrs_length length of the @a cdrs array
- * @param cdrs array with derivation input data
- * @param for_melt true if this is for a melt operation
- * @param[out] crps array set to the pair of R values, must be of length @a
cdrs_length
- * @return set to the error code (or #TALER_EC_NONE on success)
- */
-enum TALER_ErrorCode
-DONAU_CRYPTO_helper_cs_r_batch_derive (
- struct DONAU_CRYPTO_CsDonationUnitHelper *dh,
- unsigned int cdrs_length,
- const struct TALER_CRYPTO_CsDeriveRequest cdrs[static cdrs_length],
- bool for_melt,
- struct GNUNET_CRYPTO_CSPublicRPairP crps[static cdrs_length]);
-
-
-/**
- * Close connection to @a dh.
- *
- * @param[in] dh connection to close
- */
-void
-DONAU_CRYPTO_helper_cs_disconnect (
- struct DONAU_CRYPTO_CsDonationUnitHelper *dh);
-
-
-/*********************** Helper-based EDDSA operations
*****************************/
-
-/**
- * Handle for talking to an online key signing helper.
- */
-struct DONAU_CRYPTO_DonauSignHelper;
-
-/**
- * Function called with information about available keys for signing. Usually
- * only called once per key upon connect. Also called again in case a key is
- * being revoked, in that case with an @a end_time of zero.
- *
- * @param cls closure
- * @param start_time when does the key become available for signing;
- * zero if the key has been revoked or purged
- * @param validity_duration how long does the key remain available for signing;
- * zero if the key has been revoked or purged
- * @param exchange_pub the public key itself, NULL if the key was revoked or
purged
- * @param sm_pub public key of the security module, NULL if the key was
revoked or purged
- * @param sm_sig signature from the security module, NULL if the key was
revoked or purged
- * The signature was already verified against @a sm_pub.
- */
-typedef void
-(*DONAU_CRYPTO_DonauKeyStatusCallback)(
- void *cls,
- struct GNUNET_TIME_Timestamp start_time,
- struct GNUNET_TIME_Relative validity_duration,
- const struct DONAU_DonauPublicKeyP *exchange_pub,
- const struct TALER_SecurityModulePublicKeyP *sm_pub,
- const struct TALER_SecurityModuleSignatureP *sm_sig);
-
-
-/**
- * Initiate connection to an online signing key helper.
- *
- * @param cfg configuration to use
- * @param section configuration section prefix to use, usually 'taler' or
'donau'
- * @param ekc function to call with key information
- * @param ekc_cls closure for @a ekc
- * @return NULL on error (such as bad @a cfg).
- */
-struct DONAU_CRYPTO_DonauSignHelper *
-DONAU_CRYPTO_helper_esign_connect (
- const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- DONAU_CRYPTO_DonauKeyStatusCallback ekc,
- void *ekc_cls);
-
-
-/**
- * Function to call to 'poll' for updates to the available key material.
- * Should be called whenever it is important that the key material status is
- * current, like when handling a "/keys" request. This function basically
- * briefly checks if there are messages from the helper announcing changes to
- * donau online signing keys.
- *
- * @param esh helper process connection
- */
-void
-DONAU_CRYPTO_helper_esign_poll (struct DONAU_CRYPTO_DonauSignHelper *esh);
-
-
-/**
- * Request helper @a esh to sign @a msg using the current online
- * signing key.
- *
- * This operation will block until the signature has been obtained. Should
- * this process receive a signal (that is not ignored) while the operation is
- * pending, the operation will fail. Note that the helper may still believe
- * that it created the signature. Thus, signals may result in a small
- * differences in the signature counters. Retrying in this case may work.
- *
- * @param esh helper process connection
- * @param purpose message to sign (must extend beyond the purpose)
- * @param[out] donau_pub set to the public key used for the signature upon
success
- * @param[out] donau_sig set to the signature upon success
- * @return the error code (or #TALER_EC_NONE on success)
- */
-enum TALER_ErrorCode
-DONAU_CRYPTO_helper_esign_sign_ (
- struct DONAU_CRYPTO_DonauSignHelper *esh,
- const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
- struct DONAU_DonauPublicKeyP *donau_pub,
- struct DONAU_DonauSignatureP *donau_sig);
-
-
-/**
- * Request helper @a esh to sign @a msg using the current online
- * signing key.
- *
- * This operation will block until the signature has been obtained. Should
- * this process receive a signal (that is not ignored) while the operation is
- * pending, the operation will fail. Note that the helper may still believe
- * that it created the signature. Thus, signals may result in a small
- * differences in the signature counters. Retrying in this case may work.
- *
- * @param esh helper process connection
- * @param ps message to sign (MUST begin with a purpose)
- * @param[out] epub set to the public key used for the signature upon success
- * @param[out] esig set to the signature upon success
- * @return the error code (or #TALER_EC_NONE on success)
- */
-#define DONAU_CRYPTO_helper_esign_sign(esh,ps,epub,esig) ( \
- /* check size is set correctly */ \
- GNUNET_assert (ntohl ((ps)->purpose.size) == sizeof (*ps)), \
- /* check 'ps' begins with the purpose */ \
- GNUNET_static_assert (((void*) (ps)) == \
- ((void*) &(ps)->purpose)), \
- DONAU_CRYPTO_helper_esign_sign_ (esh, \
- &(ps)->purpose, \
- epub, \
- esig) )
-
-
-/**
- * Ask the helper to revoke the public key @a donau_pub .
- * Will cause the helper to tell all clients that the key is now unavailable,
- * and to create a replacement key.
- *
- * This operation will block until the revocation request has been
- * transmitted. Should this process receive a signal (that is not ignored)
- * while the operation is pending, the operation may fail. If the key is
- * unknown, this function will also appear to have succeeded. To be sure that
- * the revocation worked, clients must watch the signing key status callback.
- *
- * @param esh helper to process connection
- * @param donau_pub the public key to revoke
- */
-void
-DONAU_CRYPTO_helper_esign_revoke (
- struct DONAU_CRYPTO_DonauSignHelper *esh,
- const struct DONAU_DonauPublicKeyP *donau_pub);
-
-
-/**
- * Close connection to @a esh.
- *
- * @param[in] esh connection to close
- */
-void
-DONAU_CRYPTO_helper_esign_disconnect (
- struct DONAU_CRYPTO_DonauSignHelper *esh);
-
-
#endif
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-donau] branch master updated: [secmod] remove unneccessary helper related definitions from donau_crypto_lib,
gnunet <=