Cryptoki到CryptoAPI安全生产协议与标准管理.ppt_第1页
Cryptoki到CryptoAPI安全生产协议与标准管理.ppt_第2页
Cryptoki到CryptoAPI安全生产协议与标准管理.ppt_第3页
Cryptoki到CryptoAPI安全生产协议与标准管理.ppt_第4页
Cryptoki到CryptoAPI安全生产协议与标准管理.ppt_第5页
已阅读5页,还剩87页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

安全协议与标准,linfb2009,10,PKCS#11andmore,OverviewAPIUsage:SessionFunctionsSummaryFunctionsDetail/ExampleMechanisms:Algorithm,ProtocolComparisonImplementationGSS-APIGCS-APICDSAMS-CAPIDEP,Overview,Incryptography,PKCS#11isoneofthefamilyofstandardscalledPublic-KeyCryptographyStandards(PKCS),publishedbyRSALaboratories.Itdefinesaplatform-independentAPItocryptographictokens,suchasHardwareSecurityModulesandsmartcards.(ThePKCS#11standardnamestheAPICryptoki,butisoftenusedtorefertotheAPIaswellasthestandardthatdefinesit.)Sincethereisntarealstandardforcryptographictokens,thisAPIhasbeendevelopedtobeanabstractionlayerforthegenericcryptographictoken.ThePKCS#11APIdefinesmostcommonlyusedcryptographicobjecttypes(RSAkeys,X.509Certificates,DES/TripleDESkeys,etc.)andallthefunctionsneededtouse,create/generate,modifyanddeletethoseobjects.,-,PKCS#11islargelyadoptedtoaccesssmartcardsandHSMs.MostcommercialCertificationAuthoritysoftwareusesPKCS#11toaccesstheCAsigningkeyortoenrollusercertificates.Cross-platformsoftwarethatneedstousesmartcardsusesPKCS#11,suchasMozillaFirefoxandOpenSSL(usinganextension).NSS(inFirefox)“pkcs-11v2-20.doc”,Background,Portablecomputingdevicessuchassmartcards,PCMCIAcards,andsmartdiskettesareidealtoolsforimplementingpublic-keycryptography,astheyprovideawaytostoretheprivate-keycomponentofapublic-key/private-keypairsecurely,underthecontrolofasingleuser.Withsuchadevice,acryptographicapplication,ratherthanperformingcryptographicoperationsitself,utilizesthedevicetoperformtheoperations,withsensitiveinformationsuchasprivatekeysneverbeingrevealed.Asmoreapplicationsaredevelopedforpublic-keycryptography,astandardprogramminginterfaceforthesedevicesbecomesincreasinglyvaluable.Thisstandardaddressesthisneed.,ka,MemorycardSmartcardPCMCIA/CardBusUSBflashdriveUSBKeyExpressCardPCIExpress,口令之外,口令登录指纹登录智能卡登录登录次数的限制PIN和lock功能SSO,其他生物识别认证技术,抽象:Token,TheprimarygoalofCryptokiwasalower-levelprogramminginterfacethatabstractsthedetailsofthedevices,andpresentstotheapplicationacommonmodelofthecryptographicdevice,calleda“cryptographictoken”(orsimply“token”).Atokenisadevicethatstoresobjectsandcanperformcryptographicfunctions.(cryptoki是token的接口),GeneralCryptokiModel,ObjectHierarchy,Cryptokidefinesthreeclassesofobject,Users,ThisversionofCryptokirecognizestwotokenusertypes.OnetypeisaSecurityOfficer(SO).Theothertypeisthenormaluser.TheroleoftheSOistoinitializeatokenandtosetthenormalusersPIN,andpossiblytomanipulatesomepublicobjects.Onlythenormaluserisallowedaccesstoprivateobjectsonthetoken,andthataccessisgrantedonlyafterthenormaluserhasbeenauthenticated.,Session,Cryptokirequiresthatanapplicationopenoneormoresessionswithatokentogainaccesstothetokensobjectsandfunctions.Asessionprovidesalogicalconnectionbetweentheapplicationandthetoken.Cryptokisupportsmultiplesessionsonmultipletokens.Asessioncanbearead/write(R/W)sessionoraread-only(R/O)session.,Sessionevents,Sessioneventscausethesessionstatetochange.Thefollowingtabledescribestheevents:,Read-OnlySessionStates,Read/WriteSessionStates,AccesstoDifferentTypesObjectsbyDifferentTypesofSessions,withfork(),ConsideraUNIXprocessPwhichbecomesaCryptokiapplicationbycallingC_Initialize,andthenusesthefork()systemcalltocreateachildprocessC.ifCneedstouseCryptoki,itneedstoperformitsownC_Initializecall.(andthenC_Finalizeaftersomeotheroperations)ifithasnoneedtouseCryptoki,itshouldimmediatelycallC_InitializeandthencallC_Finalize.,withmulti-thread,Cryptokienablesapplicationstoprovideinformationtolibrariessothattheycangiveappropriatesupportformulti-threading.Inparticular,whenanapplicationinitializesaCryptokilibrarywithacalltoC_Initialize,itcanspecifyoneoffourpossiblemulti-threadingbehaviorsforthelibrary:,SummaryofCryptokiFunctions,Slotandtokenanagementfunctions,SessionManagementFunctions,Objectmanagementfunctions,Encryption/Decryptionfunctions,Messagedigestingfunctions,SigningandMACingfunctions,FunctionsforverifyingsignaturesandMACs,Dual-purposecryptographicfunctions,Keymanagementfunctions,Randomnumbergenerationfunctions,ParallelfunctionmanagementFunctions,Callbackfunction,Functionsdetail,CK_DEFINE_FUNCTION(CK_RV,C_Initialize)(CK_VOID_PTRpInitArgs);CK_DEFINE_FUNCTION(CK_RV,C_Finalize)(CK_VOID_PTRpReserved);,Example,CK_INFOinfo;CK_RVrv;CK_C_INITIALIZE_ARGSInitArgs;InitArgs.CreateMutex=,Mechanisms:Algorithm,RSA/DSA/EC/D-HKEA/KeyderivationHMACRC2/RC4/RC5/AES/2/3DES/SKIPJACK/BATON/JUNIPER/Blowfish/TwofishMD2/MD5/SHA-1/SHA-256/SHA-384/SHA-512/FASTHASH/RIPE-MDPKCS#5/PKCS#12/LYNKS,Mechanisms:Protocol,SETSSL/TLS/WTLSCMS,ComparisonofCryptokiandotherAPIs:GCS-APIvs.Cryptoki,Implementation,PKCS#11ProviderPKCS#11Wrapper,Implementation,Firefox+opencryptoki,inubuntu,NSS,NSS:ProvenApplicationSecurityArchitecture,NSSprovidesacompleteopen-sourceimplementationofthecryptolibrariesusedbyAOL,RedHat,Sun,andothercompaniesinavarietyofproducts,includingthefollowing:TheMozillaclientproducts,includingMozillaSuite,Firefox,andThunderbird.TheNetscapebrowsersAOLCommunicatorandAOLInstantMessenger(AIM)OpensourceclientapplicationssuchasEvolution,Gaim,andOpenOffice.ServerproductsfromRedHat:RedHatDirectoryServer,RedHatCertificateSystem,andthemod_nssSSLmodulefortheApachewebserver.ServerproductsfromtheSunJavaEnterpriseSystem,includingSunJavaSystem(SJS)WebServer,SJSDirectoryServer,SJSPortalServer,SJSMessagingServer,andSJSApplicationServer.,BuildFirefoxwithNSS,WindowsXPVisualStudio6/7.1/8MozillaBuildMozilla/FirefoxSourceCodemozillasecuritynss制作配置文件.mozconfig(备注行)运行start-msvc71.bat$make-fclient.mkbuild耗时编译好的在.ff-opt-staticdistbin绿色版,PKCS#11wrappers,SincePKCS#11isacomplexCAPImanywrappersexistthatletthedeveloperusetheAPIfromvariouslanguages.PyKCS11-AwrapperforPythonPythonobject-orientedwrapperforPKCS11(Cryptoki)Java5.0includesawrapperforPKCS#11APIpkcs11-helper-AsimpleopensourceCinterfacetohandlePKCS#11tokens.,GSS-APIbyIETF,GenericSecurityServicesApplicationProgrammingInterfaceGSS-APIisanapplicationprogramminginterfaceforprogramstoaccesssecurityservices.TheGSSAPIisanIETFstandardthataddressestheproblemofmanysimilarbutincompatiblesecurityservicesinusetoday.,-compatibleinterface,TheGSSAPI,byitself,doesnotprovideanysecurity.Instead,securityservicevendorsprovideGSSAPIimplementationsusuallyintheformoflibrariesinstalledwiththeirsecuritysoftware.TheselibrariespresentaGSSAPI-compatibleinterfacetoapplicationwriterswhocanwritetheirapplicationtouseonlythevendor-independentGSSAPI.Ifthesecurityimplementationeverneedsreplacing,theapplicationneednotberewritten.,GSSAPItokens,ThedefinitivefeatureofGSSAPIapplicationsistheexchangeofopaquemessages(tokens)thathidetheimplementationdetailfromthehigherlevelapplication.TheclientandserversidesoftheapplicationarewrittentoconveythetokensgiventothembytheirrespectiveGSSAPIimplementations.GSSAPItokenscanbesentoveraninsecurenetworkbecausethemechanismsguaranteeinherentmessagesecurity.Aftersomenumberoftokenshavebeenexchanged,theGSSAPIatbothendsinformtheirlocalapplicationthatasecuritycontexthasbeenestablished.,securitycontext,Onceasecuritycontextisestablished,sensitiveapplicationmessagescanbewrapped(encrypted)bytheGSSAPIforsecurecommunicationbetweenclientandserver.TypicalprotectionsguaranteedbyGSSAPIwrappingincludeconfidentiality(secrecy)andintegrity(authenticity).TheGSSAPIcanalsoprovidelocalguaranteesabouttheidentityoftheremoteuserorremotehost.,HistoryoftheGSS-API,July1991:IETFCommonAuthenticationTechnology(CAT)WorkingGroupmeetsinAtlanta,ledbyJohnLinnSeptember1993:GSSAPIversion1(RFC1508,RFC1509)May1995:WindowsNT3.51released,includesSSPIJune1996:KerberosmechanismforGSSAPI(RFC1964)January1997:GSSAPIversion2(RFC2078)October1997:SASLpublished,includesGSSAPImechanism(RFC2222)January2000:GSSAPIversion2update1(RFC2743,RFC2744)August2004:KITTENworkinggroupmeetstocontinueCATactivitiesMay2006:SecureShelluseofGSSAPIstandardised(RFC4462),GSS-APIinRFC,RFC2743TheGenericSecurityServiceAPIVersion2update1RFC2744TheGenericSecurityServiceAPIVersion2:C-BindingsRFC1964TheKerberos5GSS-APImechanismRFC4121TheKerberos5GSS-APImechanism:Version2RFC4178TheSimpleandProtectedGSS-APINegotiationMechanism(SPNEGO)RFC2025TheSimplePublic-KeyGSS-APIMechanism(SPKM)RFC2847LIPKEY-ALowInfrastructurePublicKeyMechanismUsingSPKM,Keyconcepts,NameAbinarystringthatlabelsasecurityprincipal(i.e.userorserviceprogram)-seeaccesscontrolandidentity.Forexample,KerberosusesnameslikeuserREALMforusersandservice/hostnameREALMforprograms.CredentialsInformationthatprovesanidentity;usedbyanentitytoactasthenamedprincipal.Credentialstypicallyinvolveasecretcryptographickey.ContextThestateofoneendoftheauthenticating/authenticatedprotocol.Mayprovidemessageprotectionservices,whichcanbeusedtocomposeasecurechannel.TokensOpaquemessagesexchangedeitheraspartoftheinitialauthenticationprotocol(context-leveltokens),oraspartofaprotectedcommunication(per-messagetokens)MechanismAnunderlyingGSSAPIimplementationthatprovidesactualnames,tokensandcredentials.KnownmechanismsincludeKerberos,NTLM,DistributedComputingEnvironment(DCE),SESAME,SPKM,LIPKEY.Initiator/acceptorThepeerthatsendsthefirsttokenistheinitiator;theothertheacceptor.Generally,theclientprogramistheinitiatorwhiletheserveristheacceptor.,about45procedurecalls,Significantonesinclude:GSS_Acquire_cred-obtainstheusersidentityproof,oftenasecretcryptographickeyGSS_Import_name-convertsausernameorhostnameintoaformthatidentifiesasecurityentityGSS_Init_sec_context-generatesaclienttokentosendtotheserver,usuallyachallengeGSS_Accept_sec_context-processesatokenfromGSS_Init_sec_contextandcangeneratearesponsetokentoreturnGSS_Wrap-convertsapplicationdataintoasecuremessagetoken(typicallyencrypted)GSS_Unwrap-convertsasecuremessagetokenbackintoapplicationdata,Standardize,TheGSSAPIhasbeenstandardizedfortheCandJavalanguages.LimitationsoftheGSSAPIincludethatitstandardizesonlyauthentication,andnotauthorization,andthatitassumesaclient-serverarchitecture.Anticipatingnewsecuritymechanisms,theGSSAPIincludesanegotiatingpseudomechanism,S

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论