Committer: Miika Komu <miika@xxxxxx> Date: 17/03/2010 at 00:44:48 Revision: 3978 Revision-id: miika@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: Doxygen for dh.c Modified: D hipd/dh.c.doxyme M hipd/dh.c === modified file 'hipd/dh.c' --- hipd/dh.c 2010-03-05 08:47:53 +0000 +++ hipd/dh.c 2010-03-16 22:44:46 +0000 @@ -1,12 +1,13 @@ -/* - * HIPL security related functions - * - * Licence: GNU/GPL - * - * Authors: - * - Mika Kousa <mkousa@xxxxxx> - * - Kristian Slavov <ksl@xxxxxx> - * - Tobias Heer <heer@xxxxxxxxxx> +/** + * @file + * + * Distributed under <a href="http://www.gnu.org/licenses/gpl2.txt";>GNU/GPL</a> + * + * @brief Diffie-Hellman wrappers for HIP + * + * @author Mika Kousa <mkousa@xxxxxx> + * @author Kristian Slavov <ksl@xxxxxx> + * @author Tobias Heer <heer@xxxxxxxxxx> */ /* required for s6_addr32 */ @@ -19,7 +20,7 @@ static void hip_regen_dh_keys(uint32_t bitmask); /** - * hip_insert_dh - Insert the current DH-key into the buffer + * insert the current DH-key into the buffer * * If a DH-key does not exist, we will create one. * @return >0 if ok, -1 if errors @@ -62,9 +63,9 @@ } /** - * hip_calculate_shared_secret - Creates a shared secret based on the - * public key of the peer (passed as an argument) and own DH private key - * (created beforehand). + * create a shared secret based on the public key of the peer + * (passed as an argument) and own DH private key (created beforehand). + * * @param public_value Peer's Diffie-Hellman public key * @param group_id the Diffie-Hellman group ID * @param len the length of the public value @@ -113,10 +114,10 @@ } /** - * hip_regen_dh_keys - Regenerate Diffie-Hellman keys for HIP + * regenerate Diffie-Hellman keys for HIP * @param bitmask Mask of groups to generate. * - * Use only this function to generate DH keys. + * @note Use only this function to generate DH keys. */ static void hip_regen_dh_keys(uint32_t bitmask) { @@ -149,6 +150,9 @@ HIP_DEBUG("%d keys generated\n", cnt); } +/** + * uninitialize precreated DH structures + */ void hip_dh_uninit(void) { int i; @@ -160,6 +164,9 @@ } } +/** + * initialize D-H cipher structures + */ int hip_init_cipher(void) { uint32_t supported_groups;