gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r30098 - in gnunet-gtk: contrib src/fs src/identity src/nam


From: gnunet
Subject: [GNUnet-SVN] r30098 - in gnunet-gtk: contrib src/fs src/identity src/namestore
Date: Thu, 10 Oct 2013 16:41:41 +0200

Author: grothoff
Date: 2013-10-10 16:41:41 +0200 (Thu, 10 Oct 2013)
New Revision: 30098

Modified:
   gnunet-gtk/contrib/gnunet_identity_gtk_about_window.glade
   gnunet-gtk/src/fs/gnunet-fs-gtk.c
   gnunet-gtk/src/fs/gnunet-fs-gtk.h
   gnunet-gtk/src/fs/gnunet-fs-gtk_common.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
   gnunet-gtk/src/identity/gnunet-identity-gtk.c
   gnunet-gtk/src/identity/gnunet-identity-gtk_advertise.c
   gnunet-gtk/src/identity/gnunet-identity-gtk_advertise.h
   gnunet-gtk/src/namestore/gnunet-namestore-gtk.c
   gnunet-gtk/src/namestore/gnunet-namestore-gtk_edit.c
Log:
separating ECC crypto into functions/structs for ECDHE, ECDSA and EDDSA

Modified: gnunet-gtk/contrib/gnunet_identity_gtk_about_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_identity_gtk_about_window.glade   2013-10-10 
14:40:06 UTC (rev 30097)
+++ gnunet-gtk/contrib/gnunet_identity_gtk_about_window.glade   2013-10-10 
14:41:41 UTC (rev 30098)
@@ -91,7 +91,7 @@
           <object class="GtkLabel" id="about_name_version_label">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="label">GNUnet-Peerinfo-GTK 0.9.3</property>
+            <property name="label">GNUnet-Peerinfo-GTK 0.9.5</property>
             <attributes>
               <attribute name="weight" value="bold"/>
               <attribute name="size" value="200"/>

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c   2013-10-10 14:40:06 UTC (rev 30097)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c   2013-10-10 14:41:41 UTC (rev 30098)
@@ -565,7 +565,7 @@
  */
 static void
 monitor_zone_records (void *cls,
-                     const struct GNUNET_CRYPTO_EccPrivateKey *zone,
+                     const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
                      const char *label,
                      unsigned int rd_count,
                      const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -642,7 +642,7 @@
                _("No default ego specified for `fs-sks` service, will not 
enable namespace search.\n"));
     return;
   }
-  main_context.sks_zone = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey);
+  main_context.sks_zone = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
   *main_context.sks_zone = *GNUNET_IDENTITY_ego_get_private_key (ego);
   gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object 
("main_window_search_namespace_label")));
   gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object 
("main_window_search_namespace_combobox")));

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.h   2013-10-10 14:40:06 UTC (rev 30097)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.h   2013-10-10 14:41:41 UTC (rev 30098)
@@ -132,7 +132,7 @@
   /**
    * Public key of the namespace we are trying to save.
    */
-  struct GNUNET_CRYPTO_EccPublicSignKey pkey;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
 
   /**
    * Nickname we're saving under.
@@ -253,7 +253,7 @@
   /**
    * Our zone for SKS operations.  Can be NULL.
    */
-  struct GNUNET_CRYPTO_EccPrivateKey *sks_zone;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey *sks_zone;
 
 };
 

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_common.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_common.c    2013-10-10 14:40:06 UTC (rev 
30097)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_common.c    2013-10-10 14:41:41 UTC (rev 
30098)
@@ -276,7 +276,7 @@
   GtkEntry *query_entry;
   GtkComboBox *ns_cb;
   GtkEntry *ns_entry;
