鉴权加密流程.docx

上传人:b****7 文档编号:11277435 上传时间:2023-02-26 格式:DOCX 页数:13 大小:93.86KB
下载 相关 举报
鉴权加密流程.docx_第1页
第1页 / 共13页
鉴权加密流程.docx_第2页
第2页 / 共13页
鉴权加密流程.docx_第3页
第3页 / 共13页
鉴权加密流程.docx_第4页
第4页 / 共13页
鉴权加密流程.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

鉴权加密流程.docx

《鉴权加密流程.docx》由会员分享,可在线阅读,更多相关《鉴权加密流程.docx(13页珍藏版)》请在冰豆网上搜索。

鉴权加密流程.docx

鉴权加密流程

33102

分组域和电路域的鉴权加密流程是互相独立的。

目前SGSN实现的时候,可以实现两种处理:

1、是否鉴权;2、隔多少次鉴权一次。

可以配置间隔的次数。

对于加密来说,每次搭建Iu连接,就需要进行加密的重新协商。

哪怕是由于进行业务引起的Iu连接建立。

但是此时只是重新协商一致性校验的相关参数和加密算法,密钥CK和IK是不会变的(因为密钥的产生是在鉴权流程中根据RAND产生的,所以只有鉴权之后,才会产生新的密钥)。

3G是不能重用鉴权参数(5元组)的。

因为AUTN中有跟时间同步相关的参数,所以无法重用。

a.鉴权流程

Figure5:

Authenticationandkeyagreement

UponreceiptofarequestfromtheVLR/SGSN,theHE/AuCsendsanorderedarrayofnauthenticationvectors(theequivalentofaGSM"triplet")totheVLR/SGSN.Theauthenticationvectorsareorderedbasedonsequencenumber.Eachauthenticationvectorconsistsofthefollowingcomponents:

arandomnumberRAND,anexpectedresponseXRES,acipherkeyCK,anintegritykeyIKandanauthenticationtokenAUTN.EachauthenticationvectorisgoodforoneauthenticationandkeyagreementbetweentheVLR/SGSNandtheUSIM.

WhentheVLR/SGSNinitiatesanauthenticationandkeyagreement,itselectsthenextauthenticationvectorfromtheorderedarrayandsendstheparametersRANDandAUTNtotheuser.Authenticationvectorsinaparticularnodeareusedonafirst-in/first-outbasis.TheUSIMcheckswhetherAUTNcanbeacceptedand,ifso,producesaresponseRESwhichissentbacktotheVLR/SGSN.TheUSIMalsocomputesCKandIK.TheVLR/SGSNcomparesthereceivedRESwithXRES.IftheymatchtheVLR/SGSNconsiderstheauthenticationandkeyagreementexchangetobesuccessfullycompleted.TheestablishedkeysCKandIKwillthenbetransferredbytheUSIMandtheVLR/SGSNtotheentitieswhichperformcipheringandintegrityfunctions.

VLR/SGSNscanoffersecureserviceevenwhenHE/AuClinksareunavailablebyallowingthemtousepreviouslyderivedcipherandintegritykeysforausersothatasecureconnectioncanstillbesetupwithouttheneedforanauthenticationandkeyagreement.Authenticationisinthatcasebasedonasharedintegritykey,bymeansofdataintegrityprotectionofsignallingmessages(see6.4).

TheauthenticatingpartiesshallbetheAuCoftheuser'sHE(HE/AuC)andtheUSIMintheuser'smobilestation.Themechanismconsistsofthefollowingprocedures:

AproceduretodistributeauthenticationinformationfromtheHE/AuCtotheVLR/SGSN.Thisprocedureisdescribedin6.3.2.TheVLR/SGSNisassumedtobetrustedbytheuser'sHEtohandleauthenticationinformationsecurely.ItisalsoassumedthattheintrasystemlinksbetweentheVLR/SGSNtotheHE/AuCareadequatelysecure.ItisfurtherassumedthattheusertruststheHE.

AproceduretomutuallyauthenticateandestablishnewcipherandintegritykeysbetweentheVLR/SGSNandtheMS.Thisprocedureisdescribedin6.3.3.

AproceduretodistributeauthenticationdatafromapreviouslyvisitedVLRtothenewlyvisitedVLR.Thisprocedureisdescribedin6.3.4.ItisalsoassumedthatthelinksbetweenVLR/SGSNsareadequatelysecure.

总的来说,CK和IK当作鉴权五元组中的一部分,存在SGSN/VLR中。

但是SGSN/VLR并不把它们下发给UE,而是只下发AUTN和RAND。

UE通过对AUTN的鉴权,达到对网络鉴权的目的。

然后,如果通过了AUTN的鉴权的话,UE利用RAND,根据USIM中已经写好的算法,算出RES,然后发给SGSN/VLR。

SGSN/VLR收到后,将其与鉴权五元组中的XRES相比,如果相同,就代表该UE是合法的。

