Hi!
I've committed the following bits and pieces regarding authentication:
1) libosmocore now has a generic core for authentication algorithm implementations. Using this API, even external plugins can register algorithms which are not available in libosmocore itself.
libosmocore includes COMP128v1 and (now) MILENAGE
2) a small command-line program "osmo-auc-gen", which can be used to generate authentication vectors from the command line. You hav to specify all the required parameters. For GSM, this is only ki, but for 3G, you also have to specify at least OPC and SQN.
osmo-auc-gen is part of libosmocore.git
3) a small pythong script called "osmo-sim-auth.py", available from a new git repository (http://cgit.osmocom.org/cgit/osmo-sim-auth, git://git.osmocom.org/osmo-sim-auth)
It is the counterpart for the MS side. It can execute authentication on both SIM and USIM.
I've tested the tools with a COMP128v1 SIM and a MILENAGE USIM, it seems to be working fine.
Regards, Harald
On 12/07/2011 02:47 AM, Harald Welte wrote:
Hi!
I've committed the following bits and pieces regarding authentication:
- libosmocore now has a generic core for authentication algorithm implementations. Using this API, even external plugins can register algorithms which are not available in libosmocore itself.
 
Morning,
this broke the build on GCC 4.2.2 (FreeBSD) and GCC 4.4.5 (Debian Stable). Both compiler versions do not like to initialize an anonymous union with .umts = {}. I propose to give the the union a name.
holger
Hi,
- libosmocore now has a generic core for authentication algorithm
 implementations. Using this API, even external plugins can register algorithms which are not available in libosmocore itself.
libosmocore includes COMP128v1 and (now) MILENAGE
Nice !
- a small pythong script called "osmo-sim-auth.py", available from a
 new git repository (http://cgit.osmocom.org/cgit/osmo-sim-auth, git://git.osmocom.org/osmo-sim-auth)
It is the counterpart for the MS side. It can execute authentication on both SIM and USIM.
Do you really use all the card stuff you imported for something ?
I actually would have tought basing it on the sim abstraction layer of pysim would have been simpler and would support cheap serial adapters as well and not just pcsc ones. The api already has a run_gsm algo and so only adding the umts one and a command line tool to call it would have been needed.
Cheers,
Sylvain
Hi Sylvain,
On Wed, Dec 07, 2011 at 10:10:13AM +0100, Sylvain Munaut wrote:
- a small pythong script called "osmo-sim-auth.py", available from a
 new git repository (http://cgit.osmocom.org/cgit/osmo-sim-auth, git://git.osmocom.org/osmo-sim-auth)
It is the counterpart for the MS side. It can execute authentication on both SIM and USIM.
Do you really use all the card stuff you imported for something ?
I actually would have tought basing it on the sim abstraction layer of pysim would have been simpler and would support cheap serial adapters as well and not just pcsc ones. The api already has a run_gsm algo and so only adding the umts one and a command line tool to call it would have been needed.
I thoguht it was easier for me to go the other way. No doubt integration with pysim would have been cleaner. The problem is that there are too many tools. For most of my manual/interactive work with SIM cards and other smart cards I use cyberflex-shell from git://github.com/henryk/cyberflex-shell.git which allows you to enter raw APDUs on a command line and have modules for various card types that implement card-specific features. So the 'cleanest' implementation would probably have been to merge all of them, but that requires time...
Regards, Harald