




已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年甘肃省张掖市(甘州区)博物馆讲解员招聘考前自测高频考点模拟试题及答案详解(历年真题)
- 土地承包经营权合同15篇
- 2025年工业互联网平台数据加密算法效能提升与产业应用创新研究报告
- 2025年氢能源产业链中加氢站建设成本优化与布局策略研究报告
- 2025年工业互联网平台云计算资源动态分配在智能办公自动化中的应用报告
- 2025年工业互联网平台流量整形技术在工业互联网平台创新能力提升中的应用报告001
- 2025年福建省厦门市集美区杏东中学招聘1人模拟试卷及一套答案详解
- 第48课 お荷物は私がお持ちします教学设计新版标准日本语初级下册-新版标准日本语
- 2025浙江温州交运集团选聘温州低空经济发展有限公司副总经理1人笔试参考题库附带答案详解
- 2025年青藏铁路集团有限公司招聘(172人)笔试参考题库附带答案详解
- 医院手术室质控体系构建与管理
- 喷涂基础知识培训课件
- 2025年驻外内聘考试题库
- 中铁四局工作汇报与战略规划
- 矿山测量基础知识课件
- 【《上市公司财务造假分析的国内外文献综述》5100字】
- 企业融资培训课件
- 2025年抗菌药物合理使用培训
- 杜仲种植深加工项目可行性研究报告-备案立项
- 2025年乡村文化旅游发展报告:文旅融合下的乡村旅游生态旅游规划与实施研究
- 2025-2030中国在线总有机碳(TOC)分析仪行业市场现状供需分析及投资评估规划分析研究报告
评论
0/150
提交评论