[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] 09/09: renaming
From: |
gnunet |
Subject: |
[taler-anastasis] 09/09: renaming |
Date: |
Wed, 01 Apr 2020 10:12:32 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
commit 7e332f65a5141f417bcd248116daab04967f4988
Author: Dennis Neufeld <address@hidden>
AuthorDate: Wed Apr 1 08:10:58 2020 +0000
renaming
---
src/include/anastasis_crypto_lib.h | 92 ++++++++++++-------------
src/util/anastasis_crypto.c | 138 ++++++++++++++++++-------------------
2 files changed, 115 insertions(+), 115 deletions(-)
diff --git a/src/include/anastasis_crypto_lib.h
b/src/include/anastasis_crypto_lib.h
index 29e52e4..2eb545c 100644
--- a/src/include/anastasis_crypto_lib.h
+++ b/src/include/anastasis_crypto_lib.h
@@ -127,7 +127,7 @@ struct ANASTASIS_CRYPTO_UserIdentifier
* Creates the UserIdentifier, it is used as entropy source for the encryption
keys and
* for the public and private key for signing the data.
* @param id_data JSON encoded data, which contains the raw user secret and a
server salt
- * @param id reference to the id which was created
+ * @param id[out] reference to the id which was created
*/
void
ANASTASIS_CRYPTO_user_identifier_derive (
@@ -137,7 +137,7 @@ ANASTASIS_CRYPTO_user_identifier_derive (
/**
* Generates the eddsa public Key used as the account identifier on the
providers
* @param id holds a hashed user secret which is used as entropy source for
the public key generation
- * @param pub_key handle for the generated public key
+ * @param pub_key[out] handle for the generated public key
*/
void
ANASTASIS_CRYPTO_account_public_key_derive (
@@ -149,19 +149,19 @@ ANASTASIS_CRYPTO_account_public_key_derive (
* encrypted with a derivation from the user identifier and the salt "erd".
*
* @param id Hashed User input, used for the generation of the encryption key
- * @param data contains the recovery document as raw data
- * @param data_size defines the size of the recovery document inside data
- * @param res return from the result, which contains the encrypted recovery
document
+ * @param rec_doc contains the recovery document as raw data
+ * @param rd_size defines the size of the recovery document inside data
+ * @param enc_rec_doc[out] return from the result, which contains the
encrypted recovery document
* and the nonce and iv used for the encryption as Additional Data
- * @param res_size size of the result
+ * @param erd_size[out] size of the result
*/
void
ANASTASIS_CRYPTO_recovery_document_encrypt (
const struct ANASTASIS_CRYPTO_UserIdentifier *id,
- const void *data,
- size_t data_size,
- void **res,
- size_t *res_size);
+ const void *rec_doc,
+ size_t rd_size,
+ void **enc_rec_doc,
+ size_t *erd_size);
/**
* Decrypts the recovery document with AES256, the decryption key is generated
with
@@ -169,34 +169,34 @@ ANASTASIS_CRYPTO_recovery_document_encrypt (
* are the first 48Byte of the data.
*
* @param id Hashed User input, used for the generation of the encryption key
- * @param data, contains the encrypted recovery document and the nonce and iv
used for the encryption.
- * @param data_size size of the data
- * @param res return from the result, which contains the encrypted recovery
document
+ * @param enc_rec_doc, contains the encrypted recovery document and the nonce
and iv used for the encryption.
+ * @param erd_size size of the data
+ * @param rec_doc[out] return from the result, which contains the encrypted
recovery document
* and the nonce and iv used for the encryption as Additional Data
- * @param res_size size of the result
+ * @param rd_size[out] size of the result
*/
void
ANASTASIS_CRYPTO_recovery_document_decrypt (
const struct ANASTASIS_CRYPTO_UserIdentifier *id,
- const void *data,
- size_t data_size,
- void **res,
- size_t *res_size);
+ const void *enc_rec_doc,
+ size_t erd_size,
+ void **rec_doc,
+ size_t *rd_size);
/**
* Encrypts a keyshare with a key generated with the user identification as
entropy and the salt "eks".
*
* @param key_share the key share which is afterwards encrypted
* @param id the user identification which is the entropy source for the key
generation
- * @param res holds the encrypted share, the first 48 Bytes are the used nonce
and tag
- * @param res_size defines the size of the data
+ * @param enc_key_share[out] holds the encrypted share, the first 48 Bytes are
the used nonce and tag
+ * @param eks_size[out] defines the size of the data
*/
void
ANASTASIS_CRYPTO_key_share_encrypt (
const struct ANASTASIS_CRYPTO_KeyShare *key_share,
const struct ANASTASIS_CRYPTO_UserIdentifier *id,
- void **res,
- size_t *res_size);
+ void **enc_key_share,
+ size_t *eks_size);
/**
* Decrypts a keyshare with a key generated with the user identification as
entropy and the salt "eks".
@@ -204,8 +204,8 @@ ANASTASIS_CRYPTO_key_share_encrypt (
* @param enc_key_share holds the encrypted share, the first 48 Bytes are the
used nonce and tag
* @param size_eks size of encrypted key share
* @param id the user identification which is the entropy source for the key
generation
- * @param key_share the result of decryption
- * @param ks_size size of result
+ * @param key_share[out] the result of decryption
+ * @param ks_size[out] size of result
*/
void
ANASTASIS_CRYPTO_key_share_decrypt (
@@ -221,19 +221,19 @@ ANASTASIS_CRYPTO_key_share_decrypt (
* entropy source and the salt "ect".
*
* @param truth_enc_key master key used for encryption of the truth (see
interface EscrowMethod)
- * @param data truth which will be encrypted
- * @param data_size size of the truth
- * @param res return from the result, which contains the encrypted truth
+ * @param truth truth which will be encrypted
+ * @param truth_size size of the truth
+ * @param enc_truth[out] return from the result, which contains the encrypted
truth
* and the nonce and iv used for the encryption as Additional Data
- * @param res_size size of the result
+ * @param ect_size[out] size of the result
*/
void
ANASTASIS_CRYPTO_truth_encrypt (
const struct ANASTASIS_CRYPTO_TruthKey *truth_enc_key,
- const void *data,
- size_t data_size,
- void **res,
- size_t *res_size);
+ const void *truth,
+ size_t truth_size,
+ void **enc_truth,
+ size_t *ect_size);
/**
* Decrypts the truth data which contains the hashed answer or the phone
number..
@@ -241,25 +241,25 @@ ANASTASIS_CRYPTO_truth_encrypt (
* entropy source and the salt "ect".
*
* @param truth_enc_key master key used for encryption of the truth (see
interface EscrowMethod)
- * @param data truth holds the encrypted truth which will be decrypted
- * @param data_size size of the data
- * @param res return from the result, which contains the truth
- * @param res_size size of the result
+ * @param enc_truth truth holds the encrypted truth which will be decrypted
+ * @param ect_size size of the truth data
+ * @param truth return from the result, which contains the truth
+ * @param truth_size size of the result
*/
void
ANASTASIS_CRYPTO_truth_decrypt (
const struct ANASTASIS_CRYPTO_TruthKey *truth_enc_key,
- const void *data,
- size_t data_size,
- void **res,
- size_t *res_size);
+ const void *enc_truth,
+ size_t ect_size,
+ void **truth,
+ size_t *truth_size);
/**
* A key share is randomly generated, one key share is generated for every
* truth a policy contains.
*
- * @param key_share reference to the created key share.
+ * @param key_share[out] reference to the created key share.
*/
void
ANASTASIS_CRYPTO_key_share_create (
@@ -273,7 +273,7 @@ ANASTASIS_CRYPTO_key_share_create (
* @param key_shares list of key shares which are combined
* @param keyshare_length amount of key shares inside the array
* @param salt salt value
- * @param policy_key reference to the created key
+ * @param policy_key[out] reference to the created key
*/
void
ANASTASIS_CRYPTO_policy_key_derive (
@@ -294,8 +294,8 @@ ANASTASIS_CRYPTO_policy_key_derive (
* @param core_secret the user provided core secret which is secured by
anastasis
* @param core_secret_size the size of the core secret
* @param enc_core_secret the core secret is encrypted with the generated
master key
- * @param enc_core_secret_size size of the encrypted secret
- * @param encrypted_master_keys array of encrypted master keys which will be
safed inside the policies one encrypted
+ * @param enc_core_secret_size[out] size of the encrypted secret
+ * @param encrypted_master_keys[out] array of encrypted master keys which will
be safed inside the policies one encrypted
* master key is created for each policy key
*/
void
@@ -316,8 +316,8 @@ ANASTASIS_CRYPTO_core_secret_encrypt (
* @param policy_key built policy key which will decrypt the master key
* @param encrypted_core_secret the encrypted core secret from the user, will
be encrypted with the policy key
* @param encrypted_core_secret_size size of the encrypted core secret
- * @param core_secret decrypted core secret will be returned
- * @param core_secret_size size of the returned core secret
+ * @param core_secret[out] decrypted core secret will be returned
+ * @param core_secret_size[out] size of the returned core secret
*/
void
ANASTASIS_CRYPTO_core_secret_recover (
diff --git a/src/util/anastasis_crypto.c b/src/util/anastasis_crypto.c
index cd1d5f8..b2d3e2a 100644
--- a/src/util/anastasis_crypto.c
+++ b/src/util/anastasis_crypto.c
@@ -90,8 +90,8 @@ get_iv_key (const void *key_material,
* @param data data to encrypt
* @param data_size size of the data
* @param salt salt value which is used for key derivation
- * @param[out] res ciphertext output
- * @param[out] res_size size of the ciphertext
+ * @param res[out] ciphertext output
+ * @param res_size[out] size of the ciphertext
*/
static void
anastasis_encrypt (const void *key,
@@ -165,8 +165,8 @@ anastasis_encrypt (const void *key,
* @param data data to decrypt
* @param data_size size of the data
* @param salt salt value which is used for key derivation
- * @param res plaintext output
- * @param res_size size of the plaintext
+ * @param res[out] plaintext output
+ * @param res_size[out] size of the plaintext
*/
static void
anastasis_decrypt (const void *key,
@@ -232,7 +232,7 @@ anastasis_decrypt (const void *key,
* Creates the UserIdentifier, it is used as entropy source for the encryption
keys and
* for the public and private key for signing the data.
* @param id_data JSON encoded data, which contains the raw user secret and a
server salt
- * @param id reference to the id which was created
+ * @param id[out] reference to the id which was created
*/
void
ANASTASIS_CRYPTO_user_identifier_derive (
@@ -259,7 +259,7 @@ ANASTASIS_CRYPTO_user_identifier_derive (
/**
* Generates the eddsa private key used to authorize operations on policy
* @param id holds a hashed user secret which is used as entropy source for
the public key generation
- * @param priv_key handle for the generated private key
+ * @param priv_key[out] handle for the generated private key
*/
static void
ANASTASIS_CRYPTO_account_private_key_derive (
@@ -287,7 +287,7 @@ ANASTASIS_CRYPTO_account_private_key_derive (
/**
* Generates the eddsa public Key used as the account identifier on the
providers
* @param id holds a hashed user secret which is used as entropy source for
the public key generation
- * @param pub_key handle for the generated public key
+ * @param pub_key[out] handle for the generated public key
*/
void
ANASTASIS_CRYPTO_account_public_key_derive (
@@ -305,29 +305,29 @@ ANASTASIS_CRYPTO_account_public_key_derive (
* encrypted with a derivation from the user identifier and the salt "erd".
*
* @param id Hashed User input, used for the generation of the encryption key
- * @param data contains the recovery document as raw data
- * @param data_size defines the size of the recovery document inside data
- * @param res return from the result, which contains the encrypted recovery
document
+ * @param rec_doc contains the recovery document as raw data
+ * @param rd_size defines the size of the recovery document inside data
+ * @param enc_rec_doc[out] return from the result, which contains the
encrypted recovery document
* and the nonce and iv used for the encryption as Additional Data
- * @param res_size size of the result
+ * @param erd_size[out] size of the result
*/
void
ANASTASIS_CRYPTO_recovery_document_encrypt (
const struct ANASTASIS_CRYPTO_UserIdentifier *id,
- const void *data,
- size_t data_size,
- void **res,
- size_t *res_size)
+ const void *rec_doc,
+ size_t rd_size,
+ void **enc_rec_doc,
+ size_t *erd_size)
{
const char *salt = "erd";
anastasis_encrypt (id,
sizeof (struct
ANASTASIS_CRYPTO_UserIdentifier),
- data,
- data_size,
+ rec_doc,
+ rd_size,
salt,
- res,
- res_size);
+ enc_rec_doc,
+ erd_size);
}
@@ -337,29 +337,29 @@ ANASTASIS_CRYPTO_recovery_document_encrypt (
* are the first 48Byte of the data.
*
* @param id Hashed User input, used for the generation of the encryption key
- * @param data, contains the encrypted recovery document and the nonce and iv
used for the encryption.
- * @param data_size size of the data
- * @param res return from the result, which contains the encrypted recovery
document
+ * @param enc_rec_doc, contains the encrypted recovery document and the nonce
and iv used for the encryption.
+ * @param erd_size size of the data
+ * @param rec_doc[out] return from the result, which contains the encrypted
recovery document
* and the nonce and iv used for the encryption as Additional Data
- * @param res_size size of the result
+ * @param rd_size[out] size of the result
*/
void
ANASTASIS_CRYPTO_recovery_document_decrypt (
const struct ANASTASIS_CRYPTO_UserIdentifier *id,
- const void *data,
- size_t data_size,
- void **res,
- size_t *res_size)
+ const void *enc_rec_doc,
+ size_t erd_size,
+ void **rec_doc,
+ size_t *rd_size)
{
const char *salt = "erd";
anastasis_decrypt (id,
sizeof (struct
ANASTASIS_CRYPTO_UserIdentifier),
- data,
- data_size,
+ enc_rec_doc,
+ erd_size,
salt,
- res,
- res_size);
+ rec_doc,
+ rd_size);
}
@@ -368,15 +368,15 @@ ANASTASIS_CRYPTO_recovery_document_decrypt (
*
* @param key_share the key share which is afterwards encrypted
* @param id the user identification which is the entropy source for the key
generation
- * @param res holds the encrypted share, the first 48 Bytes are the used nonce
and tag
- * @param res_size defines the size of the data
+ * @param enc_key_share[out] holds the encrypted share, the first 48 Bytes are
the used nonce and tag
+ * @param eks_size[out] defines the size of the data
*/
void
ANASTASIS_CRYPTO_key_share_encrypt (
const struct ANASTASIS_CRYPTO_KeyShare *key_share,
const struct ANASTASIS_CRYPTO_UserIdentifier *id,
- void **res,
- size_t *res_size)
+ void **enc_key_share,
+ size_t *eks_size)
{
const char *salt = "eks";
/* FIXME: the HKDF (in get_iv_key()) should be able to take additional
@@ -390,8 +390,8 @@ ANASTASIS_CRYPTO_key_share_encrypt (
sizeof (struct
ANASTASIS_CRYPTO_KeyShare),
salt,
- res,
- res_size);
+ enc_key_share,
+ eks_size);
}
@@ -401,8 +401,8 @@ ANASTASIS_CRYPTO_key_share_encrypt (
* @param enc_key_share holds the encrypted share, the first 48 Bytes are the
used nonce and tag
* @param size_eks size of encrypted key share
* @param id the user identification which is the entropy source for the key
generation
- * @param key_share the result of decryption
- * @param ks_size size of result
+ * @param key_share[out] the result of decryption
+ * @param ks_size[out] size of result
*/
void
ANASTASIS_CRYPTO_key_share_decrypt (
@@ -430,29 +430,29 @@ ANASTASIS_CRYPTO_key_share_decrypt (
* entropy source and the salt "ect".
*
* @param truth_enc_key master key used for encryption of the truth
- * @param data truth which will be encrypted
- * @param data_size size of the truth
- * @param res return from the result, which contains the encrypted truth
+ * @param truth truth which will be encrypted
+ * @param truth_size size of the truth
+ * @param enc_truth[out] return from the result, which contains the encrypted
truth
* and the nonce and iv used for the encryption as Additional Data
- * @param res_size size of the result
+ * @param ect_size[out] size of the result
*/
void
ANASTASIS_CRYPTO_truth_encrypt (
const struct ANASTASIS_CRYPTO_TruthKey *truth_enc_key,
- const void *data,
- size_t data_size,
- void **res,
- size_t *res_size)
+ const void *truth,
+ size_t truth_size,
+ void **enc_truth,
+ size_t *ect_size)
{
const char *salt = "ect";
anastasis_encrypt (truth_enc_key,
sizeof (struct
ANASTASIS_CRYPTO_TruthKey),
- data,
- data_size,
+ truth,
+ truth_size,
salt,
- res,
- res_size);
+ enc_truth,
+ ect_size);
}
@@ -462,28 +462,28 @@ ANASTASIS_CRYPTO_truth_encrypt (
* entropy source and the salt "ect".
*
* @param truth_enc_key master key used for encryption of the truth
- * @param data truth holds the encrypted truth which will be decrypted
- * @param data_size size of the data
- * @param res return from the result, which contains the truth
- * @param res_size size of the result
+ * @param enc_truth truth holds the encrypted truth which will be decrypted
+ * @param ect_size size of the truth data
+ * @param truth[out] return from the result, which contains the truth
+ * @param truth_size[out] size of the result
*/
void
ANASTASIS_CRYPTO_truth_decrypt (
const struct ANASTASIS_CRYPTO_TruthKey *truth_enc_key,
- const void *data,
- size_t data_size,
- void **res,
- size_t *res_size)
+ const void *enc_truth,
+ size_t ect_size,
+ void **truth,
+ size_t *truth_size)
{
const char *salt = "ect";
anastasis_decrypt (truth_enc_key,
sizeof (struct
ANASTASIS_CRYPTO_TruthKey),
- data,
- data_size,
+ enc_truth,
+ ect_size,
salt,
- res,
- res_size);
+ truth,
+ truth_size);
}
@@ -491,7 +491,7 @@ ANASTASIS_CRYPTO_truth_decrypt (
* A key share is randomly generated, one key share is generated for every
* truth a policy contains.
*
- * @param key_share reference to the created key share.
+ * @param key_share[out] reference to the created key share.
*/
void
ANASTASIS_CRYPTO_key_share_create (
@@ -510,7 +510,7 @@ ANASTASIS_CRYPTO_key_share_create (
* @param key_shares list of key shares which are combined
* @param keyshare_length amount of key shares inside the array
* @param salt salt value
- * @param policy_key reference to the created key
+ * @param policy_key[out] reference to the created key
*/
void
ANASTASIS_CRYPTO_policy_key_derive (
@@ -542,8 +542,8 @@ ANASTASIS_CRYPTO_policy_key_derive (
* @param core_secret the user provided core secret which is secured by
anastasis
* @param core_secret_size the size of the core secret
* @param enc_core_secret the core secret is encrypted with the generated
master key
- * @param enc_core_secret_size size of the encrypted secret
- * @param encrypted_master_keys array of encrypted master keys which will be
safed inside the policies one encrypted
+ * @param enc_core_secret_size[out] size of the encrypted secret
+ * @param encrypted_master_keys[out] array of encrypted master keys which will
be safed inside the policies one encrypted
* master key is created for each policy key
*/
void
@@ -596,8 +596,8 @@ ANASTASIS_CRYPTO_core_secret_encrypt (
* @param policy_key built policy key which will decrypt the master key
* @param encrypted_core_secret the encrypted core secret from the user, will
be encrypted with the policy key
* @param encrypted_core_secret_size size of the encrypted core secret
- * @param core_secret decrypted core secret will be returned
- * @param core_secret_size size of the returned core secret
+ * @param core_secret[out] decrypted core secret will be returned
+ * @param core_secret_size[out] size of the returned core secret
*/
void
ANASTASIS_CRYPTO_core_secret_recover (
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [taler-anastasis] branch master updated (9612023 -> 7e332f6), gnunet, 2020/04/01
- [taler-anastasis] 04/09: private key derivation, gnunet, 2020/04/01
- [taler-anastasis] 02/09: sizeof to strlen..., gnunet, 2020/04/01
- [taler-anastasis] 01/09: changed msec to key, added key_len, gnunet, 2020/04/01
- [taler-anastasis] 03/09: GNUNET_free() to free()..., gnunet, 2020/04/01
- [taler-anastasis] 08/09: GNUNET_malloc() in core_secret_encrypt/recover, gnunet, 2020/04/01
- [taler-anastasis] 06/09: const char*..., gnunet, 2020/04/01
- [taler-anastasis] 07/09: PolicyKey to hash, gnunet, 2020/04/01
- [taler-anastasis] 05/09: modified policy key derivation, gnunet, 2020/04/01
- [taler-anastasis] 09/09: renaming,
gnunet <=