diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-06-12 21:44:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-06-12 21:55:54 +0000 |
commit | 96e2a00d7a9044d0b1a83909c11d8f24955bc7c8 (patch) | |
tree | 4bbe6cb49a766df4cdefa9fffd56bb953d51da75 /src/gsm/comp128.c | |
parent | 7165880ac279a9d2d7403749f171eb9c60e70657 (diff) |
update/extend doxygen documentation
It's a pity that even with this patch we still are fare away from having
the whole API documented. However, at least we have a more solid
foundation. Updates not only extend the documentation, but also make
sure it is rendered properly in the doxygen HTML.
Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
Diffstat (limited to 'src/gsm/comp128.c')
-rw-r--r-- | src/gsm/comp128.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gsm/comp128.c b/src/gsm/comp128.c index abb49179..cb3a3092 100644 --- a/src/gsm/comp128.c +++ b/src/gsm/comp128.c @@ -68,6 +68,14 @@ #include <string.h> #include <stdint.h> +/*! \addtogroup auth + * @{ + */ + +/*! \file comp128.c + * \brief COMP128 v1; common/old GSM Authentication Algorithm (A3/A8) + */ + /* The compression tables (just copied ...) */ static const uint8_t table_0[512] = { 102, 177, 186, 162, 2, 156, 112, 75, 55, 25, 8, 12, 251, 193, 246, 188, @@ -184,6 +192,11 @@ _comp128_permutation(uint8_t *x, uint8_t *bits) x[(i>>3)+16] |= bits[(i*17) & 127] << (7-(i&7)); } +/*! \brief Perform COMP128v1 algorithm + * \param[in] ki Secret Key K(i) of subscriber + * \param[in] rand Random Challenge + * \param[out] sres user-supplied buffer for storing computed SRES value + * \param[out] kc user-supplied buffer for storing computed Kc value */ void comp128v1(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc) { @@ -228,8 +241,16 @@ comp128v1(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc) kc[7] = 0; } + +/*! \brief Perform COMP128v1 algorithm + * \param[in] ki Secret Key K(i) of subscriber + * \param[in] rand Random Challenge + * \param[out] sres user-supplied buffer for storing computed SRES value + * \param[out] kc user-supplied buffer for storing computed Kc value */ void comp128(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc) { comp128v1(ki, rand, sres, kc); } + +/*! @} */ |