-fix time assertion introduce in last patch
[oweals/gnunet.git] / src / util / crypto_ecc.c
index 71b8470fefd0818fcff36d3cedff8424e144588f..23d6ade7e5d0efeb42f37fb2acc215a9e72871c4 100644 (file)
@@ -111,27 +111,6 @@ key_from_sexp (gcry_mpi_t * array, gcry_sexp_t sexp, const char *topname,
 }
 
 
-/**
- * If target != size, move @a target bytes to the end of the size-sized
- * buffer and zero out the first @a target - @a size bytes.
- *
- * @param buf original buffer
- * @param size number of bytes in @a buf
- * @param target target size of the buffer
- */
-static void
-adjust (unsigned char *buf,
-       size_t size,
-       size_t target)
-{
-  if (size < target)
-  {
-    memmove (&buf[target - size], buf, size);
-    memset (buf, 0, target - size);
-  }
-}
-
-
 /**
  * Convert the given private key from the network format to the
  * S-expression that can be used by libgcrypt.
@@ -1473,7 +1452,7 @@ GNUNET_CRYPTO_ecdsa_private_key_derive (const struct GNUNET_CRYPTO_EcdsaPrivateK
  * Essentially calculates a public key 'V = H(l,P) * P'.
  *
  * @param pub original public key
- * @param label label to use for key deriviation
+ * @param label label to use for key derivation
  * @param context additional context to use for HKDF of 'h';
  *        typically the name of the subsystem/application
  * @param result where to write the derived public key
@@ -1504,7 +1483,7 @@ GNUNET_CRYPTO_ecdsa_public_key_derive (const struct GNUNET_CRYPTO_EcdsaPublicKey
   q = gcry_mpi_ec_get_point ("q", ctx, 0);
   GNUNET_assert (q);
 
-  /* calulcate h_mod_n = h % n */
+  /* calculate h_mod_n = h % n */
   h = derive_h (pub, label, context);
   n = gcry_mpi_ec_get_mpi ("n", ctx, 1);
   h_mod_n = gcry_mpi_new (256);