Hi guys,
i'm trying to interconnect a WLAN router with my GSM-sysmoBTS and to use the EAP-SIM authentication protocol. For that i installed a Freeradius on an external board that i use as radius server. The Freeradius should use a database file in order to realise the authentication and the idea is that Freeradius should be able to read the hlr.sqlite3 file from my sysmoBTS. I'm not so far to do this part of the work so, i first want to do some tests using the sim card from sysmoBTS (imsi und ki) and the triplets (RAND, Kc and SRES). I want to create a flat file containing this values so the Freeradius will directly use the file to get the triplets.
I thought i could get the triplets stored in one of the tables of hlr.sqlite3 (AuthLastTuples) but there is no information on it. From the table AuthKeys i could find some Ki values (e.g X'019B7083FBAFC928421A147DE795217782'). I found that there is an "osmo-auc-gen" program for computing the triplets. By using the Ki from AuthKeys and a self generated RAND (e.g 0123456789ABCDEF0123456789ABCDEF) the program doesn't run and doesn't give the triplets. The used authentication algorithm is the COMP128v1.
Has anyone an idea why it doesn't work and why there is no information in the AuthLastTuples table from sysmoBTS ?
best regards
Yann
On Wed, Oct 31, 2012 at 04:43:51PM +0100, Yann R. Moupinda wrote:
I thought i could get the triplets stored in one of the tables of hlr.sqlite3 (AuthLastTuples) but there is no information on it. From the table AuthKeys i could find some Ki values (e.g X'019B7083FBAFC928421A147DE795217782'). I found that there is an "osmo-auc-gen" program for computing the triplets. By using the Ki from AuthKeys and a self generated RAND (e.g 0123456789ABCDEF0123456789ABCDEF) the program doesn't run and doesn't give the triplets. The used authentication algorithm is the COMP128v1.
What is the error you get? The Ki you present is 17 bytes but it must be 16 bytes.
$ ./osmo-auc-gen -2 -a COMP128v1 -k 12345678901234561234567890123456
holger
On Thu, Nov 01, 2012 at 10:01:39AM +0100, Holger Hans Peter Freyther wrote:
On Wed, Oct 31, 2012 at 04:43:51PM +0100, Yann R. Moupinda wrote: What is the error you get? The Ki you present is 17 bytes but it must be 16 bytes.
I assume you copied the keys out of the sqlite3 database. OsmoNITB is using 'DBI' (a database abstraction library) to access the database and they encode BLOBs. You will need to use the _dbd_decode_binary[1] routine to turn this data into your Ki.
holger
[1] http://libdbi.sourceforge.net/docs/driver-guide/helperfuncs.html#INTERNAL-DB...