gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] 02/02: deleted aes_gcm_tag and nonce from truth: encry


From: gnunet
Subject: [taler-anastasis] 02/02: deleted aes_gcm_tag and nonce from truth: encrypted_truth contains them
Date: Wed, 15 Apr 2020 17:00:37 +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 283d7009c62cf75cd90627a8f2fc050028aa3428
Author: Dennis Neufeld <address@hidden>
AuthorDate: Wed Apr 15 15:00:27 2020 +0000

    deleted aes_gcm_tag and nonce from truth: encrypted_truth contains them
---
 src/backend/anastasis-httpd_truth_upload.c |  4 ----
 src/include/anastasis_database_plugin.h    |  2 --
 src/lib/testing_api_cmd_truth_store.c      | 13 -------------
 src/stasis/plugin_anastasis_postgres.c     | 19 +------------------
 src/stasis/test_anastasis_db.c             |  2 --
 5 files changed, 1 insertion(+), 39 deletions(-)

diff --git a/src/backend/anastasis-httpd_truth_upload.c 
b/src/backend/anastasis-httpd_truth_upload.c
index a464a84..3952a5a 100644
--- a/src/backend/anastasis-httpd_truth_upload.c
+++ b/src/backend/anastasis-httpd_truth_upload.c
@@ -48,8 +48,6 @@ verify_and_execute_truth (struct MHD_Connection *connection,
                         truth->truth_mime,
                         truth->encrypted_truth,
                         truth->encrypted_truth_size,
-                        &truth->aes_gcm_tag,
-                        &truth->nonce,
                         truth->method,
                         AH_truth_expiration);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -97,8 +95,6 @@ AH_handler_truth_post (struct MHD_Connection *connection,
     struct GNUNET_JSON_Specification spec[] = {
       GNUNET_JSON_spec_fixed_auto ("keyshare_data", &truth.keyshare_data),
       GNUNET_JSON_spec_string ("method", &truth.method),
-      GNUNET_JSON_spec_fixed_auto ("nonce", &truth.nonce),
-      GNUNET_JSON_spec_fixed_auto ("aes_gcm_tag", &truth.aes_gcm_tag),
       GNUNET_JSON_spec_varsize ("encrypted_truth", &truth.encrypted_truth,
                                 &truth.encrypted_truth_size),
       GNUNET_JSON_spec_string ("truth_mime", &truth.truth_mime),
diff --git a/src/include/anastasis_database_plugin.h 
b/src/include/anastasis_database_plugin.h
index 9929b66..518ff34 100644
--- a/src/include/anastasis_database_plugin.h
+++ b/src/include/anastasis_database_plugin.h
@@ -261,8 +261,6 @@ struct ANASTASIS_DatabasePlugin
                  const char *mime_type,
                  const void *encrypted_truth,
                  size_t encrypted_truth_size,
-                 const struct ANASTASIS_CRYPTO_AesTag *aes_gcm_tag,
-                 const struct ANASTASIS_CRYPTO_Nonce *nonce,
                  const char *method,
                  struct
                  GNUNET_TIME_Relative truth_expiration);
diff --git a/src/lib/testing_api_cmd_truth_store.c 
b/src/lib/testing_api_cmd_truth_store.c
index 81a502c..108a3b9 100644
--- a/src/lib/testing_api_cmd_truth_store.c
+++ b/src/lib/testing_api_cmd_truth_store.c
@@ -388,17 +388,9 @@ ANASTASIS_TESTING_make_truth_example (char *method,
 
   json_t *truth_data;
   struct ANASTASIS_CRYPTO_EncryptedKeyShare keyshare_data;
-  struct ANASTASIS_CRYPTO_Nonce nonce;
-  struct ANASTASIS_CRYPTO_AesTag aes_gcm_tag;
   struct GNUNET_HashCode truth_hash;
   const char *encrypted_truth;
 
-  GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
-                              &nonce,
-                              sizeof (struct ANASTASIS_CRYPTO_Nonce));
-  GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
-                              &aes_gcm_tag,
-                              sizeof (struct ANASTASIS_CRYPTO_AesTag));
   GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
                               &keyshare_data,
                               sizeof (struct
@@ -410,16 +402,11 @@ ANASTASIS_TESTING_make_truth_example (char *method,
 
   truth_data = json_pack ("{s:o," /* keyshare_data */
                           " s:s," /* method */
-                          " s:o," /* nonce */
-                          " s:o," /* aes_gcm_tag */
                           " s:o," /* encrypted_truth */
                           " s:s}", /* truth_mime */
                           "keyshare_data", GNUNET_JSON_from_data_auto (
                             &keyshare_data),
                           "method", method,
-                          "nonce", GNUNET_JSON_from_data_auto (&nonce),
-                          "aes_gcm_tag", GNUNET_JSON_from_data_auto (
-                            &aes_gcm_tag),
                           "encrypted_truth", GNUNET_JSON_from_data (
                             encrypted_truth, strlen (encrypted_truth)),
                           "truth_mime", mime_type
diff --git a/src/stasis/plugin_anastasis_postgres.c 
b/src/stasis/plugin_anastasis_postgres.c
index 569a3bf..399fef7 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -984,8 +984,6 @@ postgres_store_truth (void *cls,
                       const char *mime_type,
                       const void *encrypted_truth,
                       size_t encrypted_truth_size,
-                      const struct ANASTASIS_CRYPTO_AesTag *aes_gcm_tag,
-                      const struct ANASTASIS_CRYPTO_Nonce *nonce,
                       const char *method,
                       struct
                       GNUNET_TIME_Relative truth_expiration)
@@ -1011,8 +1009,6 @@ postgres_store_truth (void *cls,
       GNUNET_PQ_query_param_auto_from_type (uuid),
       GNUNET_PQ_query_param_auto_from_type (key_share_data),
       GNUNET_PQ_query_param_string (method),
-      GNUNET_PQ_query_param_auto_from_type (nonce),
-      GNUNET_PQ_query_param_auto_from_type (aes_gcm_tag),
       GNUNET_PQ_query_param_fixed_size (encrypted_truth,
                                         encrypted_truth_size),
       GNUNET_PQ_query_param_string (mime_type),
@@ -1068,8 +1064,6 @@ postgres_get_escrow_challenge (void *cls,
                                const uuid_t *uuid,
                                void **truth,
                                size_t *truth_size,
-                               unsigned char **aes_gcm_tag,
-                               uint32_t **nonce,
                                char **truth_mime,
                                char **method)
 {
@@ -1082,11 +1076,6 @@ postgres_get_escrow_challenge (void *cls,
     GNUNET_PQ_result_spec_variable_size ("encrypted_truth",
                                          truth,
                                          truth_size),
-    GNUNET_PQ_result_spec_fixed_size ("aes_gcm_tag",
-                                      aes_gcm_tag,
-                                      16),
-    GNUNET_PQ_result_spec_uint32 ("nonce",
-                                  *nonce),
     GNUNET_PQ_result_spec_string ("truth_mime",
                                   truth_mime),
     GNUNET_PQ_result_spec_string ("method",
@@ -1376,8 +1365,6 @@ libanastasis_plugin_db_postgres_init (void *cls)
                             "(truth_id UUID PRIMARY KEY NOT NULL,"
                             " key_share_data BYTEA NOT NULL,"
                             " method VARCHAR,"
-                            " nonce BYTEA NOT NULL,"
-                            " aes_gcm_tag BYTEA NOT NULL,"
                             " encrypted_truth BYTEA NOT NULL,"
                             " truth_mime VARCHAR,"
                             " expiration TIMESTAMP NOT NULL"
@@ -1491,13 +1478,11 @@ libanastasis_plugin_db_postgres_init (void *cls)
                             "(truth_id"
                             ",key_share_data"
                             ",method"
-                            ",nonce"
-                            ",aes_gcm_tag"
                             ",encrypted_truth"
                             ",truth_mime"
                             ",expiration"
                             ") VALUES "
-                            "($1, $2, $3, $4, $5, $6, $7, $8);",
+                            "($1, $2, $3, $4, $5, $6);",
                             7),
     GNUNET_PQ_make_prepare ("recovery_document_insert",
                             "INSERT INTO anastasis_recoverydocument "
@@ -1514,8 +1499,6 @@ libanastasis_plugin_db_postgres_init (void *cls)
                             "truth_id"
                             ",key_share_data"
                             ",method"
-                            ",nonce"
-                            ",aes_gcm_tag"
                             ",encrypted_truth"
                             ",truth_mime"
                             ",expiration"
diff --git a/src/stasis/test_anastasis_db.c b/src/stasis/test_anastasis_db.c
index c1cdbd5..308c8ef 100644
--- a/src/stasis/test_anastasis_db.c
+++ b/src/stasis/test_anastasis_db.c
@@ -260,8 +260,6 @@ run (void *cls)
                                mime_type,
                                "encrypted_truth",
                                sizeof ("encrypted_truth"),
-                               aes_gcm_tag,
-                               &nonce,
                                method,
                                rel_time));
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]