}
-/**
- * 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.
* 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
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);