-  struct GNUNET_CRYPTO_EccPublicSignKey want;
+  struct GNUNET_CRYPTO_EcdsaPublicKey want;
 
 
   if (GNUNET_FS_uri_test_chk (uri) || GNUNET_FS_uri_test_loc (uri))

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c        2013-10-10 
14:40:06 UTC (rev 30097)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c        2013-10-10 
14:41:41 UTC (rev 30098)
@@ -120,7 +120,7 @@
   {
     if (GNUNET_NAMESTORE_TYPE_PKEY != rd[i].record_type)
       continue;
-    if (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) != rd[i].data_size)
+    if (sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) != rd[i].data_size)
     {
       GNUNET_break_op (0);
       continue;
@@ -149,7 +149,7 @@
   gchar *mime_keyword;
   const char *nsid;
   struct GNUNET_FS_Uri *uri;
-  struct GNUNET_CRYPTO_EccPublicSignKey pub_sks_zone;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pub_sks_zone;
   struct SearchLookup *sl;
   char *emsg;
 
@@ -224,7 +224,7 @@
     sl->anonymity_level = anonymity_level;
     sl->timeout_task = GNUNET_SCHEDULER_add_delayed (LOOKUP_TIMEOUT,
                                                     &timeout_search_lookup, 
sl);
-    GNUNET_CRYPTO_ecc_key_get_public_for_signature (main_ctx->sks_zone,
+    GNUNET_CRYPTO_ecdsa_key_get_public (main_ctx->sks_zone,
                                      &pub_sks_zone);
     sl->gns = GNUNET_GNS_lookup (main_ctx->gns,
                                 nsid,
@@ -416,7 +416,7 @@
   /* show the window */
   gtk_window_present (GTK_WINDOW (lctx->progress_dialog));
   memset (&rd, 0, sizeof (rd));
-  rd.data_size = sizeof (struct GNUNET_CRYPTO_EccPublicSignKey);
+  rd.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
   rd.data = &lctx->pkey;
   rd.flags = GNUNET_NAMESTORE_RF_PRIVATE;
   rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
@@ -651,7 +651,7 @@
   struct GNUNET_GTK_MainWindowContext *main_ctx = user_data;
   GtkComboBox *widget;
   const gchar *text;
-  struct GNUNET_CRYPTO_EccPublicSignKey pkey;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
   int ret;
   struct PseuLookupContext *lctx;
   guint anonymity_level;
@@ -727,7 +727,7 @@
 {
   GtkButton *button;
   const gchar *text;
-  struct GNUNET_CRYPTO_EccPublicSignKey pkey;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
   int ret;
 
   text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))));

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2013-10-10 14:40:06 UTC 
(rev 30097)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2013-10-10 14:41:41 UTC 
(rev 30098)
@@ -2108,7 +2108,7 @@
                      void **client_info)
 {
   struct MainPublishingDialogContext *ctx = cls;
-  struct GNUNET_CRYPTO_EccPublicSignKey pub;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pub;
   struct GNUNET_FS_Uri *sks_uri;
   char *sks_uri_string;
 

Modified: gnunet-gtk/src/identity/gnunet-identity-gtk.c
===================================================================
--- gnunet-gtk/src/identity/gnunet-identity-gtk.c       2013-10-10 14:40:06 UTC 
(rev 30097)
+++ gnunet-gtk/src/identity/gnunet-identity-gtk.c       2013-10-10 14:41:41 UTC 
(rev 30098)
@@ -177,7 +177,7 @@
                    gpointer user_data)
 {
   struct AdvertisePopupContext *apc = user_data;
-  const struct GNUNET_CRYPTO_EccPrivateKey *priv;
+  const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv;
 
   priv = GNUNET_IDENTITY_ego_get_private_key (apc->ego);
   GIG_advertise_dialog_start_ (priv);
@@ -440,7 +440,7 @@
   GtkTreeRowReference *rr;
   GtkTreeIter iter;
   char *id;
-  struct GNUNET_CRYPTO_EccPublicSignKey pub;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pub;
 
   if (NULL == ego)
     return; /* nothing to be done */
@@ -450,7 +450,7 @@
     /* insert operation */
     GNUNET_assert (NULL != name);
     GNUNET_IDENTITY_ego_get_public_key (ego, &pub);
-    id = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pub);
+    id = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pub);
     gtk_list_store_insert_with_values (ls,
                                       &iter, G_MAXINT,
                                       IDENTITY_MC_NAME, name,

Modified: gnunet-gtk/src/identity/gnunet-identity-gtk_advertise.c
===================================================================
--- gnunet-gtk/src/identity/gnunet-identity-gtk_advertise.c     2013-10-10 
14:40:06 UTC (rev 30097)
+++ gnunet-gtk/src/identity/gnunet-identity-gtk_advertise.c     2013-10-10 
14:41:41 UTC (rev 30098)
@@ -119,7 +119,7 @@
   /**
    * Private key of the namespace we will be advertising.
    */
-  struct GNUNET_CRYPTO_EccPrivateKey priv;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey priv;
 
   /**
    * Main dialog object.
@@ -285,7 +285,7 @@
   gchar *value;
   GtkTreeIter iter;
   struct GNUNET_FS_BlockOptions bo;
-  struct GNUNET_CRYPTO_EccPublicSignKey pk;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pk;
   struct PublishContext *pc;
   guint anonymity;
   const char *id;
@@ -356,7 +356,7 @@
      (gtk_builder_get_object
       (ac->builder,
        "GNUNET_GTK_identity_advertise_replication_spin_button")));
-  GNUNET_CRYPTO_ecc_key_get_public_for_signature (&ac->priv,
+  GNUNET_CRYPTO_ecdsa_key_get_public (&ac->priv,
                                    &pk);
   id = gtk_entry_get_text
     (GTK_ENTRY
@@ -631,7 +631,7 @@
  * @param priv private key of the namespace to advertise
  */
 void
-GIG_advertise_dialog_start_ (const struct GNUNET_CRYPTO_EccPrivateKey *priv)
+GIG_advertise_dialog_start_ (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv)
 {
   struct AdvertiseContext *ac;
   gint i;

Modified: gnunet-gtk/src/identity/gnunet-identity-gtk_advertise.h
===================================================================
--- gnunet-gtk/src/identity/gnunet-identity-gtk_advertise.h     2013-10-10 
14:40:06 UTC (rev 30097)
+++ gnunet-gtk/src/identity/gnunet-identity-gtk_advertise.h     2013-10-10 
14:41:41 UTC (rev 30098)
@@ -43,7 +43,7 @@
  * @param priv private key of the namespace to advertise
  */
 void
-GIG_advertise_dialog_start_ (const struct GNUNET_CRYPTO_EccPrivateKey *priv);
+GIG_advertise_dialog_start_ (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv);
 
 #endif
 /* GNUNET_FS_GTK_NAMESPACE_MANAGER_H */

Modified: gnunet-gtk/src/namestore/gnunet-namestore-gtk.c
===================================================================
--- gnunet-gtk/src/namestore/gnunet-namestore-gtk.c     2013-10-10 14:40:06 UTC 
(rev 30097)
+++ gnunet-gtk/src/namestore/gnunet-namestore-gtk.c     2013-10-10 14:41:41 UTC 
(rev 30098)
@@ -234,7 +234,7 @@
   /**
    * Private key of target zone.
    */
-  struct GNUNET_CRYPTO_EccPrivateKey pk;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey pk;
 
   /**
    * Data to free.
@@ -340,12 +340,12 @@
 /**
  * Private key of the zone we are currently editing.
  */
-static struct GNUNET_CRYPTO_EccPrivateKey *pkey;
+static struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey;
 
 /**
  * Public key of the zone we are currently editing.
  */
-static struct GNUNET_CRYPTO_EccPublicSignKey pubkey;
+static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
 
 /**
  * Pseudonym of the current zone we are editing.
@@ -848,14 +848,14 @@
                         const struct GNUNET_NAMESTORE_Block *block)
 {
   struct MoveOperationContext *moc = cls;
-  struct GNUNET_CRYPTO_EccPublicSignKey pubkey;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
 
   if (NULL == block)
   {
     merge_with_existing_records (moc, 0, NULL);
     return;
   }
-  GNUNET_CRYPTO_ecc_key_get_public_for_signature (&moc->pk,
+  GNUNET_CRYPTO_ecdsa_key_get_public (&moc->pk,
                                                   &pubkey);
   if (GNUNET_OK !=
       GNUNET_NAMESTORE_block_decrypt (block,
@@ -991,7 +991,7 @@
     }
     else
     {
-      const struct GNUNET_CRYPTO_EccPrivateKey *pk;
+      const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk;
       struct MoveOperationContext *moc;
       struct GNUNET_HashCode query;
 
@@ -1732,7 +1732,7 @@
  */
 static void
 zone_iteration_proc (void *cls,
-                    const struct GNUNET_CRYPTO_EccPrivateKey *zone_key,
+                    const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
                     const char *name,
                     unsigned int rd_count,
                     const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -1955,9 +1955,9 @@
     return;
   }
   current_zone_option = GNUNET_strdup (name);
-  pkey = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey);
+  pkey = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
   *pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
-  GNUNET_CRYPTO_ecc_key_get_public_for_signature (pkey, &pubkey);
+  GNUNET_CRYPTO_ecdsa_key_get_public (pkey, &pubkey);
   label = g_markup_printf_escaped (_("<b>Editing zone %s</b>"),
                                   GNUNET_NAMESTORE_z2s (&pubkey));
   gtk_label_set_markup (GTK_LABEL (get_object 
("gnunet_namestore_gtk_zone_label")),

Modified: gnunet-gtk/src/namestore/gnunet-namestore-gtk_edit.c
===================================================================
--- gnunet-gtk/src/namestore/gnunet-namestore-gtk_edit.c        2013-10-10 
14:40:06 UTC (rev 30097)
+++ gnunet-gtk/src/namestore/gnunet-namestore-gtk_edit.c        2013-10-10 
14:41:41 UTC (rev 30098)
@@ -1118,14 +1118,14 @@
 {
   GtkEditable *entry;
   const gchar *preedit;
-  struct GNUNET_CRYPTO_EccPublicSignKey pub;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pub;
 
   entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
                                                
"edit_dialog_phone_peer_entry")),
   preedit = gtk_editable_get_chars (entry, 0, -1);
   if ( (NULL == preedit) ||
        (GNUNET_OK !=
-       GNUNET_CRYPTO_ecc_public_sign_key_from_string (preedit,
+       GNUNET_CRYPTO_ecdsa_public_key_from_string (preedit,
                                                        strlen (preedit),
                                                        &pub)) )
   {
@@ -1261,14 +1261,14 @@
 {
   GtkEditable *entry;
   const gchar *preedit;
-  struct GNUNET_CRYPTO_EccPublicSignKey pub;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pub;
 
   entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
                                                "edit_dialog_pkey_entry")),
   preedit = gtk_editable_get_chars (entry, 0, -1);
   if ( (NULL == preedit) ||
        (GNUNET_OK !=
-       GNUNET_CRYPTO_ecc_public_sign_key_from_string (preedit,
+       GNUNET_CRYPTO_ecdsa_public_key_from_string (preedit,
                                                  strlen (preedit),
                                                  &pub)) )
   {




reply via email to

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