Authentication is a Major function of HSS/AuC. AIR/AIA is an important and first message on s6a/s6d interface that has been exchange between MME/SGSN and HSS during very first attach procedure. Here MME/SGSN asks for authentication credentials from HSS usually called as Authentication Vectors to authenticate and authorize the subscriber.
As we know MME uses EPS authentication vectors and SGSN can ask for UMTS or GERAN authentication vectors. while combined MME/SGSN can ask for all kind of authentication vectors in a single request. MME/SGSN shall tell the number of authentication vector it needs, generally between 1-5, if this information is missing then HSS shall send one authentication vector to MME.
AVP structure used by MME to ask for EPS vectors
Requested- EUTRAN-Authentication-Info ::= <AVP header:10415 >
[ Number-Of-Requested-Vectors]
[ Immediate-Response-Preferred ]
[ Re-synchronization-Info ]
AVP structure used by SGSN to ask for UTRAN/GERAN vectors
Requested-UTRAN-GERAN-Authentication-Info ::= <AVP header: 10415>
[ Number-Of-Requested-Vectors]
[ Immediate-Response-Preferred ]
[ Re-synchronization-Info ]
Combined MME/SGSN can use "Immediate-Response-Preferred" AVP to tell HSS which Authentication Vector it wants on urgent basis; then other type of vector could be sent in same response but they are optional. For example: Combined node sends "Immediate-Response-Preferred" in Requested- EUTRAN-Authentication-Info AVP then HSS must send EUTRAN authentication vectors; HSS may send GERAN/UTRAN vector but they are optional; it totally depends on HSS whether it want to send them or not; because it will not be immediately consumed by combined node.
Generally a time-period on MME/SGSN end for which if more than one vector are downloaded at MME/SGSN are treated as fresh; After that time is elapsed the vectors are treated as stale and shall be deleted by MME from its end.
MME/SGSN can send "Re-synchronization-Info" if sequence number mis-match at UE end and shall be discussed whole scenario in following article.
Re-synchronization Failure
HSS generates responses after processing request and shall send AIA
GERAN Vector are generated by HSS as discussed in Article
HSS sends GERAN vector in following AVP
GERAN-Vector ::= <AVP header: 1416 10415>
[ Item-Number ]
{ RAND }
{ SRES }
{ Kc }
UTRAN Vector are generated by HSS as discussed in Article
[UMTS - 3G] UTRAN Authentication Procedure
HSS sends UTRAN vector in following AVP
UTRAN-Vector ::= <AVP header: 1415 10415>
[ Item-Number ]
{ RAND }
{ XRES }
{ AUTN }
{ Confidentiality-Key }
{ Integrity-Key }
EUTRAN Vector are generated by HSS as discussed in Article
HSS sends EUTRAN vector in following AVP
E-UTRAN-Vector ::= <AVP header: 1414 10415>
[ Item-Number ]
{ RAND }
{ XRES }
{ AUTN }
{ KASME }
Usage of OP/OPc and Transport Key in authentication procedure is explained in following article
Your Comments /Suggestions and Questions are always welcome, shall clarify with best of our knowledge. So feel free to put Questions.