这样就完成了网络对UE的鉴权。

然后,UE在USIM中算出CK和IK,同时,SGSN/VLR也采用相同的CK和IK。

(这两个CK和IK之所以相同,是由于他们都是通过同一个RAND算出来的。

所以这样的话,UE和SGSN/VLR就能采用相同的CK和IK来进行数据加密了。

KSI:

UMTS中使用KSI,GSM中使用CKSN。

Thekeysetidentifier(KSI)isanumberwhichisassociatedwiththecipherandintegritykeysderivedduringauthentication.ThekeysetidentifierisallocatedbythenetworkandsentwiththeauthenticationrequestmessagetothemobilestationwhereitisstoredtogetherwiththecalculatedcipherkeyCKandintegritykeyIK.KSIinUMTScorrespondstoCKSNinGSM.TheUSIMstoresoneKSI/CKSNforthePSdomainkeysetandoneKSI/CKSNfortheCSdomainkeyset.

KSI用于网络鉴别保存在UE中的CK和IK。

ThepurposeofthekeysetidentifieristomakeitpossibleforthenetworktoidentifythecipherkeyCKandintegritykeyIKwhicharestoredinthemobilestationwithoutinvokingtheauthenticationprocedure.Thisisusedtoallowre-useofthecipherkeyCKandintegritykeyIKduringsubsequentconnectionset-ups.

IK:

IK有128bit。

在CS和PS与UE之间都可以存在各自的IK。

如IKcs,IKps。

IK用于在UE和RNC之间的RRC层的完整性保护。

一致性校验是在RRC层进行的。

TheUIA(UMTS完整性算法)shallbeimplementedintheMEandintheRNC.

IntegrityprotectionshallbeappliedattheRRClayer.

由于在UE和网络之间传送的大多数的信令信息是相当敏感的,所以必须保证它们的完整性。

MostcontrolsignallinginformationelementsthataresentbetweentheMSandthenetworkareconsideredsensitiveandmustbeintegrityprotected.AmessageauthenticationfunctionshallbeappliedonthesesignallinginformationelementstransmittedbetweentheMEandtheRNC.

AftertheRRCconnectionestablishmentandexecutionofthesecuritymodeset-upprocedure,alldedicatedMS<–>networkcontrolsignallingmessages(e.g.RRC,MM,CC,GMM,andSMmessages)shallbeintegrityprotected.TheMobilityManagementlayerintheMSsupervisesthattheintegrityprotectionisstarted(seesection6.4.5).

CK:

CK有128bit。

在CS和PS与UE之间都可以存在各自的CK。

如CKcs,CKps

加密是在RLC或者MAC层进行的。

是在UE和RNC之间进行的。

ThecipheringfunctionisperformedeitherintheRLCsub-layerorintheMACsub-layer,accordingtothefollowingrules:

-Ifaradiobearerisusinganon-transparentRLCmode(AMorUM),cipheringisperformedintheRLCsub-layer.

-IfaradiobearerisusingthetransparentRLCmode,cipheringisperformedintheMACsub-layer(MAC-dentity).

CipheringwhenappliedisperformedintheS-RNCandtheMEandthecontextneededforciphering(CK,HFN,etc.)isonlyknowninS-RNCandtheME.

鉴权流程由网络侧发起,其目的是:

由网络来检查是否允许终端接入网络;提供鉴权参数五元组中的随机数数组,供终端计算出加密密钥(CK);同时,供终端计算出与网络侧进行一致性检查的密钥(IK);最后一个目的是可以提供终端对网络的鉴权。

与GSM的鉴权流程相比,3G的鉴权流程增加了一致性检查的功能及终端对网络的鉴权功能。

这些功能使3G的安全特性有了进一步的增强。

网络侧在发起鉴权前,如果VLR内还没有鉴权参数五元组,此时将首先发起到HLR取鉴权集的过程,并等待鉴权参数五元组的返回。

鉴权参数五元组的信息包含RAND、XRES、AUTN、CK和IK。

在检测到鉴权参数五元组的存在后,网络侧下发鉴权请求消息。

此消息中将包含某个五元组的RAND和AUTN。

用户终端在接收到此消息后,由其USIM验证AUTN,即终端对网络进行鉴权,如果接受,USIM卡将利用RAND来计算出CK与IK和签名XRES。

如果USIM认为鉴权成功,在鉴权响应消息中将返回XRES。

网络侧在收到鉴权响应消息之后,比较此鉴权响应消息中的XRES与存储在VLR数据库中的鉴权参数五元组的XRES,确定鉴权是否成功:

成功,则继续后面的正常流程;不成功,则会发起异常处理流程,释放网络侧与此终端间的连接,并释放被占用的网络资源、无线资源。

(不成功的处理见后面的描述)

在成功的鉴权之后,终端将会把CK(加密密钥)与IK(一致性检查密钥)存放到USIM卡中。

鉴权失败的话,SGSN会发起一个鉴权失败报告消息给HLR,此时HLR可能会发起一个canclelocation(也就是HLR发起的分离流程啦)。

(33102。

6.3.3)VLR/SGSN可能会发起一次新的鉴权加密流程。

UponreceiptofuserauthenticationresponsetheVLR/SGSNcomparesRESwiththeexpectedresponseXRESfromtheselectedauthenticationvector.IfXRESequalsRESthentheauthenticationoftheuserhaspassed.TheVLR/SGSNalsoselectstheappropriatecipherkeyCKandintegritykeyIKfromtheselectedauthenticationvector.IfXRESandRESaredifferent,VLR/SGSNshallinitiateanAuthenticationFailureReportproceduretowardstheHLRasspecifiedinsection6.3.6.VLR/SGSNmayalsodecidetoinitiateanewidentificationandauthenticationproceduretowardstheuser.

33102.6.3.6ReportingauthenticationfailuresfromtheSGSN/VLRtotheHLR

Thepurposeofthisprocedureistoprovideamechanismforreportingauthenticationfailuresfromtheservingenvironmentbacktothehomeenvironment.

TheprocedureisshowninFigure13.

Figure13:

ReportingauthenticationfailurefromVLR/SGSNtoHLR

TheprocedureisinvokedbytheservingnetworkVLR/SGSNwhentheauthenticationprocedurefails.Theauthenticationfailurereportshallcontainthesubscriberidentityandafailurecausecode.Thepossiblefailurecausesareeitherthatthenetworksignaturewaswrongorthattheuserresponsewaswrong.

TheHEmaydecidetocancelthelocationoftheuserafterreceivinganauthenticationfailurereport.

b.加密

 

1、在A/Gb模式下,手机在发送了AuthenticationandCipheringResponse消息后,就开始加密了。

2G的加密是在LLC层的。

其中在AuthenticationandCipheringrequest消息中带有2G的加密算法。

InA/Gbmode,thescopeofcipheringisfromthecipheringfunctionintheSGSNtothecipheringfunctionintheMS.CipheringisdoneintheLLClayer,andfromtheperspectiveoftheexistingGSMMS-BTSradiopath,anLLCPDUistransmittedasplaintext.

SGSN在收到一个正确的AuthenticationandCipheringResponse消息后,就开始加密。

InA/Gbmode,theMSstartscipheringaftersendingtheAuthenticationandCipheringResponsemessage.TheSGSNstartscipheringwhenavalidAuthenticationandCipheringResponsemessageisreceivedfromtheMS.

2、在Iu模式下,加密的开始是受securitymodeset-up流程控制的。

当发送了securitymodecommand下行消息后,下行的消息(包括该消息)就开始了一致性校验;当UE返回了securitymodecomplete消息后,上行的消息(包括该消息)就开始了一致性校验。

加密的相关信息,包括CK的选择、加密算法的选择,则是在加密模式设定(securitymodeset-up)的流程中确定的。

所以,根据流程图,可以看到在3G里面,是在securitymodecomplete消息发送后,UE和UTRAN才开始进行加密的(因为通过前面的消息交互,确定了相关的CK和算法)。

这个加密是在RLC层的。

 

加密是在RLC(确认和非确认模式),透明模式的RLC加密在MAC层,都属于空口层二,数据链路层。

针对业务数据和信令。

一致性检查在RRC,针对信令。

Securitymodeset-upprocedure

Thissectiondescribesonecommonprocedureforbothcipheringandintegrityprotectionset-up.ItismandatorytostartintegrityprotectionofsignallingmessagesbyuseofthisprocedureateachnewsignallingconnectionestablishmentbetweenMSandVLR/SGSN.Thefourexceptionswhenitisnotmandatorytostartintegrityprotectionare:

-Iftheonlypurposewiththesignallingconnectionestablishmentandtheonlyresultisperiodiclocationregistration,i.e.nochangeofanyregistrationinformation.

-IfthereisnoMS-VLR/SGSNsignallingaftertheinitialL3signallingmessagesentfromMStoVLR/SGSN,i.e.inthecaseofdeactivationindicationsentfromtheMSfollowedbyconnectionrelease.

-IftheonlyMS-VLR/SGSNsignallingaftertheinitialL3signallingmessagesentfromMStoVLR/SGSN,andpossibleuseridentityrequestandauthentication(seebelow),isarejectsignallingmessagefollowedbyaconnectionrelease.

-IfthecallisanemergencycallteleserviceasdefinedinTS 22.003,seesection 6.4.9.2below.

Whentheintegrityprotectionshallbestarted,theonlyproceduresbetweenMSandVLR/SGSNthatareallowedaftertheinitialconnectionrequest(i.e.theinitialLayer3messagesenttoVLR/SGSN)andbeforethesecuritymodeset-up

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 历史学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1