aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm/auth_core.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-20Use define for key buffersMax1-2/+2
Add corresponding spec. references and comments where appropriate. Change-Id: If5e2aad86eaecd8eada667b3488ba415d81c6312
2017-12-18add osmo_auth_c3() (separate from gsm_milenage())Neels Hofmeyr1-0/+13
To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES. For SRES, it requires an OPC, which may need to be derived from OP first. All we need is a Kc, so we could feed a zero OPC ... but to simplify the function call for cases where just a Kc is required, separate the c3 function out from gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover exactly that implementation). Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc) Related: OS#2745 Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa
2017-12-04Fix embedded buildMax1-0/+6
Do not attempt to load auth plugins - this does not make sense on embedded target anyway. Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0
2017-11-13Fix/Update copyright notices; Add SPDX annotationHarald Welte1-0/+2
Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
2017-10-09auth: add value_strings for osmo_sub_auth_type, comment on osmo_auth_alg_name()Neels Hofmeyr1-0/+7
Add osmo_sub_auth_type_names[] and osmo_sub_auth_type_name(). Also add a hint to enum osmo_auth_algo's API doc that osmo_auth_alg_name() already exists (it is defined further below). Change-Id: I652a929bcd11c694d86812fb03d0a1cbd985efda
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr1-5/+2
Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-06-23doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr1-9/+9
Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
2017-06-12update/extend doxygen documentationHarald Welte1-2/+2
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
2017-04-23fix spelling in API docu, command reply, logging, descriptionsThorsten Alteholz1-1/+1
sections: ctrl, gb, gsm, vty Change-Id: Iac211b5cd8504da36b699777b95a2448dd7c3e70
2017-02-22fix osmo_auth_gen_vec_auts: copy rand to auth vectorNeels Hofmeyr1-1/+8
Related: OS#1593 Change-Id: If943731a78089f0aac3d55245de80596d01314a4
2017-02-06osmo_auth*: fix ordering of function argsNeels Hofmeyr1-3/+3
milenage_gen_vec() has parameter ordering of (..., auts, rand_auts, rand). osmo_auth_gen_vec_auts() has (..., rand_auts, auts, rand), but actually feeds args in the same order, so that its rand_auts becomes auts, and its auts becomes rand_auts. Interestingly enough, API user osmo-gen-vec.c also adheres to this misordering and in turn passes auts for osmo_auth_gen_vec_auts()'s rand_auts and vice versa, so that it matches milenage_gen_vec(). So both the implementation (milenage_*) and the API user use the same ordering, just osmo_auth_gen_vec_auts() and osmo_auth_impl{ .gen_vec_auts() } in-between have the argument names swapped. Any current user of this API would need to adhere to this swapping or will not get successful AUTS resolution to a SQN. So the least impact fix is to rename the args without any actual functional change. So swap the names rand_auts and auts for osmo_auth_gen_vec_auts() and osmo_auth_impl{ .gen_vec_auts() }. (Also adjust API doc ordering) Change-Id: I0dcbd49759fc32d3b8974102dbd1d6703364ebf4
2016-06-29Make C4 function globally availableMax1-2/+2
This function perform 64 -> 128 bit key expansion which useful for converting between UMTS CK and GSM Kc, A5/3 and A5/4, GEA3 and GEA4 keys. Change-Id: I5a6c6deef6027cd6af144c9062d4c9166be26904 Related: OS#1582
2016-05-10api doc: auth_core.c: add \returns, cosmeticNeels Hofmeyr1-2/+9
Add various missing \returns doxygen entries. In osmo_auth_3g_from_2g(), also adjust two comment-closing instances to match common style and add a period to end a sentence. (The recent addition of osmo_auth_3g_from_2g() raised my attention, and I added more return value docs while at it.) Change-Id: Iea71eb666bc061acb6b14215f398bd38d17b3ad3 Reviewed-on: https://gerrit.osmocom.org/33 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-05auth_core: Add osmo_auth_3g_from_2g() to compute CK+IK from KcHarald Welte1-0/+41
This function performs the C5+C4 conversion to derive UMTS key material from a 2G-only subscriber.
2013-02-15misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi1-2/+2
Doxygen generates quite a lot of warnings on libosmocore. Some of them are obvious typos - this patch aims to fix such low-hanging fruit.
2012-07-18authentication: More documentationHarald Welte1-3/+54
2012-04-04libosmogsm: Introduce explicit list of exported symbolsHarald Welte1-1/+1
There is now a "libosmogsm.map" file containing an explicit list of to-be-exported symbols. This should prevent us from leaking non-static symbols into the global namespace. A similar scheme should be adopted by all other osmocom libraries
2011-12-07auth_core: add missing string.h include to reduce warningsHarald Welte1-0/+1
2011-12-07auth_core: Make sure we always save the RAND in the vectorHarald Welte1-1/+8
2011-12-07auth_core: add functions for parsing algorithm namesHarald Welte1-0/+20
2011-12-06Auth: Import milenage implementation from hostap (Jouni Malinen)Harald Welte1-2/+2
... and add integration into the osmo_auth core.
2011-12-06Add a generic abstraction for GSM/3G authentication algorithmsHarald Welte1-0/+93
Indiidual algorithms can be implemented as plugins. libosmogsm itself only provides COMP128v1 via this generic interface.