[hipl-commit] [trunk] Rev 3654: Started doxygen for lib/tool/crypto.c

  • From: Miika Komu <miika@xxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Tue, 16 Feb 2010 23:21:38 +0200

Committer: Miika Komu <miika@xxxxxx>
Date: Tue Feb 16 23:21:36 2010 +0200
Revision: 3654
Revision-id: miika@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Started doxygen for lib/tool/crypto.c

Modified:
  M  lib/tool/crypto.c

=== modified file 'lib/tool/crypto.c'
--- lib/tool/crypto.c   2010-02-11 09:57:04 +0000
+++ lib/tool/crypto.c   2010-02-16 21:21:36 +0000
@@ -1,32 +1,33 @@
-/*
- * HIP userspace crypto functions.
- *
- * HIP userspace crypto functions (for OpenSSL). Code is a combination
- * of original HIPL kernel functions and Boeing HIPD crypto functions.
- *
- * Authors:
- * - Mika Kousa <mkousa@xxxxxx>
- * - Miika Komu <miika@xxxxxx>
- * - Teemu Koponen <tkoponen@xxxxxx>
- * - Abhinav Pathak <abpathak@xxxxxxxxxx>
- *
- * Licence: GNU/GPL
- *
- * TODO:
- * - Intergrate ERR_print_errors_fp somehow into HIP_INFO().
- * - No printfs! Daemon has no stderr.
- * - Return values should be from <errno.h>.
- * - Clean up the code!
- * - Use goto err_out, not return 1.
- * - Check that DH key is created exactly as stated in Jokela draft
- *   RFC2412?
- * - Create a function for calculating HIT from DER encoded DSA pubkey
- * - can alloc_and_extract_bin_XX_pubkey() be merged into one function
- * - more consistency in return values: all functions should always return
- *   _negative_, _symbolic_ values (with the exception of zero)
- *
- * BUGS:
- * - "Bad signature r or s size" occurs randomly. This should not happen.
+/**
+ * @file lib/tool/crypto.c
+ *
+ * Distributed under <a href="http://www.gnu.org/licenses/gpl2.txt";>GNU/GPL</a>
+ *
+ * HIP crypto management functions using OpenSSL.  Includes
+ * Diffie-Hellman groups and shared key generation, DSA/RSA key
+ * creation and disk storage, signing, verifying and HMAC creation.
+ *
+ * One function has been borrowed from OpenHIP (BN_bin2bn)
+ *
+ * @brief HIP crypto management functions using OpenSSL
+ *
+ * @author Mika Kousa <mkousa@xxxxxx>
+ * @author Miika Komu <miika@xxxxxx>
+ * @author Teemu Koponen <tkoponen@xxxxxx>
+ * @author Abhinav Pathak <abpathak@xxxxxxxxxx>
+ *
+ * @todo Intergrate ERR_print_errors_fp somehow into HIP_INFO().
+ * @todo No printfs! Daemon has no stderr.
+ * @todo Return values should be from <errno.h>.
+ * @todo Clean up the code!
+ * @todo Use goto err_out, not return 1.
+ * @todo Check that DH key is created exactly as stated in Jokela draft
+ *       RFC2412?
+ * @todo Create a function for calculating HIT from DER encoded DSA pubkey
+ * @todo can alloc_and_extract_bin_XX_pubkey() be merged into one function
+ * @todo more consistency in return values: all functions should always return
+ *       _negative_, _symbolic_ values (with the exception of zero)
+ * @todo "Bad signature r or s size" occurs randomly. This should not happen.
  */
 
 /* required for s6_addr32 */
@@ -441,12 +442,12 @@
     return err;
 }
 
-/*
- * function bn2bin_safe(BIGNUM *dest)
- *
+/**
  * BN_bin2bn() chops off the leading zero(es) of the BIGNUM,
- * so numbers end up being left shifted.
- * This fixes that by enforcing an expected destination length.
+ * so that numbers end up being left shifted. This fixes that by
+ * enforcing an expected destination length
+ *
+ * @note This function is originally from OpenHIP
  */
 int bn2bin_safe(const BIGNUM *a, unsigned char *to, int len)
 {

Other related posts:

  • » [hipl-commit] [trunk] Rev 3654: Started doxygen for lib/tool/crypto.c - Miika Komu