Programming SIM card RAND?

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Dieter Spaar spaar at mirider.augusta.de
Mon Nov 12 12:39:13 UTC 2012


Hello Andrew,

On Mon, 12 Nov 2012 10:25:19 +0000, "Andrew Back" <andrew at carrierdetect.com> wrote:
> 
> I'm trying to get some MS test equipment working and have programmed a
> SIM with pysim-prog.py, but the tester has a configuration field for
> RAND and I cannot see how to set this on the SIM. In fact this has
> confused me as I thought the network always supplied this...

Most certainly the RAND value of your MS tester is the value which
is sent during authentication. All MS testers I have seen so far
allow to configure this value, either use random data or set it
to a fixed value.

> I have the IMSI, Ki, MCC and MNC set the same on the tester and SIM,
> but tests don't get very far and fail with "incorrect SRES".

I would expect that you need a SIM card which supports XOR for
A3/A8. This algorithm is the only one I have seen on nearly all
MS tests sets I have access to. Those test sets usually don't
support COMP128 and its variants (I guess your SIM card only supports
this algorithm), so you need a SIM card which uses the same algorithm 
as the MS test set.

However if you can set a fixed RAND value on the MS test set you can
check what your SIM card will return with this RAND and set Kc and
SRES on the test set to those values.

Best regards,
  Dieter
-- 
Dieter Spaar, Germany                           spaar at mirider.augusta.de




More information about the baseband-devel mailing list