If you need some example pcap traces generated by any of these tools, just send an email to fasferraz@gmail.com


5/4/11

UMTS Security Algorithm – Milenage

I’ve done this application in 2004, in the beginning of the UMTS rollout.
In this application I’ve implemented the MILENAGE algorithm defined in 3GPP 35.206, that is one example of the AKA algorithm that runs in the HLR and in the USIM as specified in 3GPP 33.102: 

Generation of authentication vectors in HLR:
 


User authentication function in the USIM:


Construction of the parameter AUTS:


The MILENAGE algorithm framework is the following:


With this application every parameter used in the MILENAGE algorithm can be changed, and the corresponding f1 to f5 functions generated.
I’ve added also the conversion functions for inter-operation and handover between UMTS and GSM defined in 3GPP 33.102.


I’ve tested it successfully using the “Implementers’ Test Data” examples provided in 3GPP 35.207, and also with real examples.
This application can be used to detect erroneous behaviors of the ME, USIM or Network Elements (HLR, SGSN and RNC) in terms of security procedures.

This application can be downloaded for free. You can get it here
Note: This installation includes a test file (teste.dat that can be found inside the installation directory).

12 comments:

  1. Caro Fabricio
    Obrigado por a sua informação desponibilizada mas diga me o algoritimo A3A8 implementado no sistema Comp128 v2 v3 vai ser alterado? Ou já se encontra implementado nas novas SIM Card?
    Agradecido por alguma informação
    J.Fonseca
    joanfonseka@gmail.com
    PT

    ReplyDelete
  2. Really very helpful tool for testing keys calculation.... thanks Fabricio Ferraz

    ReplyDelete
  3. Its really helpfull tool..Great work Fabricio Ferraz.. Thanks allot

    ReplyDelete
  4. If AUTS too included in the tool. it helps for Re-synchronization case

    ReplyDelete
  5. I'm working on D2D in LTE , i need to execute AKA for my simulation in matlab. could you please explain the procedure to link it with matlab?

    ReplyDelete
  6. Hi Fabrício,
    Can you help me how to generate the Sequence no. for UMTS-Milenage for each Authentication request SQN (SEQ,IND).
    How SEQ and IND coming into picture and used to generate the SQN.

    Thanks

    ReplyDelete
  7. There are different methods to generate SQN. please check Annex C of 33.102 (https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=2262)

    ReplyDelete
  8. Thanks works like charm, good work Fabrico.
    Best Reagards

    ReplyDelete
  9. Hello Fabricio,
    I just stumbled to your page and it's great what you posted here!

    however I have a question,
    How can you calculate SEQ & ID for f5 &f5*?
    I couldn't find the reference anywhere..

    ReplyDelete
    Replies
    1. SQN is a 48 bits variable, that can be decomposed in two parts: SQN = SEQ || IND. For all the profiles referred in annex C of 33.102, IND is 5 bits , so you can decompose the SQN in IND with: IND = SQN mod 32. And SEQ = SQN div 32.

      Delete
    2. I see, thanks for the info :)

      Additionally, about AUTS.. when this AUTS returned by the UICC actually?
      How to make the AUTS returned instead of RES, and Kc value?

      Delete
  10. Hi Fabricio

    What is the correct formatting of the dat file? I would like to calculate OPc from Ki and OP

    ReplyDelete