rfc3962.Advanced Encryption Standard (AES) Encryption for Kerberos 5
2024年软件资格考试信息安全工程师(中级)(基础知识、应用技术)合卷试卷与参考答案
2024年软件资格考试信息安全工程师(基础知识、应用技术)合卷(中级)模拟试卷(答案在后面)一、基础知识(客观选择题,75题,每题1分,共75分)1、题干:以下关于计算机病毒的说法,正确的是()。
A、计算机病毒是一种生物病毒,可以通过空气传播B、计算机病毒是一种程序,具有自我复制能力,能够破坏计算机系统C、计算机病毒只能通过移动存储设备传播D、计算机病毒不会对计算机硬件造成损害2、题干:以下关于网络安全的基本要素,不属于五要素之一的是()。
A、机密性B、完整性C、可用性D、真实性3、下列哪一项不属于常见的信息安全威胁?A. 拒绝服务攻击B. 物理盗窃C. 软件著作权保护D. 社会工程学攻击4、在信息安全保障体系中,PDR模型指的是哪三个要素?A. 预防、检测、响应B. 预警、防御、恢复C. 计划、部署、审查D. 保护、检测、反应5、下列哪一项不是用于确保数据完整性的措施?A. 校验和B. 数字签名C. 哈希函数D. 对称加密6、在网络安全领域,以下哪种攻击方式属于被动攻击?A. SQL注入B. 拒绝服务攻击C. 网络监听D. 跨站脚本攻击7、题目:在信息安全中,以下哪项不是常见的物理安全措施?A. 安全门禁系统B. 火灾自动报警系统C. 数据备份与恢复D. 网络防火墙8、题目:以下关于信息安全风险评估的说法,错误的是:A. 评估信息安全风险是信息安全管理体系(ISMS)的核心B. 评估信息安全风险可以识别出组织面临的主要安全威胁C. 评估信息安全风险有助于确定安全控制措施D. 评估信息安全风险需要考虑组织内部的业务需求9、在信息安全领域中,PKI(Public Key Infrastructure)主要功能是什么?A. 实现数据加密与解密B. 提供身份认证服务C. 支持安全电子邮件传输D. 上述所有选项 10、下列哪项不属于计算机病毒的传播途径?A. 通过互联网下载文件B. 使用未授权的软件C. 访问受感染的网站D. 定期更新操作系统补丁11、在信息安全领域,以下哪项技术不属于访问控制手段?A. 身份认证B. 访问控制列表(ACL)C. 数据加密D. 防火墙12、以下关于信息安全风险评估的说法中,正确的是:A. 风险评估只是针对已知威胁的评估B. 风险评估应当包括对组织内部和外部风险的识别和评估C. 风险评估的目的是为了完全消除风险D. 风险评估的结果不应当对外公开13、以下哪一项不是信息安全管理的基本原则?A. 保密性B. 完整性C. 可用性D. 不可否认性14、在信息系统安全中,用来保证数据不被未经授权的人所访问的安全措施是:A. 加密B. 防火墙C. 访问控制D. 审计追踪15、以下关于信息安全技术中防火墙的说法,错误的是:A. 防火墙可以阻止未经授权的访问B. 防火墙可以保护内部网络免受外部攻击C. 防火墙无法阻止内部网络之间的攻击D. 防火墙可以限制特定协议或端口的数据传输16、以下关于安全审计的说法,正确的是:A. 安全审计是定期检查网络安全设备B. 安全审计是检查网络中可能存在的安全漏洞C. 安全审计是检查操作系统和应用程序的安全配置D. 安全审计是以上所有说法17、以下关于密码学的描述,错误的是()A. 密码学是研究如何保护信息安全的技术科学B. 密码学主要分为对称密码学和公钥密码学C. 对称密码学使用相同的密钥进行加密和解密D. 公钥密码学使用不同的密钥进行加密和解密18、以下关于安全协议的描述,正确的是()A. 安全协议是指在网络通信过程中,用于保证数据传输安全的协议B. 安全协议的主要目的是防止数据在传输过程中被窃听、篡改和伪造C. 安全协议不涉及身份认证和访问控制D. 安全协议只适用于加密通信19、以下关于密码学中对称加密算法的描述,不正确的是:A. 对称加密算法使用相同的密钥进行加密和解密B. 对称加密算法的速度通常比非对称加密算法快C. 对称加密算法的安全性取决于密钥的长度和保密性D. 对称加密算法可以抵抗量子计算机的攻击 20、在信息安全中,以下哪种措施属于物理安全?A. 数据备份B. 网络防火墙C. 身份认证D. 安全审计21、以下关于ISO/IEC 27001标准说法正确的是:A. ISO/IEC 27001标准是信息安全管理体系(ISMS)的标准,适用于所有组织,无论其规模和类型。
(完整版)VPN概述
VPN概述1-1随着计算机网络的发展,企业纷纷利用Internet技术建立企业自己的内联网(Intranet),同时根据商务发展的需要,与供货商、销售商等整合资源,建设外联网(Extranet)。
Intranet 和Extranet在物理上的分布化,即由简单的本地局域网或局域网连接发展为远地局域网连接,这其中最为突出的就是安全问题。
远程网络连接最直接的方法就是使用专线,但问题很多,最主要的如费用昂贵、维护困难、接入点选择不灵活以及多节点连接困难等。
同时,企业已经接入了Internet,却又要使用专线,这无疑是一种资源浪费。
从人类通信的历史来看,因特网是最近才出现的事物,然而它却对人类的通信方式有着非常深远的影响,以至于它被列入通信发展过程中最伟大的标志之一。
因特网从根本上改变了社会和商业上的交往。
特别对于商业,因特网迅速成为进行商业活动的通信介质。
然而,商业活动需要安全的专用通信,而因特网却是一个最不安全的公共传输介质。
通常有两种方法来保证网络上的对话不被公开:一是物理分隔(Physical Separation),指只有指定的接收者才能访问信号;二是迷惑(Obfuscation),虽然能够检测到信号,但只有指定的接收者才能够理解其中的信息。
当在公共网络传输介质中进行通信的时候,迷惑是唯一的解决方法。
VPN(Virtual Private Network)在公用网络中,按照相同的策略和安全规则, 建立的私有网络连接VPN运用了各种网络技术来实现在公共的因特网基础设施中提供专用通信。
它提供了信息的机密性、数据的完整性和用户的验证。
VPN原理上由两部分组成:覆盖在普遍存在的因特网之上的虚拟网络(Virtual Network),以及为了秘密通信和独占使用的专用网络(Private Network)。
更加重要的是VPN的“专用”方面。
专用网络的真正目的是保持数据的机密性,使之有指定的接收者能够接收它。
IPSecIKEvVPN安全协议
IPSecIKEvVPN安全协议IPSec IKEv2 VPN安全协议引言近年来,随着互联网的迅猛发展,保护网络数据安全已经成为亟待解决的问题之一。
在企业和个人使用的虚拟专用网络(VPN)中,IPSec IKEv2(Internet Protocol Security Internet Key Exchange version 2)协议作为一种安全性较高的选项,得到了广泛的应用。
本文将探讨IPSec IKEv2 VPN安全协议的原理、功能和应用。
一、IPSec IKEv2概述IPSec IKEv2是一种用于建立和管理VPN连接的协议。
它在Internet Engineering Task Force(IETF)的RFC7296标准中有详细的介绍。
IPSec IKEv2通过提供身份认证、密钥交换和数据加密等功能,实现了对VPN连接的保护。
它是IPSec协议族中的一员,能够确保数据在传输过程中的机密性、完整性以及可靠性。
二、IPSec IKEv2的原理1. 身份认证IPSec IKEv2协议使用证书、预共享密钥或者用户名/密码等方式进行身份认证。
其中,证书认证通常被认为是最安全的方式,它可以提供更高的认证强度和防止身份伪冒的能力。
2. 密钥交换IPSec IKEv2使用Diffie-Hellman算法来执行密钥交换,以确保在安全的通信通道上进行密钥协商。
这种算法使得传输的密钥只能在参与交换的两个实体之间得到,从而有效地防止第三方对密钥的截获和破解。
3. 数据加密IPSec IKEv2使用对称加密算法对数据进行加密,以保护传输的数据免受未经授权访问和篡改的风险。
常见的加密算法包括AES (Advanced Encryption Standard)和3DES(Triple Data Encryption Standard)等。
三、IPSec IKEv2的功能1. 机密性IPSec IKEv2使用加密算法对数据进行加密,确保传输过程中的机密性。
CAPWAP协议的介绍(五).
Local MAC
使用AES-CCMP用于加密
Roaming
Group Key Refresh
由于BSS的Group Key (GTK)需要间隔刷新。 在Split MAC的情况下,AC需要复制所有的广播报文,更新key的 索引,让报文以当前和新的GTK的方式重复发送,来保证BSS上所 有的station都能收到广播包。在Local MAC的时候,这个过程由
索引是WLAN的基本标识符,AC可能尝试来做到它管理的所有 WTP上相同的WLAN用相同的索引号来定义。AC如果不支持这种 方法的话,必须使用其他的方法来维持一个WLAN-Identifierto-SSID映射表。
IEEE 802.11 Specific CAPWAP Control Messages
IEEE 802.11 WLAN Configuration Response 由WTP发送给AC,用于响应IEEE 802.11 WLAN Configuration Request,告诉请求的配置是否成功,或者发生 了错误。
返回
返回
CAPWAP Binding for IEEE 802.11
CAPWAP协议本身并不包括任何指定的无线技术。它依 靠绑定协议来扩展对特定无线技术的支持。
RFC5416就是用来扩展CAPWAP对IEEE 802.11网络的 支持。其中定义了控制消息字段,新的控制消息,消息元 素。
注意,这个协议仅支持IEEE 802.11-2007规范,并不支 持IEEE 802.11-2007 standard中定义的ad hoc网络模式, 也不适用于four-address格式的数据帧(这种数据帧一般 用于网桥,在IEEE 802.11-2007标准中没有指定这种用 法)。协议并不支持IEEE 802.11n。
rfc5649.Advanced Encryption Standard (AES) Key Wrap with Padding Algorithm
Network Working Group R. Housley Request for Comments: 5649 Vigil Security Category: Informational M. Dworkin NIST August 2009 Advanced Encryption Standard (AES) Key Wrap with Padding AlgorithmAbstractThis document specifies a padding convention for use with the AES Key Wrap algorithm specified in RFC 3394. This convention eliminates the requirement that the length of the key to be wrapped be a multiple of 64 bits, allowing a key of any practical length to be wrapped.Status of This MemoThis memo provides information for the Internet community. It doesnot specify an Internet standard of any kind. Distribution of thismemo is unlimited.Copyright and License NoticeCopyright (c) 2009 IETF Trust and the persons identified as thedocument authors. All rights reserved.This document is subject to BCP 78 and the IETF Trust’s LegalProvisions Relating to IETF Documents(/license-info) in effect on the date ofpublication of this document. Please review these documentscarefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e ofthe Trust Legal Provisions and are provided without warranty asdescribed in the BSD License.Housley & Dworkin Informational [Page 1]1. IntroductionManagement of cryptographic keys often leads to situations where one symmetric key is used to encrypt and integrity-protect another key,which can be either a symmetric key or an asymmetric key. Theoperation is often called key wrapping.This document specifies an extension of the Advanced EncryptionStandard (AES) Key Wrap algorithm [AES-KW1, AES-KW2]. Without thisextension, the input to the AES Key Wrap algorithm, called the keydata, must be a sequence of two or more 64-bit blocks.The AES Key Wrap with Padding algorithm can be used to wrap a key of any practical size with an AES key. The AES key-encryption key (KEK) must be 128, 192, or 256 bits. The input key data may be as short as one octet, which will result in an output of two 64-bit blocks (or 16 octets). Although the AES Key Wrap algorithm does not place amaximum bound on the size of the key data that can be wrapped, thisextension does so. The use of a 32-bit fixed field to carry theoctet length of the key data bounds the size of the input at 2^32octets. Most systems will have other factors that limit thepractical size of key data to much less than 2^32 octets.A message length indicator (MLI) is defined as part of an"Alternative Initial Value" in keeping with the statement in Section 2.2.3.2 of [AES-KW1], which says:Also, if the key data is not just an AES key, it may not always be a multiple of 64 bits. Alternative definitions of the initialvalue can be used to address such problems.2. Notation and DefinitionsThe following notation is used in the algorithm descriptions:MSB(j, W) Return the most significant j bits of WLSB(j, W) Return the least significant j bits of WENC(K, B) AES Encrypt the 128-bit block B using key KDEC(K, B) AES Decrypt the 128-bit block B using key KV1 | V2 Concatenate V1 and V2K The key-encryption keym The number of octets in the key datan The number of 64-bit blocks in the padded key dataQ[i] The ith plaintext octet in the key dataP[i] The ith 64-bit plaintext block in the padded key data C[i] The ith 64-bit ciphertext data blockA The 64-bit integrity check registerHousley & Dworkin Informational [Page 2]3. Alternative Initial ValueThe Alternative Initial Value (AIV) required by this specification is a 32-bit constant concatenated to a 32-bit MLI. The constant is (in hexadecimal) A65959A6 and occupies the high-order half of the AIV.Note that this differs from the high order 32 bits of the default IV in Section 2.2.3.1 of [AES-KW1], so there is no ambiguity between the two. The 32-bit MLI, which occupies the low-order half of the AIV,is an unsigned binary integer equal to the octet length of theplaintext key data, in network order -- that is, with the mostsignificant octet first. When the MLI is not a multiple of 8, thekey data is padded on the right with the least number of octetssufficient to make the resulting octet length a multiple of 8. Thevalue of each padding octet shall be 0 (eight binary zeros).Notice that for a given number of 64-bit plaintext blocks, there are only eight values of MLI that can have that outcome. For example,the only MLI values that are valid with four 64-bit plaintext blocks are 32 (with no padding octets), 31 (with one padding octet), 30, 29, 28, 27, 26, and 25 (with seven padding octets). When the unwrapping process specified below yields n 64-bit blocks of output data and an AIV, the eight valid values for the MLI are 8*n, (8*n)-1, ..., and(8*n)-7. Therefore, integrity checking of the AIV, which iscontained in a 64-bit register called A, requires the followingsteps:1) Check that MSB(32,A) = A65959A6.2) Check that 8*(n-1) < LSB(32,A) <= 8*n. If so, letMLI = LSB(32,A).3) Let b = (8*n)-MLI, and then check that the rightmost b octets ofthe output data are zero.If all three checks pass, then the AIV is valid. If any of thechecks fail, then the AIV is invalid and the unwrapping operationmust return an error.4. Specification of the AES Key Wrap with Padding AlgorithmThe AES Key Wrap with Padding algorithm consists of a wrappingprocess and an unwrapping process, both based on the AES codebook[AES]. It provides an extension to the AES Key Wrap algorithm[AES-KW1, AES-KW2] that eliminates the requirement that the length of the key to be wrapped be a multiple of 64 bits. The next twosections specify the wrapping and unwrapping processes, called the Housley & Dworkin Informational [Page 3]extended key wrapping process and the extended key unwrappingprocess, respectively. These names distinguish these processes from the ones specified in [AES-KW1] and [AES-KW2].4.1. Extended Key Wrapping ProcessThe inputs to the extended key wrapping process are the KEK and theplaintext to be wrapped. The plaintext consists of between one and2^32 octets, containing the key data being wrapped. The key wrapping process is described below.Inputs: Plaintext, m octets {Q[1], Q[2], ..., Q[m]}, andKey, K (the KEK).Outputs: Ciphertext, (n+1) 64-bit values {C[0], C[1], ..., C[n]}.1) Append paddingIf m is not a multiple of 8, pad the plaintext octet string on the right with octets {Q[m+1], ..., Q[r]} of zeros, where r is thesmallest multiple of 8 that is greater than m. If m is a multiple of 8, then there is no padding, and r = m.Set n = r/8, which is the same as CEILING(m/8).For i = 1, ..., nj = 8*(i-1)P[i] = Q[j+1] | Q[j+2] | ... | Q[j+8].2) WrappingIf the padded plaintext contains exactly eight octets, thenprepend the AIV as defined in Section 3 above to P[1] and encrypt the resulting 128-bit block using AES in ECB mode [Modes] with key K (the KEK). In this case, the output is two 64-bit blocks C[0]and C[1]:C[0] | C[1] = ENC(K, A | P[1]).Otherwise, apply the wrapping process specified in Section 2.2.1of [AES-KW2] to the padded plaintext {P[1], ..., P[n]} with K (the KEK) and the AIV as defined in Section 3 above as the initialvalue. The result is n+1 64-bit blocks {C[0], C[1], ..., C[n]}. Housley & Dworkin Informational [Page 4]4.2. Extended Key Unwrapping ProcessThe inputs to the extended key unwrapping process are the KEK and(n+1) 64-bit ciphertext blocks consisting of a previously wrappedkey. If the ciphertext is a validly wrapped key, then the unwrapping process returns n 64-bit blocks of padded plaintext, which are thenmapped in this extension to m octets of decrypted key data, asindicated by the MLI embedded in the AIV.Inputs: Ciphertext, (n+1) 64-bit blocks {C[0], C[1], ..., C[n]}, and Key, K (the KEK).Outputs: Plaintext, m octets {Q[1], Q[2], ..., Q[m]}, or an error.1) Key unwrappingWhen n is one (n=1), the ciphertext contains exactly two 64-bitblocks (C[0] and C[1]), and they are decrypted as a single AESblock using AES in ECB mode [Modes] with K (the KEK) to recoverthe AIV and the padded plaintext key:A | P[1] = DEC(K, C[0] | C[1]).Otherwise, apply Steps 1 and 2 of the unwrapping process specified in Section 2.2.2 of [AES-KW2] to the n+1 64-bit ciphertext blocks, {C[0], C[1], ..., C[n]}, and to the KEK, K. Define the paddedplaintext blocks, {P[1], ..., P[n]}, as specified in Step 3 ofthat process, with A[0] as the A value. Note that checking "IfA[0] is an appropriate value" is slightly delayed to Step 2 below since the padded plaintext is needed to perform this verification when the AIV is used.2) AIV verificationPerform the three checks described in Section 3 above on thepadded plaintext and the A value. If any of the checks fail, then return an error.3) Remove paddingLet m = the MLI value extracted from A.Let P = P[1] | P[2] | ... | P[n].For i = 1, ... , mQ[i] = LSB(8, MSB(8*i, P))Housley & Dworkin Informational [Page 5]5. Algorithm IdentifiersSome security protocols employ ASN.1 [X.680] and employ algorithmidentifiers to name cryptographic algorithms. To support theseprotocols, the AES Key Wrap with Padding algorithm has been assigned the following algorithm identifiers, one for each AES KEK size. The AES Key Wrap (without padding) algorithm identifiers are alsoincluded here for convenience.aes OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16)us(840) organization(1) gov(101) csor(3)nistAlgorithm(4) 1 }id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 }id-aes128-wrap-pad OBJECT IDENTIFIER ::= { aes 8 }id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 }id-aes192-wrap-pad OBJECT IDENTIFIER ::= { aes 28 }id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 }id-aes256-wrap-pad OBJECT IDENTIFIER ::= { aes 48 }In all cases, the AlgorithmIdentifier parameter field MUST be absent.6. Padded Key Wrap ExamplesThe examples in this section were generated using the index-basedimplementation of the AES Key Wrap algorithm along with the paddingapproach specified in Section 4 of this document. All values areshown in hexadecimal.The first example wraps 20 octets of key data with a 192-bit KEK.KEK : 5840df6e29b02af1 ab493b705bf16ea1 ae8338f4dcc176a8Key : c37b7e6492584340 bed1220780894115 5068f738Wrap : 138bdeaa9b8fa7fc 61f97742e72248ee 5ae6ae5360d1ae6a: 5f54f373fa543b6aThe second example wraps 7 octets of key data with a 192-bit KEK.KEK : 5840df6e29b02af1 ab493b705bf16ea1 ae8338f4dcc176a8Key : 466f7250617369Wrap : afbeb0f07dfbf541 9200f2ccb50bb24fHousley & Dworkin Informational [Page 6]7. Security ConsiderationsImplementations must protect the key-encryption key (KEK).Compromise of the KEK may result in the disclosure of all keys thathave been wrapped with the KEK, which may lead to the compromise ofall traffic protected with those wrapped keys.The KEK must be at least as good as the keying material it isprotecting.If the KEK and wrapped key are associated with differentcryptographic algorithms, the effective security provided to dataprotected with the wrapped key is determined by the weaker of the two algorithms. If, for example, data is encrypted with 128-bit AES and that AES key is wrapped with a 256-bit AES key, then at most 128 bits of protection is provided to the data. If, for another example, a128-bit AES key is used to wrap a 4096-bit RSA private key, then atmost 128 bits of protection is provided to any data that depends onthat private key. Thus, implementers must ensure that key-encryption algorithms are at least as strong as other cryptographic algorithmsemployed in an overall system.The AES Key Wrap and the AES Key Wrap with Padding algorithms usedifferent constants in the initial value. The use of differentvalues ensures that the recipient of padded key data cannotsuccessfully unwrap it as unpadded key data, or vice versa. Thisremains true when the key data is wrapped using the AES Key Wrap with Padding algorithm but no padding is needed.The AES Key Wrap with Padding algorithm provides almost the sameamount of integrity protection as the AES Key Wrap algorithm.A previous padding technique was specified for wrapping HashedMessage Authentication Code (HMAC) keys with AES [OLD-KW]. Thetechnique in this document is more general; the technique in thisdocument is not limited to wrapping HMAC keys.In the design of some high assurance cryptographic modules, it isdesirable to segregate cryptographic keying material from other data. The use of a specific cryptographic mechanism solely for theprotection of cryptographic keying material can assist in this goal. The AES Key Wrap and the AES Key Wrap with Padding are suchmechanisms. System designers should not use these algorithms toencrypt anything other than cryptographic keying material.Housley & Dworkin Informational [Page 7]8. References8.1. Normative References[AES] National Institute of Standards and Technology, FIPS Pub197: Advanced Encryption Standard (AES), 26 November 2001. [AES-KW1] National Institute of Standards and Technology, AES KeyWrap Specification, 17 November 2001./groups/ST/toolkit/documents/kms/AES_key_wrap.pdf[AES-KW2] Schaad, J. and R. Housley, "Advanced Encryption Standard(AES) Key Wrap Algorithm", RFC 3394, September 2002.[Modes] Dworkin, M., "Recommendation for Block Cipher Modes ofOperation -- Methods and Techniques", NIST SpecialPublication 800-38A, 2001.[X.680] ITU-T Recommendation X.680 (2002) | ISO/IEC 8824-1:2002,Information technology - Abstract Syntax Notation One(ASN.1): Specification of basic notation.8.2. Informative References[AES-CMS] Schaad, J., "Use of the Advanced Encryption Standard (AES) Encryption Algorithm in Cryptographic Message Syntax(CMS)", RFC 3565, July 2003.[CMS-ASN] Schaad, J. and P. Hoffman, "New ASN.1 Modules for CMS andS/MIME", Work in Progress, August 2009.[OLD-KW] Schaad, J. and R. Housley, "Wrapping a Hashed MessageAuthentication Code (HMAC) key with a Triple-DataEncryption Standard (DES) Key or an Advanced EncryptionStandard (AES) Key", RFC 3537, May 2003.[X.681] ITU-T Recommendation X.681 (2002) | ISO/IEC 8824-2:2002,Information Technology - Abstract Syntax Notation One:Information Object Specification.[X.682] ITU-T Recommendation X.682 (2002) | ISO/IEC 8824-3:2002,Information Technology - Abstract Syntax Notation One:Constraint Specification.[X.683] ITU-T Recommendation X.683 (2002) | ISO/IEC 8824-4:2002,Information Technology - Abstract Syntax Notation One:Parameterization of ASN.1 Specifications.Housley & Dworkin Informational [Page 8]9. AcknowledgmentsPaul Timmel should be credited with the MLI and padding techniquedescribed in this document.Housley & Dworkin Informational [Page 9]Appendix A. ASN.1 ModulesThis appendix includes two ASN.1 modules. The first one makes use of the 1988 syntax, and the second one makes use of the 2002 ASN.1syntax.Appendix A.1 provides the normative ASN.1 definitions for thealgorithm identifiers included in this specification using ASN.1 asdefined in [X.680] using the 1988 ASN.1 syntax.Appendix A.2 provides informative ASN.1 definitions for the algorithm identifiers included in this specification using ASN.1 as defined in [X.680], [X.681], [X.682], and [X.683] using the 2002 ASN.1 syntax.This appendix contains the same information as Appendix A.1; however, Appendix A.1 takes precedence in case of conflict. The contentencryption and key wrap algorithm objects are defined in [CMS-ASN].The id-aes128-wrap, id-aes192-wrap, and id-aes256-wrap algorithmidentifiers are defined in [AES-CMS].A.1. 1988 ASN.1 ModuleAESKeyWrapWithPad-88 { iso(1) member-body(2) us(840) rsadsi(113549)pkcs(1) pkcs-9(9) smime(16) modules(0) 47 }DEFINITIONS IMPLICIT TAGS ::=BEGIN-- EXPORTS ALL ---- IMPORTS NONE ---- AES information object identifiers --aes OBJECT IDENTIFIER ::= {joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101)csor(3) nistAlgorithms(4) 1 }-- AES Key Wrap With Padding Algorithm Identifiers are to be used-- with the Parameter field absentid-aes128-wrap-pad OBJECT IDENTIFIER ::= { aes 8 }id-aes192-wrap-pad OBJECT IDENTIFIER ::= { aes 28 }id-aes256-wrap-pad OBJECT IDENTIFIER ::= { aes 48 }ENDHousley & Dworkin Informational [Page 10]A.2. 2002 ASN.1 ModuleAESKeyWrapWithPad-02 { iso(1) member-body(2) us(840) rsadsi(113549)pkcs(1) pkcs-9(9) smime(16) modules(0) 48 }DEFINITIONS IMPLICIT TAGS ::=BEGIN-- EXPORTS ALL --IMPORTSAlgorithmIdentifier{}, CONTENT-ENCRYPTION, KEY-WRAP, SMIME-CAPSFROM AlgorithmInformation-2009 -- [CMS-ASN]{ iso(1) identified-organization(3) dod(6) internet(1)security(5) mechanisms(5) pkix(7) id-mod(0)id-mod-algorithmInformation-02(58) };AES-ContentEncryption CONTENT-ENCRYPTION ::= {cea-aes128-wrap-pad |cea-aes192-wrap-pad |cea-aes256-wrap-pad,... }AES-KeyWrap KEY-WRAP ::= {kwa-aes128-wrap-pad |kwa-aes192-wrap-pad |kwa-aes256-wrap-pad,... }SMimeCaps SMIME-CAPS ::= {cea-aes128-wrap-pad.&smimeCaps |cea-aes192-wrap-pad.&smimeCaps |cea-aes256-wrap-pad.&smimeCaps |kwa-aes128-wrap-pad.&smimeCaps |kwa-aes192-wrap-pad.&smimeCaps |kwa-aes256-wrap-pad.&smimeCaps,... }-- AES object identifieraes OBJECT IDENTIFIER ::= {joint-iso-itu-t(2) country(16) us(840) organization(1)gov(101) csor(3) nistAlgorithms(4) 1 }Housley & Dworkin Informational [Page 11]-- Content Encryption Algorithmscea-aes128-wrap-pad CONTENT-ENCRYPTION ::= {IDENTIFIER id-aes128-wrap-padPARAMS ARE absentSMIME-CAPS { IDENTIFIED BY id-aes128-wrap-pad } }cea-aes192-wrap-pad CONTENT-ENCRYPTION ::= {IDENTIFIER id-aes192-wrap-padPARAMS ARE absentSMIME-CAPS { IDENTIFIED BY id-aes192-wrap-pad } }cea-aes256-wrap-pad CONTENT-ENCRYPTION ::= {IDENTIFIER id-aes256-wrap-padPARAMS ARE absentSMIME-CAPS { IDENTIFIED BY id-aes256-wrap-pad } }-- Key Wrap Algorithmskwa-aes128-wrap-pad KEY-WRAP ::= {IDENTIFIER id-aes128-wrap-padPARAMS ARE absentSMIME-CAPS { IDENTIFIED BY id-aes128-wrap-pad } }id-aes128-wrap-pad OBJECT IDENTIFIER ::= { aes 8 }kwa-aes192-wrap-pad KEY-WRAP ::= {IDENTIFIER id-aes192-wrap-padPARAMS ARE absentSMIME-CAPS { IDENTIFIED BY id-aes192-wrap-pad } }id-aes192-wrap-pad OBJECT IDENTIFIER ::= { aes 28 }kwa-aes256-wrap-pad KEY-WRAP ::= {IDENTIFIER id-aes256-wrap-padPARAMS ARE absentSMIME-CAPS { IDENTIFIED BY id-aes256-wrap-pad } }id-aes256-wrap-pad OBJECT IDENTIFIER ::= { aes 48 }ENDHousley & Dworkin Informational [Page 12]Authors’ AddressesRussell HousleyVigil Security, LLC918 Spring Knoll DriveHerndon, VA 20170USAEMail: housley@Morris DworkinNational Institute of Standards and Technology100 Bureau Drive, Mail Stop 8930Gaithersburg, MD 20899-8930USAEMail: dworkin@Housley & Dworkin Informational [Page 13]。
中国移动无线局域网(WLAN) AP、AC设备技术要求
中国移动无线局域网(W L A N)A P、A C设备技术要求C M C C W L A N A P A C E q u i p m e n t S p e c i f i c a t i o n目录前言 ............................................................................................................................................ I V1.范围 (1)2.规范性引用文件 (1)3.术语、定义和缩略语 (3)4.设备在网络中的位置 (5)5. AP设备硬件要求 (6)5.1 收发通路数目 (6)5.2 MIMO制式 (6)5.3 工作频段 (6)5.4 天线频段要求 (6)5.5 发射功率设置 (6)5.6 功耗 (6)5.7 供电方式 (7)5.8 电压范围 (7)5.9 无线回传 (7)5.10 传输接口 (7)5.11 射频接口 (7)5.12 体积和重量 (8)5.13 防尘防水等级 (8)5.14 室外型设计要求 (8)5.15 平均故障间隔时间 (8)5.16 可用度 (8)5.17 设备稳定性要求 (8)5.18 接地 (8)5.19 温度湿度 (8)5.20 安装方式 (9)5.21 大气压力 (9)5.22 抗风强度 (9)5.23 防雷 (9)5.24 接地 (9)5.25 安全性能 (9)5.26 抗震性能 (9)5.27 电磁兼容性能 (9)5.28 过压过流保护 (9)5.29 防电涌破坏 (10)5.30 绝缘电阻 (10)5.31 三防要求 (10)6. AP设备功能要求 (10)6.1 设备编号支持 (10)6.2 负载均衡支持能力(仅瘦AP) (10)6.3 切换支持能力 (11)6.4 自动频点设置能力(抗干扰) (11)6.6 IPv4/v6支持能力 (11)6.7 IP地址设置(适用于IPv4及IPv6) (11)6.8 安全要求 (12)6.9 AC发现方式(仅瘦AP) (12)6.10 业务转发方式(仅瘦AP) (12)6.11 上行链路完整性检测功能 (13)6.12 802.11n功能 (13)6.13 支持的协议 (13)6.14 接入控制 (13)6.15 用户隔离功能 (14)6.16 自适应动态速率控制 (14)6.17 VLAN支持能力 (14)6.18 QoS支持能力 (14)6.19 带宽控制 (15)6.20 话音准入控制 (15)6.21 网管功能 (15)6.22 同步要求 (15)6.23 证书要求 (15)7. AP设备性能要求 (16)7.1 吞吐量 (16)7.2 多用户容量 (16)7.3 切换要求 (16)7.4 覆盖范围 (17)7.5 数据速率 (17)8. AP设备接口要求 (18)9. AP设备无线技术要求 (18)9.1 工作频段和信道 (18)9.2 发射机射频指标 (19)9.2.1 发射功率 (19)9.2.2 发射功率动态范围 (20)9.2.3 频率容限 (20)9.2.4 EVM (20)9.2.5 占用带宽 (21)9.2.6 杂散发射 (21)9.2.7 频谱模板 (23)9.3 接收机射频指标 (25)9.3.1 接收机灵敏度 (25)9.3.2 接收机最大接收电平 (27)9.3.3 接收机邻道抑制比 (27)9.3.4 接收机阻塞 (28)10. AC设备硬件要求 (29)10.1 AC硬件总体要求 (29)10.2 物理接口要求 (30)11. AC设备功能要求 (30)11.1 胖架构AC要求 (30)11.1.1 基本功能要求 (30)11.1.2 用户接入功能要求 (32)11.2 瘦架构AC的要求 (36)11.2.1 用户接入功能要求 (36)11.2.2 无线控制功能要求 (37)12. AC设备性能要求 (41)12.1 无线控制要求 (41)12.2 接入控制要求 (41)12.3 同步要求 (42)12.4 可靠性要求 (42)12.5 可用性要求 (42)13. AC设备接口要求 (42)14. AC设备环境要求 (43)14.1 电源 (43)14.2 接地 (43)14.3 温度 (43)14.4 湿度 (43)15.编制历史 (43)附录A AC向WLAN客户端推送界面要求 (44)附录B 国际漫游客户端对AC与一级Portal的接口要求 (45)前言本技术要求包括的主要内容,或修订的主要内容。
ONVIF20协议中文原版
协议原版目录1 范围 ................................................................................................................. 错误!未定义书签。
2 引用标准 ......................................................................................................... 错误!未定义书签。
3 术语与定义 ..................................................................................................... 错误!未定义书签。
定义 ..................................................................................................................... 错误!未定义书签。
缩写....................................................................................................................... 错误!未定义书签。
4 概述................................................................................................................. 错误!未定义书签。
W EB 服务............................................................................................................. 错误!未定义书签。
rfc3394.Advanced Encryption Standard (AES) Key Wrap Algorithm
Network Working Group J. Schaad Request for Comments: 3394 Soaring Hawk Consulting Category: Informational R. Housley RSA Laboratories September 2002 Advanced Encryption Standard (AES) Key Wrap AlgorithmStatus of this MemoThis memo provides information for the Internet community. It doesnot specify an Internet standard of any kind. Distribution of thismemo is unlimited.Copyright NoticeCopyright (C) The Internet Society (2002). All Rights Reserved.AbstractThe purpose of this document is to make the Advanced EncryptionStandard (AES) Key Wrap algorithm conveniently available to theInternet community. The United States of America has adopted AES as the new encryption standard. The AES Key Wrap algorithm willprobably be adopted by the USA for encryption of AES keys. Theauthors took most of the text in this document from the draft AES Key Wrap posted by NIST.Table of Contents1. Introduction (2)2. Overview (2)2.1 Notation and Definitions (3)2.2 Algorithms (4)2.2.1 Key Wrap (4)2.2.2 Key Unwrap (5)2.2.3 Key Data Integrity -- the Initial Value (6)2.2.3.1 Default Initial Value (7)2.2.3.2 Alternative Initial Values (7)3. Object Identifiers (8)4. Test Vectors (8)4.1 Wrap 128 bits of Key Data with a 128-bit KEK (8)4.2 Wrap 128 bits of Key Data with a 192-bit KEK (11)4.3 Wrap 128 bits of Key Data with a 256-bit KEK (14)4.4 Wrap 192 bits of Key Data with a 192-bit KEK (17)4.5 Wrap 192 bits of Key Data with a 256-bit KEK (24)4.6 Wrap 256 bits of Key Data with a 256-bit KEK (30)Schaad & Housley Informational [Page 1]5. Security Considerations (39)6. References (39)7. Acknowledgments (39)8. Authors’ Addresses (39)9. Full Copyright Statement (40)1. IntroductionNOTE: Most of the following text is taken from [AES-WRAP], and theassertions regarding the security of the AES Key Wrap algorithm aremade by the US Government, not by the authors of this document.This specification is intended to satisfy the National Institute ofStandards and Technology (NIST) Key Wrap requirement to: Design acryptographic algorithm called a Key Wrap that uses the AdvancedEncryption Standard (AES) as a primitive to securely encryptplaintext key(s) with any associated integrity information and data, such that the combination could be longer than the width of the AESblock size (128-bits). Each ciphertext bit should be a highly non-linear function of each plaintext bit, and (when unwrapping) eachplaintext bit should be a highly non-linear function of eachciphertext bit. It is sufficient to approximate an idealpseudorandom permutation to the degree that exploitation ofundesirable phenomena is as unlikely as guessing the AES engine key. This key wrap algorithm needs to provide ample security to protectkeys in the context of prudently designed key managementarchitecture.Throughout this document, any data being wrapped will be referred to as the key data. It makes no difference to the algorithm whether the data being wrapped is a key; in fact there is often good reason toinclude other data with the key, to wrap multiple keys together, orto wrap data that isn’t strictly a key. So, the term "key data" isused broadly to mean any data being wrapped, but particularly keys,since this is primarily a key wrap algorithm. The key used to do the wrapping will be referred to as the key-encryption key (KEK).In this document a KEK can be any valid key supported by the AEScodebook. That is, a KEK can be a 128-bit key, a 192-bit key, or a256-bit key.2. OverviewThe AES key wrap algorithm is designed to wrap or encrypt key data.The key wrap operates on blocks of 64 bits. Before being wrapped,the key data is parsed into n blocks of 64 bits.Schaad & Housley Informational [Page 2]The only restriction the key wrap algorithm places on n is that n beat least two. (For key data with length less than or equal to 64bits, the constant field used in this specification and the key dataform a single 128-bit codebook input making this key wrapunnecessary.) The key wrap algorithm accommodates all supported AESkey sizes. However, other cryptographic values often need to bewrapped. One such value is the seed of the random number generatorfor DSS. This seed value requires n to be greater than four.Undoubtedly other values require this type of protection. Therefore,no upper bound is imposed on n.The AES key wrap can be configured to use any of the three key sizessupported by the AES codebook. The choice of a key size affects theoverall security provided by the key wrap, but it does not alter thedescription of the key wrap algorithm. Therefore, in the description that follows, the key wrap is described generically; no key size isspecified for the KEK.2.1 Notation and DefinitionsThe following notation is used in the description of the key wrapping algorithms:AES(K, W) Encrypt W using the AES codebook with key KAES-1(K, W) Decrypt W using the AES codebook with key KMSB(j, W) Return the most significant j bits of WLSB(j, W) Return the least significant j bits of WB1 ^ B2 The bitwise exclusive or (XOR) of B1 and B2B1 | B2 Concatenate B1 and B2K The key-encryption key Kn The number of 64-bit key data blockss The number of steps in the wrapping process, s = 6nP[i] The ith plaintext key data blockC[i] The ith ciphertext data blockA The 64-bit integrity check registerR[i] An array of 64-bit registers wherei = 0, 1, 2, ..., nA[t], R[i][t] The contents of registers A and R[i] after encryption step t.IV The 64-bit initial value used during the wrappingprocess.In the key wrap algorithm, the concatenation function will be used to concatenate 64-bit quantities to form the 128-bit input to the AEScodebook. The extraction functions will be used to split the 128-bit output from the AES codebook into two 64-bit quantities.Schaad & Housley Informational [Page 3]2.2 AlgorithmsThe specification of the key wrap algorithm requires the use of theAES codebook [AES]. The next three sections will describe the keywrap algorithm, the key unwrap algorithm, and the inherent dataintegrity check.2.2.1 Key WrapThe inputs to the key wrapping process are the KEK and the plaintext to be wrapped. The plaintext consists of n 64-bit blocks, containing the key data being wrapped. The key wrapping process is describedbelow.Inputs: Plaintext, n 64-bit values {P1, P2, ..., Pn}, andKey, K (the KEK).Outputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}.1) Initialize variables.Set A0 to an initial value (see 2.2.3)For i = 1 to nR[0][i] = P[i]2) Calculate intermediate values.For t = 1 to s, where s = 6nA[t] = MSB(64, AES(K, A[t-1] | R[t-1][1])) ^ tFor i = 1 to n-1R[t][i] = R[t-1][i+1]R[t][n] = LSB(64, AES(K, A[t-1] | R[t-1][1]))3) Output the results.Set C[0] = A[t]For i = 1 to nC[i] = R[t][i]An alternative description of the key wrap algorithm involvesindexing rather than shifting. This approach allows one to calculate the wrapped key in place, avoiding the rotation in the previousdescription. This produces identical results and is more easilyimplemented in software.Schaad & Housley Informational [Page 4]Inputs: Plaintext, n 64-bit values {P1, P2, ..., Pn}, andKey, K (the KEK).Outputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}.1) Initialize variables.Set A = IV, an initial value (see 2.2.3)For i = 1 to nR[i] = P[i]2) Calculate intermediate values.For j = 0 to 5For i=1 to nB = AES(K, A | R[i])A = MSB(64, B) ^ t where t = (n*j)+iR[i] = LSB(64, B)3) Output the results.Set C[0] = AFor i = 1 to nC[i] = R[i]2.2.2 Key UnwrapThe inputs to the unwrap process are the KEK and (n+1) 64-bit blocks of ciphertext consisting of previously wrapped key. It returns nblocks of plaintext consisting of the n 64-bit blocks of thedecrypted key data.Inputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}, andKey, K (the KEK).Outputs: Plaintext, n 64-bit values {P1, P2, ..., Pn}.1) Initialize variables.Set A[s] = C[0] where s = 6nFor i = 1 to nR[s][i] = C[i]2) Calculate the intermediate values.For t = s to 1A[t-1] = MSB(64, AES-1(K, ((A[t] ^ t) | R[t][n]))R[t-1][1] = LSB(64, AES-1(K, ((A[t]^t) | R[t][n]))For i = 2 to nR[t-1][i] = R[t][i-1]Schaad & Housley Informational [Page 5]3) Output the results.If A[0] is an appropriate initial value (see 2.2.3),ThenFor i = 1 to nP[i] = R[0][i]ElseReturn an errorThe unwrap algorithm can also be specified as an index basedoperation, allowing the calculations to be carried out in place.Again, this produces the same results as the register shiftingapproach.Inputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}, andKey, K (the KEK).Outputs: Plaintext, n 64-bit values {P0, P1, K, Pn}.1) Initialize variables.Set A = C[0]For i = 1 to nR[i] = C[i]2) Compute intermediate values.For j = 5 to 0For i = n to 1B = AES-1(K, (A ^ t) | R[i]) where t = n*j+iA = MSB(64, B)R[i] = LSB(64, B)3) Output results.If A is an appropriate initial value (see 2.2.3),ThenFor i = 1 to nP[i] = R[i]ElseReturn an error2.2.3 Key Data Integrity -- the Initial ValueThe initial value (IV) refers to the value assigned to A[0] in thefirst step of the wrapping process. This value is used to obtain an integrity check on the key data. In the final step of the unwrapping process, the recovered value of A[0] is compared to the expected Schaad & Housley Informational [Page 6]value of A[0]. If there is a match, the key is accepted as valid,and the unwrapping algorithm returns it. If there is not a match,then the key is rejected, and the unwrapping algorithm returns anerror.The exact properties achieved by this integrity check depend on thedefinition of the initial value. Different applications may call for somewhat different properties; for example, whether there is need to determine the integrity of key data throughout its lifecycle or just when it is unwrapped. This specification defines a default initialvalue that supports integrity of the key data during the period it is wrapped (2.2.3.1). Provision is also made to support alternativeinitial values (in 2.2.3.2).2.2.3.1 Default Initial ValueThe default initial value (IV) is defined to be the hexadecimalconstant:A[0] = IV = A6A6A6A6A6A6A6A6The use of a constant as the IV supports a strong integrity check on the key data during the period that it is wrapped. If unwrappingproduces A[0] = A6A6A6A6A6A6A6A6, then the chance that the key datais corrupt is 2^-64. If unwrapping produces A[0] any other value,then the unwrap must return an error and not return any key data.2.2.3.2 Alternative Initial ValuesWhen the key wrap is used as part of a larger key management protocol or system, the desired scope for data integrity may be more than just the key data or the desired duration for more than just the periodthat it is wrapped. Also, if the key data is not just an AES key, it may not always be a multiple of 64 bits. Alternative definitions of the initial value can be used to address such problems. NIST willdefine alternative initial values in future key managementpublications as needed. In order to accommodate a set ofalternatives that may evolve over time, key wrap implementations that are not application-specific will require some flexibility in the way that the initial value is set and tested.Schaad & Housley Informational [Page 7]3. Object IdentifiersNIST has assigned the following object identifiers to identify thekey wrap algorithm with the default initial value specified in2.2.3.1. One object identifier is assigned for use with each of the KEK AES key sizes.aes OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16)us(840) organization(1) gov(101) csor(3) nistAlgorithm(4) 1 } id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 }id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 }id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 }4. Test VectorsThe examples in this section were generated using the index-basedimplementation of the key wrap algorithm. The use of this approachallows a straightforward software implementation of the key wrapalgorithm.4.1 Wrap 128 bits of Key Data with a 128-bit KEKInput:KEK: 000102030405060708090A0B0C0D0E0FKey Data: 00112233445566778899AABBCCDDEEFFWrap:Step t A R1 R21In A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFEnc F4740052E82A2251 74CE86FBD7B805E7 8899AABBCCDDEEFFXorT F4740052E82A2250 74CE86FBD7B805E7 8899AABBCCDDEEFF2In F4740052E82A2250 74CE86FBD7B805E7 8899AABBCCDDEEFFEnc 06BA4EBDE7768D0B 74CE86FBD7B805E7 D132EE38147E76F8XorT 06BA4EBDE7768D09 74CE86FBD7B805E7 D132EE38147E76F83In 06BA4EBDE7768D09 74CE86FBD7B805E7 D132EE38147E76F8Enc FC967627BE937208 FE6E8D679C5D3460 D132EE38147E76F8XorT FC967627BE93720B FE6E8D679C5D3460 D132EE38147E76F8Schaad & Housley Informational [Page 8]4In FC967627BE93720B FE6E8D679C5D3460 D132EE38147E76F8Enc 5896EA9028EE203B FE6E8D679C5D3460 07B2BD973E36A6FCXorT 5896EA9028EE203F FE6E8D679C5D3460 07B2BD973E36A6FC5In 5896EA9028EE203F FE6E8D679C5D3460 07B2BD973E36A6FCEnc 93AEA71B258D90C3 25F5A3ADC2195401 07B2BD973E36A6FCXorT 93AEA71B258D90C6 25F5A3ADC2195401 07B2BD973E36A6FC6In 93AEA71B258D90C6 25F5A3ADC2195401 07B2BD973E36A6FCEnc E3EE986344D878F7 25F5A3ADC2195401 F14863BB1E9CA90AXorT E3EE986344D878F1 25F5A3ADC2195401 F14863BB1E9CA90A7In E3EE986344D878F1 25F5A3ADC2195401 F14863BB1E9CA90AEnc 2BFC21B2C20E4006 B556D35ED8CEF052 F14863BB1E9CA90AXorT 2BFC21B2C20E4001 B556D35ED8CEF052 F14863BB1E9CA90A8In 2BFC21B2C20E4001 B556D35ED8CEF052 F14863BB1E9CA90AEnc 4BE8CE99C0A43A7D B556D35ED8CEF052 64BAE5818D0570BBXorT 4BE8CE99C0A43A75 B556D35ED8CEF052 64BAE5818D0570BB9In 4BE8CE99C0A43A75 B556D35ED8CEF052 64BAE5818D0570BBEnc EBE1CE91067024F3 BE114B343EB00981 64BAE5818D0570BBXorT EBE1CE91067024FA BE114B343EB00981 64BAE5818D0570BB10In EBE1CE91067024FA BE114B343EB00981 64BAE5818D0570BBEnc 5A9C7B1F5B1C3B46 BE114B343EB00981 4FD3D2B7D74FBB42XorT 5A9C7B1F5B1C3B4C BE114B343EB00981 4FD3D2B7D74FBB4211In 5A9C7B1F5B1C3B4C BE114B343EB00981 4FD3D2B7D74FBB42Enc 93B71967EED41FFC AEF34BD8FB5A7B82 4FD3D2B7D74FBB42XorT 93B71967EED41FF7 AEF34BD8FB5A7B82 4FD3D2B7D74FBB4212In 93B71967EED41FF7 AEF34BD8FB5A7B82 4FD3D2B7D74FBB42Enc 1FA68B0A8112B44B AEF34BD8FB5A7B82 9D3E862371D2CFE5XorT 1FA68B0A8112B447 AEF34BD8FB5A7B82 9D3E862371D2CFE5Output:Ciphertext: 1FA68B0A8112B447 AEF34BD8FB5A7B82 9D3E862371D2CFE5 Schaad & Housley Informational [Page 9]Unwrap:Step t A R1 R212In 1FA68B0A8112B447 AEF34BD8FB5A7B82 9D3E862371D2CFE5XorT 1FA68B0A8112B44B AEF34BD8FB5A7B82 9D3E862371D2CFE5Dec 93B71967EED41FF7 AEF34BD8FB5A7B82 4FD3D2B7D74FBB4211In 93B71967EED41FF7 AEF34BD8FB5A7B82 4FD3D2B7D74FBB42XorT 93B71967EED41FFC AEF34BD8FB5A7B82 4FD3D2B7D74FBB42Dec 5A9C7B1F5B1C3B4C BE114B343EB00981 4FD3D2B7D74FBB4210In 5A9C7B1F5B1C3B4C BE114B343EB00981 4FD3D2B7D74FBB42XorT 5A9C7B1F5B1C3B46 BE114B343EB00981 4FD3D2B7D74FBB42Dec EBE1CE91067024FA BE114B343EB00981 64BAE5818D0570BB9In EBE1CE91067024FA BE114B343EB00981 64BAE5818D0570BBXorT EBE1CE91067024F3 BE114B343EB00981 64BAE5818D0570BBDec 4BE8CE99C0A43A75 B556D35ED8CEF052 64BAE5818D0570BB8In 4BE8CE99C0A43A75 B556D35ED8CEF052 64BAE5818D0570BBXorT 4BE8CE99C0A43A7D B556D35ED8CEF052 64BAE5818D0570BBDec 2BFC21B2C20E4001 B556D35ED8CEF052 F14863BB1E9CA90A7In 2BFC21B2C20E4001 B556D35ED8CEF052 F14863BB1E9CA90AXorT 2BFC21B2C20E4006 B556D35ED8CEF052 F14863BB1E9CA90ADec E3EE986344D878F1 25F5A3ADC2195401 F14863BB1E9CA90A6In E3EE986344D878F1 25F5A3ADC2195401 F14863BB1E9CA90AXorT E3EE986344D878F7 25F5A3ADC2195401 F14863BB1E9CA90ADec 93AEA71B258D90C6 25F5A3ADC2195401 07B2BD973E36A6FC5In 93AEA71B258D90C6 25F5A3ADC2195401 07B2BD973E36A6FCXorT 93AEA71B258D90C3 25F5A3ADC2195401 07B2BD973E36A6FCDec 5896EA9028EE203F FE6E8D679C5D3460 07B2BD973E36A6FC4In 5896EA9028EE203F FE6E8D679C5D3460 07B2BD973E36A6FCXorT 5896EA9028EE203B FE6E8D679C5D3460 07B2BD973E36A6FCDec FC967627BE93720B FE6E8D679C5D3460 D132EE38147E76F8Schaad & Housley Informational [Page 10]In FC967627BE93720B FE6E8D679C5D3460 D132EE38147E76F8XorT FC967627BE937208 FE6E8D679C5D3460 D132EE38147E76F8Dec 06BA4EBDE7768D09 74CE86FBD7B805E7 D132EE38147E76F82In 06BA4EBDE7768D09 74CE86FBD7B805E7 D132EE38147E76F8XorT 06BA4EBDE7768D0B 74CE86FBD7B805E7 D132EE38147E76F8Dec F4740052E82A2250 74CE86FBD7B805E7 8899AABBCCDDEEFF1In F4740052E82A2250 74CE86FBD7B805E7 8899AABBCCDDEEFFXorT F4740052E82A2251 74CE86FBD7B805E7 8899AABBCCDDEEFFDec A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFPlaintext A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFOutput:Key Data: 00112233445566778899AABBCCDDEEFF4.2 Wrap 128 bits of Key Data with a 192-bit KEKInput:KEK: 000102030405060708090A0B0C0D0E0F1011121314151617Key Data: 00112233445566778899AABBCCDDEEFFWrap:Step t A R1 R21In A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFEnc DFE8FD5D1A3786A7 351D385096CCFB29 8899AABBCCDDEEFFXorT DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF2In DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFFEnc 9D9B32B9ED742E02 351D385096CCFB29 51F22F3286758A2DXorT 9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D3In 9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2DEnc 7B8E343CA51CF8AB BC164F51E20CC983 51F22F3286758A2DXorT 7B8E343CA51CF8A8 BC164F51E20CC983 51F22F3286758A2D4In 7B8E343CA51CF8A8 BC164F51E20CC983 51F22F3286758A2DEnc 02A97C5897140595 BC164F51E20CC983 05FC2D8F8FF4B919XorT 02A97C5897140591 BC164F51E20CC983 05FC2D8F8FF4B919Schaad & Housley Informational [Page 11]In 02A97C5897140591 BC164F51E20CC983 05FC2D8F8FF4B919Enc 15D4B63F66583817 429487269D3A0016 05FC2D8F8FF4B919XorT 15D4B63F66583812 429487269D3A0016 05FC2D8F8FF4B9196In 15D4B63F66583812 429487269D3A0016 05FC2D8F8FF4B919Enc AE2D0B76A6951EEA 429487269D3A0016 05A2D8FB4DD5BD7AXorT AE2D0B76A6951EEC 429487269D3A0016 05A2D8FB4DD5BD7A7In AE2D0B76A6951EEC 429487269D3A0016 05A2D8FB4DD5BD7AEnc 79F849444F4B8AA8 D40B091CDBAC0340 05A2D8FB4DD5BD7AXorT 79F849444F4B8AAF D40B091CDBAC0340 05A2D8FB4DD5BD7A8In 79F849444F4B8AAF D40B091CDBAC0340 05A2D8FB4DD5BD7AEnc 5933A9195B5F5E21 D40B091CDBAC0340 89F0D6C06F8CA9B4XorT 5933A9195B5F5E29 D40B091CDBAC0340 89F0D6C06F8CA9B49In 5933A9195B5F5E29 D40B091CDBAC0340 89F0D6C06F8CA9B4Enc 57ADA800299C2E85 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4XorT 57ADA800299C2E8C 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B410In 57ADA800299C2E8C 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4Enc BF17BD6A9BC80163 4D5B3DFE7C04ABBA EB24CCFA52EA9078XorT BF17BD6A9BC80169 4D5B3DFE7C04ABBA EB24CCFA52EA907811In BF17BD6A9BC80169 4D5B3DFE7C04ABBA EB24CCFA52EA9078Enc B68BF270AE81544F F92B5B97C050AED2 EB24CCFA52EA9078XorT B68BF270AE815444 F92B5B97C050AED2 EB24CCFA52EA907812In B68BF270AE815444 F92B5B97C050AED2 EB24CCFA52EA9078Enc 96778B25AE6CA439 F92B5B97C050AED2 468AB8A17AD84E5DXorT 96778B25AE6CA435 F92B5B97C050AED2 468AB8A17AD84E5DOutput:Ciphertext: 96778B25AE6CA435 F92B5B97C050AED2 468AB8A17AD84E5D Schaad & Housley Informational [Page 12]Unwrap:Step t A R1 R212In 96778B25AE6CA435 F92B5B97C050AED2 468AB8A17AD84E5DXorT 96778B25AE6CA439 F92B5B97C050AED2 468AB8A17AD84E5DDec B68BF270AE815444 F92B5B97C050AED2 EB24CCFA52EA907811In B68BF270AE815444 F92B5B97C050AED2 EB24CCFA52EA9078XorT B68BF270AE81544F F92B5B97C050AED2 EB24CCFA52EA9078Dec BF17BD6A9BC80169 4D5B3DFE7C04ABBA EB24CCFA52EA907810In BF17BD6A9BC80169 4D5B3DFE7C04ABBA EB24CCFA52EA9078XorT BF17BD6A9BC80163 4D5B3DFE7C04ABBA EB24CCFA52EA9078Dec 57ADA800299C2E8C 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B49In 57ADA800299C2E8C 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4XorT 57ADA800299C2E85 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4Dec 5933A9195B5F5E29 D40B091CDBAC0340 89F0D6C06F8CA9B48In 5933A9195B5F5E29 D40B091CDBAC0340 89F0D6C06F8CA9B4XorT 5933A9195B5F5E21 D40B091CDBAC0340 89F0D6C06F8CA9B4Dec 79F849444F4B8AAF D40B091CDBAC0340 05A2D8FB4DD5BD7A7In 79F849444F4B8AAF D40B091CDBAC0340 05A2D8FB4DD5BD7AXorT 79F849444F4B8AA8 D40B091CDBAC0340 05A2D8FB4DD5BD7ADec AE2D0B76A6951EEC 429487269D3A0016 05A2D8FB4DD5BD7A6In AE2D0B76A6951EEC 429487269D3A0016 05A2D8FB4DD5BD7AXorT AE2D0B76A6951EEA 429487269D3A0016 05A2D8FB4DD5BD7ADec 15D4B63F66583812 429487269D3A0016 05FC2D8F8FF4B9195In 15D4B63F66583812 429487269D3A0016 05FC2D8F8FF4B919XorT 15D4B63F66583817 429487269D3A0016 05FC2D8F8FF4B919Dec 02A97C5897140591 BC164F51E20CC983 05FC2D8F8FF4B9194In 02A97C5897140591 BC164F51E20CC983 05FC2D8F8FF4B919XorT 02A97C5897140595 BC164F51E20CC983 05FC2D8F8FF4B919Dec 7B8E343CA51CF8A8 BC164F51E20CC983 51F22F3286758A2DSchaad & Housley Informational [Page 13]3In 7B8E343CA51CF8A8 BC164F51E20CC983 51F22F3286758A2DXorT 7B8E343CA51CF8AB BC164F51E20CC983 51F22F3286758A2DDec 9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D2In 9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2DXorT 9D9B32B9ED742E02 351D385096CCFB29 51F22F3286758A2DDec DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF1In DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFFXorT DFE8FD5D1A3786A7 351D385096CCFB29 8899AABBCCDDEEFFDec A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFPlaintext A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFOutput:Key Data: 00112233445566778899AABBCCDDEEFF4.3 Wrap 128 bits of Key Data with a 256-bit KEKInput:KEK:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F Key Data: 00112233445566778899AABBCCDDEEFFWrap:Step t A R1 R21In A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFEnc 794314D454E3FDE1 F661BD9F31FBFA31 8899AABBCCDDEEFFXorT 794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF2In 794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFFEnc D450EA5C5BBCB561 F661BD9F31FBFA31 F60E0CDB7F429FE8XorT D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE83In D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8Enc 85DBDF1879D5C0A5 5602001BFA07AD8B F60E0CDB7F429FE8XorT 85DBDF1879D5C0A6 5602001BFA07AD8B F60E0CDB7F429FE8Schaad & Housley Informational [Page 14]4In 85DBDF1879D5C0A6 5602001BFA07AD8B F60E0CDB7F429FE8Enc 738C291128B7226D 5602001BFA07AD8B 58924F777C3F678CXorT 738C291128B72269 5602001BFA07AD8B 58924F777C3F678C5In 738C291128B72269 5602001BFA07AD8B 58924F777C3F678CEnc 2656A02DFFF054DC F4DF378183E3D5B2 58924F777C3F678CXorT 2656A02DFFF054D9 F4DF378183E3D5B2 58924F777C3F678C6In 2656A02DFFF054D9 F4DF378183E3D5B2 58924F777C3F678CEnc DDFD0C0E8B52A63A F4DF378183E3D5B2 91AC1D36A964F41BXorT DDFD0C0E8B52A63C F4DF378183E3D5B2 91AC1D36A964F41B7In DDFD0C0E8B52A63C F4DF378183E3D5B2 91AC1D36A964F41BEnc 39AB00D4AE4399EA 5271D5CED80F34ED 91AC1D36A964F41BXorT 39AB00D4AE4399ED 5271D5CED80F34ED 91AC1D36A964F41B8In 39AB00D4AE4399ED 5271D5CED80F34ED 91AC1D36A964F41BEnc 4CE414878463EAAC 5271D5CED80F34ED 67D8ED899E7929B8XorT 4CE414878463EAA4 5271D5CED80F34ED 67D8ED899E7929B89In 4CE414878463EAA4 5271D5CED80F34ED 67D8ED899E7929B8Enc FBB44DB106AA0789 0DF7E50829123648 67D8ED899E7929B8XorT FBB44DB106AA0780 0DF7E50829123648 67D8ED899E7929B810In FBB44DB106AA0780 0DF7E50829123648 67D8ED899E7929B8Enc 877112A7308ADCC5 0DF7E50829123648 3472D5993D318FD2XorT 877112A7308ADCCF 0DF7E50829123648 3472D5993D318FD211In 877112A7308ADCCF 0DF7E50829123648 3472D5993D318FD2Enc 78E40190807CC151 63E9777905818A2A 3472D5993D318FD2XorT 78E40190807CC15A 63E9777905818A2A 3472D5993D318FD212In 78E40190807CC15A 63E9777905818A2A 3472D5993D318FD2Enc 64E8C3F9CE0F5BAE 63E9777905818A2A 93C8191E7D6E8AE7XorT 64E8C3F9CE0F5BA2 63E9777905818A2A 93C8191E7D6E8AE7Output:Ciphertext: 64E8C3F9CE0F5BA2 63E9777905818A2A 93C8191E7D6E8AE7 Schaad & Housley Informational [Page 15]Unwrap:Step t A R1 R212In 64E8C3F9CE0F5BA2 63E9777905818A2A 93C8191E7D6E8AE7XorT 64E8C3F9CE0F5BAE 63E9777905818A2A 93C8191E7D6E8AE7Dec 78E40190807CC15A 63E9777905818A2A 3472D5993D318FD211In 78E40190807CC15A 63E9777905818A2A 3472D5993D318FD2XorT 78E40190807CC151 63E9777905818A2A 3472D5993D318FD2Dec 877112A7308ADCCF 0DF7E50829123648 3472D5993D318FD210In 877112A7308ADCCF 0DF7E50829123648 3472D5993D318FD2XorT 877112A7308ADCC5 0DF7E50829123648 3472D5993D318FD2Dec FBB44DB106AA0780 0DF7E50829123648 67D8ED899E7929B89In FBB44DB106AA0780 0DF7E50829123648 67D8ED899E7929B8XorT FBB44DB106AA0789 0DF7E50829123648 67D8ED899E7929B8Dec 4CE414878463EAA4 5271D5CED80F34ED 67D8ED899E7929B88In 4CE414878463EAA4 5271D5CED80F34ED 67D8ED899E7929B8XorT 4CE414878463EAAC 5271D5CED80F34ED 67D8ED899E7929B8Dec 39AB00D4AE4399ED 5271D5CED80F34ED 91AC1D36A964F41B7In 39AB00D4AE4399ED 5271D5CED80F34ED 91AC1D36A964F41BXorT 39AB00D4AE4399EA 5271D5CED80F34ED 91AC1D36A964F41BDec DDFD0C0E8B52A63C F4DF378183E3D5B2 91AC1D36A964F41B6In DDFD0C0E8B52A63C F4DF378183E3D5B2 91AC1D36A964F41BXorT DDFD0C0E8B52A63A F4DF378183E3D5B2 91AC1D36A964F41BDec 2656A02DFFF054D9 F4DF378183E3D5B2 58924F777C3F678C5In 2656A02DFFF054D9 F4DF378183E3D5B2 58924F777C3F678CXorT 2656A02DFFF054DC F4DF378183E3D5B2 58924F777C3F678CDec 738C291128B72269 5602001BFA07AD8B 58924F777C3F678C4In 738C291128B72269 5602001BFA07AD8B 58924F777C3F678CXorT 738C291128B7226D 5602001BFA07AD8B 58924F777C3F678CDec 85DBDF1879D5C0A6 5602001BFA07AD8B F60E0CDB7F429FE8Schaad & Housley Informational [Page 16]In 85DBDF1879D5C0A6 5602001BFA07AD8B F60E0CDB7F429FE8XorT 85DBDF1879D5C0A5 5602001BFA07AD8B F60E0CDB7F429FE8Dec D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE82In D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8XorT D450EA5C5BBCB561 F661BD9F31FBFA31 F60E0CDB7F429FE8Dec 794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF1In 794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFFXorT 794314D454E3FDE1 F661BD9F31FBFA31 8899AABBCCDDEEFFDec A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFPlaintext A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFFOutput:Key Data: 00112233445566778899AABBCCDDEEFF4.4 Wrap 192 bits of Key Data with a 192-bit KEKInput:KEK: 000102030405060708090A0B0C0D0E0F1011121314151617Key Data: 00112233445566778899AABBCCDDEEFF0001020304050607Wrap:Step t A/R3 R1 R21In A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF0001020304050607Enc DFE8FD5D1A3786A7 351D385096CCFB29 8899AABBCCDDEEFF0001020304050607XorT DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF00010203040506072In DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF0001020304050607Enc 9D9B32B9ED742E02 351D385096CCFB29 51F22F3286758A2D0001020304050607XorT 9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D0001020304050607Schaad & Housley Informational [Page 17]。
java加解密算法--常见加解密算法
java加解密算法--常见加解密算法什么是加密算法?百度百科给出的解释如下:数据加密的基本过程就是对原来为明⽂的⽂件或数据按某种算法进⾏处理,使其成为不可读的⼀段代码,通常称为“密⽂”,使其只能在输⼊相应的密钥之后才能显⽰出本来内容,通过这样的途径来达到保护数据不被⾮法⼈窃取、阅读的⽬的。
该过程的逆过程为解密,即将该编码信息转化为其原来数据的过程。
简单来说,就是把某⼀段数据(明⽂),按照“某种规则”转换成另外⼀段不可读的数据(密⽂)。
这⾥选定的“规则”,就是加密算法。
理所当然,当别⼈拿到“密⽂”,解析出“明⽂”的难度取决于加密算法的破解难度。
1. 算法种类单向加密对称加密⾮对称加密1.1 单向加密即加密之后不能解密,⼀般⽤于数据验证1) Base64Base64 编码是从⼆进制到字符的过程,⽤ 64 个字符来表⽰任意的⼆进制数据。
对于开发⼈员来说,拿到密⽂,很容易就能够解析成明⽂。
因此严格来说,Base64不能称之为加密算法,仅仅是⼀种编码⽅式。
它常常⽤于发送Http请求时对URL中参数的编码,保证不是⼀眼就看出来了这些参数的意义,或者图⽚编码传输。
转换⽅法:1 字节(byte) = 8 ⽐特位(bit)Base64 定义了 64 (2^6)个可打印字符表⽰⼆进制的⽅法,也就是说 6 个 bit 的⼆进制数据可以⽤对应的字符代替表⽰对于连续多个⼆进制数据,每 3 个字节⼀组进⾏转换,3个字节 24 bit,然后将其分为 4 部分(3×8 = 4×6),每个部分刚好 6 bit,⾼位补0,将 6 bit ⼆进制转换为 Base64 定义的字符即完成转换若⼆进制数据字节数不是 3 的倍数,Base64 就将剩下的⼆进制数据补 0 ⾄ 3 的倍数,全 0 的⽤字符 “=” 代替⽐如:我要⽤Base64编码⼀个字符串“abc”,实际算法如下:'a','b','c'的ASCII标准编码分别为(⼗进制)97,98,99,因此⽤⼆进制表⽰“abc”字符串就是:01100001,01100010,01100011 ---3组,每组8字节Base64的原理:将这三组8字节,分成4组6字节011000,010110, 001001,100011 ---4组,每组6字节⾼位补000011000,00010110, 00001001,00100011这四个⼆进制数组对应⼗进制的数值分别是:24,22,9,35,RFC2045(Base64解码表)分别为:Y,W,J,j即:"abc"经过Base64编码后,为"YWJj"。
计算机网络安全——对称加密算法DES(一)
计算机⽹络安全——对称加密算法DES(⼀)⼀、对称加密算法概念我们通过计算机⽹络传输数据时,如果⽆法防⽌他⼈窃听,可以利⽤密码学技术将发送的数据变换成对任何不知道如何做逆变换的⼈都不可理解的形式,从⽽保证了数据的机密性。
这种变换被称为加密( encryption),被加密的数据被称为密⽂( ciphertext),⽽加密前的数据被称为明⽂( plaintext)。
接收⽅必须能通过某种逆变换将密⽂重新变换回原来的明⽂,该逆变换被称为解密(decryption)。
加密和解密过程可以以⼀个密钥( key)为参数,并且加密和解密过程可以公开,⽽只有密钥需要保密。
即只有知道密钥的⼈才能解密密⽂,⽽任何⼈,即使知道加密或解密算法也⽆法解密密⽂。
加密密钥和解密密钥可以相同,也可以不同,取决于采⽤的是对称密钥密码体制还是公开密钥密码体制。
所谓对称密钥密码体制是⼀种加密密钥与解密密钥相同的密码体制。
在这种加密系统中,两个参与者共享同⼀个秘密密钥,如果⽤⼀个特定的密钥加密⼀条消息,也必须要使⽤相同的密钥来解密该消息。
该系统⼜称为对称密钥系统。
数据加密标准( Data Encryption Standard, DES)是对称密钥密码的典型代表,由IBM公司研制,于1977年被美国定为联邦信息标准。
其加密解密基本流程如下图:⼆、.NET 使⽤ DES 加密DES使⽤的密钥为64 位(实际密钥长度为56 位,有8位⽤于奇偶校验)。
密码的字节长度不能低于64位(8个字节),下⾯是实现代码:1 using System;2 using System.IO;3 using System.Linq;4 using System.Security.Cryptography;5 using System.Text;67 namespace encryption.des8 {9 /// <summary>10 /// DES 加密与解密11 /// DES加密:https:///question/3676782912 /// 加密基本知识:https:///des.html13 /// </summary>14 public class DesAlgorithm15 {16 public Encoding Encoding { get; set; }17 public PaddingMode Padding { get; set; }18 public CipherMode Mode { get; set; }19 public string PassWord { get; private set; }20 private DESCryptoServiceProvider _des;2122 #region .ctor2324 public DesAlgorithm()25 {26 _des = new DESCryptoServiceProvider();27 PassWord = Convert.ToBase64String(_des.Key);28 Encoding = Encoding.UTF8;29 Padding = PaddingMode.PKCS7;30 Mode = CipherMode.CBC;31 }32 #endregion333435 /// <summary>36 /// 通过字符串⽣成新的密钥37 /// </summary>38 /// <param name="password">密码</param>39 /// <returns></returns>40 public DESCryptoServiceProvider CreateNewkey(string password)41 {42 try43 {44 byte[] buffer = Encoding.GetBytes(password).Skip(0).Take(8).ToArray();45 _des = new DESCryptoServiceProvider()46 {47 Key = buffer,48 IV=buffer,49 };50 PassWord = password;51 return _des;52 }53 catch (Exception e)54 {55 Console.WriteLine($"Wrong Length:{e.Message},{e.InnerException}");56 return null;57 }58 }5960 /// <summary>61 /// DES加密62 /// </summary>63 /// <param name="pToEncrypt">需要加密的字符串<see cref="string"/></param>64 /// <returns></returns>65 public string Encrypt(string pToEncrypt)66 {67 byte[] inputByteArray = Encoding.GetBytes(pToEncrypt);68 return Convert.ToBase64String(this.Encrypt(inputByteArray));69 }7071 /// <summary>72 /// DES加密73 /// </summary>74 /// <param name="pToEncrypt">待加密的byte数组<see cref="byte"/></param>75 /// <returns></returns>76 public byte[] Encrypt(byte[] pToEncrypt)77 {78 byte[] base64 = null;79 using (var ms = new MemoryStream())80 {81 using (var cs = new CryptoStream(ms, _des.CreateEncryptor(), CryptoStreamMode.Write))82 {83 cs.Write(pToEncrypt, 0, pToEncrypt.Length);84 cs.FlushFinalBlock();85 }86 base64 = ms.ToArray();87 }88 return base64;89 }9091 /// <summary>92 /// DES解密93 /// </summary>94 /// <param name="pToDecrypt">需要解密的字符串</param>95 /// <returns></returns>96 public string Decrypt(string pToDecrypt)97 {98 byte[] inputByteArray = Convert.FromBase64String(pToDecrypt);99 return Encoding.GetString(this.Decrypt(inputByteArray));100 }101102 /// <summary>103 /// DES解密104 /// </summary>105 /// <param name="pToDecrypt">待解密的byte数组<see cref="byte"/></param>106 /// <returns></returns>107 public byte[] Decrypt(byte[] pToDecrypt)108 {109 byte[] data = null;110 using (var ms = new MemoryStream())111 {112 using (CryptoStream cs = new CryptoStream(ms, _des.CreateDecryptor(), CryptoStreamMode.Write))113 {114 cs.Write(pToDecrypt, 0, pToDecrypt.Length);115 cs.FlushFinalBlock();116 }117 data = ms.ToArray();118 }119 return data;120 }121 }122 }三、.NET 使⽤ 3DES 加密DES使⽤的密钥为64 位,它是⼀个优秀的密码算法,⽬前还没有发现⽐蛮⼒攻击更好的破解⽅法。
rfc中常用的测试协议
rfc中常用的测试协议摘要:1.RFC 简介2.RFC 中常用的测试协议a.网络协议测试1.网络数据包抓取和分析2.网络仿真和测试工具b.应用层协议测试1.HTTP 和HTTPS 测试2.FTP 和FTPS 测试3.SMTP 和SMTPS 测试c.安全协议测试1.TLS 和SSL 测试2.IPsec 测试d.传输协议测试1.TCP 和UDP 测试e.无线网络协议测试1.802.11 无线网络测试正文:RFC(Request for Comments)是一个用于讨论和记录互联网协议的标准文档系列。
在RFC 中,有许多常用的测试协议,这些协议用于确保互联网协议在实际应用中能够正常工作。
本文将详细介绍这些测试协议。
首先,RFC 中包含了大量的网络协议测试。
网络数据包抓取和分析是网络协议测试的基础,这对于诊断网络问题和优化网络性能至关重要。
此外,网络仿真和测试工具也是必不可少的,例如,网络模拟器(如NS-3)和测试平台(如Ixia)可以帮助工程师在实验室环境中模拟实际网络状况,从而对协议进行更严格的测试。
其次,应用层协议测试在RFC 中也占据重要地位。
HTTP 和HTTPS 是Web 应用中最常用的协议,有许多测试工具可以对它们的性能和安全性进行测试,例如,JMeter 和Locust 等负载测试工具。
此外,FTP 和FTPS、SMTP 和SMTPS 等传输协议也是常用的测试对象。
在安全协议方面,RFC 中包含了TLS 和SSL、IPsec 等协议的测试方法。
这些协议对于保护互联网数据传输的安全至关重要,因此需要进行严格的测试以确保其性能和安全性。
传输协议方面,TCP 和UDP 是互联网中最常用的传输协议,它们的测试方法也是RFC 中的重要内容。
TCP 测试关注可靠性和流量控制等方面,而UDP 测试则更注重数据传输速率和丢包率等指标。
最后,无线网络协议测试在RFC 中也有一定的比重。
例如,802.11 无线网络测试是评估无线局域网性能的关键。
CAPWAP协议的介绍(五).
CAPWAP Join Operations
Join Request 在与AC建立DTLS连接之后,WTP使用Join Request来向一个 AC请求服务 Join Response AC使用Join Response告知WTP是否会向其提供服务
返回
Control Channel Management
AC用于请求WTP将自己的配臵恢复至出厂默认值 Clear Configuration Response WTP恢复出厂默认值后,发送给AC的确认。
返回
Device Management Operations(可选)
Image Data Request 在WTP和AC之间交换,用于WTP下载一个新的firmware Image Data Response 响应Image Data Response Reset Request 要求WTP进行重启。 Reset Response 响应Reset Request WTP Event Request WTP用来发送信息给AC。WTP Event Request可能是阶段性发送,或者 是作为一个WTP同步事件的响应。 WTP Event Response 响应WTP Event Request Data Transfer Request 将WTP上的调试信息发送给AC Data Transfer Response 响应 Data Transfer Request
返回
CAPWAP Binding for IEEE 802.11
CAPWAP协议本身并不包括任何指定的无线技术。它依 靠绑定协议来扩展对特定无线技术的支持。 RFC5416就是用来扩展CAPWAP对IEEE 802.11网络的 支持。其中定义了控制消息字段,新的控制消息,消息元 素。 注意,这个协议仅支持IEEE 802.11-2007规范,并不支 持IEEE 802.11-2007 standard中定义的ad hoc网络模式, 也不适用于four-address格式的数据帧(这种数据帧一般 用于网桥,在IEEE 802.11-2007标准中没有指定这种用 法)。协议并不支持IEEE 802.11n。
网络信息安全工程师招聘笔试题与参考答案(某大型国企)
招聘网络信息安全工程师笔试题与参考答案(某大型国企)一、单项选择题(本大题有10小题,每小题2分,共20分)1、以下哪种攻击手段是通过伪造网络协议包来攻击目标计算机的?A. 跨站脚本(XSS)B. 拒绝服务(DoS)C. 缓冲区溢出D. IP欺骗答案:D解析:本题考察的是网络安全中常见的攻击手段及其原理。
A. 跨站脚本(XSS)攻击是通过在Web页面中插入恶意脚本,当用户浏览该页时,嵌入其中的脚本就会被执行,从而达到攻击者盗取用户信息、进行恶意操作等目的。
这种攻击并不涉及伪造网络协议包。
B. 拒绝服务(DoS)攻击是通过向目标服务器发送大量无用的请求,使服务器资源耗尽,无法再处理正常的请求,从而达到拒绝服务的目的。
这种攻击主要是利用协议或系统的漏洞,并不直接伪造网络协议包。
C. 缓冲区溢出是一种常见的内存漏洞利用技术,通过向程序的缓冲区写入超出其容量的数据,从而覆盖相邻内存中的数据,改变程序的执行流程,执行恶意代码。
这种攻击与伪造网络协议包无直接关联。
D. IP欺骗(IP Spoofing)是一种攻击手段,通过伪造IP地址来伪装成受信任的地址,从而绕过安全机制,进行未经授权的访问或操作。
这种攻击手段直接涉及到伪造网络协议包中的IP地址字段。
2、在网络安全中,以下哪项技术主要用于防止未经授权的访问和敏感信息的泄露?A. 数据加密B. 防火墙C. 入侵检测系统(IDS)D. 虚拟专用网络(VPN)答案:A解析:本题考察的是网络安全中不同技术的功能和应用场景。
A. 数据加密是一种通过加密算法将明文数据转换为密文数据的技术,只有拥有正确密钥的用户才能解密并阅读原始数据。
这种技术主要用于防止未经授权的访问和敏感信息的泄露,即使数据被截获,也无法被未授权的用户理解。
B. 防火墙是一种网络安全系统,它根据设定的安全策略,监控并控制进出网络的数据包,允许合法的数据包通过,阻止非法的数据包。
防火墙主要用于构建网络边界的安全防护,但并不能直接防止数据在传输过程中被泄露。
IPSECVPN原理及配置——蘑菇课堂
……
加密方
皇奉 帝天 诏承 曰运
解密方的 公开密钥
加密
……
解密方
皇奉 帝天 诏承 曰运
解密
yHidYTV dkd;AOt
……
yHidYTV dkd;AOt
……
加密和解密的密钥不同
解密方的 私有密钥
8
9
单向散列 函数
接收方
皇奉 帝天 诏承 曰运
?
共享密钥
yYaIPyq Zo[yWIt
……
yYaIPyq Zo[yWIt
f. 安全参数索引(SPI):是一个32比特的数值,在每一个 IPsec报文中都携带有该数值。安全参数索引SPI 和IP目 的地址、安全协议号一起组成一个三元组,来唯一标识一 个特定的安全联盟。(手工配置安全联盟时需要手工指定 安全参数索引SPI ,为保证安全联盟的唯一性,必须使用 不同的安全参数索引来配置安全联盟;IKE协商产生安全 联盟时使用随机数来生成安全参数索引SPI)
这样发端的工作就完成了收端的工作与之类似只 是处理的方式相反。
25
IPSec处理流程
数据包入站 丢弃
丢弃
查找SPD策略
旁路安全 服务
需要提供 安全服务
查找IPSec SA
找到
没有找到
转发
执行安全服务 (AH/ESP/AH+ESP)
查找IKE SA 没有找到
找到 创建IKE SA
创建IPSec SA
传输模式
封装模式相对简单,传输效率较高 IP包头未被保护
VPN头 IP包头 有VP效N载头荷有效载荷
A
VPN尾 VPN尾IP包头 VIPP包N头 有效载荷
Internet
B
2-5-密码学基础与IPSEC-VPN技术原理
龙腾中国 融信天下
重放攻击保护
AH协议头
下一头部 负载长度 安全参数索引(SPI) 序列号 认证数据 (完整性校验值ICV)变长 保留
ESP协议头
安全参数索引(SPI) 序列号 负载数据 (变长的) 填充(0~255字节)
填充长度
认证数据 (变长的)
下一头部
SA建立之初,AH或ESP的序列号初始化为0, 使用该SA传递的第一个数据包序列号为1,序 列号不允许重复,因此每个SA所能传递的最大 IP报文数为232—1,当序列号达到最大时,就 需要建立一个新的SA,使用新的密钥。
龙腾中国 融信天下
数据机密性保护
明文
1100111001 0100010100 1010100100 0100100100 0001000000 加密
密文
· #¥^&(%# %$%^&*(! #$%*((_%$ @#$%%^* &**)%$#@ · #¥^&(%# %$%^&*(! #$%*((_%$ @#$%%^* &**)%$#@ · #¥^&(%# %$%^&*(! #$%*((_%$ @#$%%^* &**)%$#@ · #¥^&(%# %$%^&*(! #$%*((_%$ @#$%%^* &**)%$#@
Bob Alice
Eve
龙腾中国 融信天下
5、现代加密算法的三大分类:
对称加密算法:加解密密钥一致。DES、 3DES、AES。 非对称加密算法:加解密密钥不一致,但 相互关联,且不可互相 推导。(RSA) 单向散列函数:一类特殊的加密算法,一 般用来认证。输入变长的 数据可以获得定长的输出。 输入数据发生变化,输出 数据立即变化。(MD5、SHA)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Network Working Group K. Raeburn Request for Comments: 3962 MIT Category: Standards Track February 2005 Advanced Encryption Standard (AES) Encryption for Kerberos 5Status of This MemoThis document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions forimprovements. Please refer to the current edition of the "InternetOfficial Protocol Standards" (STD 1) for the standardization stateand status of this protocol. Distribution of this memo is unlimited. Copyright NoticeCopyright (C) The Internet Society (2005).AbstractThe United States National Institute of Standards and Technology(NIST) has chosen a new Advanced Encryption Standard (AES), which is significantly faster and (it is believed) more secure than the oldData Encryption Standard (DES) algorithm. This document is aspecification for the addition of this algorithm to the Kerberoscryptosystem suite.1. IntroductionThis document defines encryption key and checksum types for Kerberos 5 using the AES algorithm recently chosen by NIST. These new typessupport 128-bit block encryption and key sizes of 128 or 256 bits.Using the "simplified profile" of [KCRYPTO], we can define a pair of encryption and checksum schemes. AES is used with ciphertextstealing to avoid message expansion, and SHA-1 [SHA1] is theassociated checksum function.2. Conventions used in this DocumentThe key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT","SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119[KEYWORDS].Raeburn Standards Track [Page 1]3. Protocol Key RepresentationThe profile in [KCRYPTO] treats keys and random octet strings asconceptually different. But since the AES key space is dense, we can use any bit string of appropriate length as a key. We use the byterepresentation for the key described in [AES], where the first bit of the bit string is the high bit of the first byte of the byte string(octet string) representation.4. Key Generation from Pass Phrases or Random DataGiven the above format for keys, we can generate keys from theappropriate amounts of random data (128 or 256 bits) by simplycopying the input string.To generate an encryption key from a pass phrase and salt string, we use the PBKDF2 function from PKCS #5 v2.0 ([PKCS5]), with parameters indicated below, to generate an intermediate key (of the same length as the desired final key), which is then passed into the DK function with the 8-octet ASCII string "kerberos" as is done for des3-cbc-hmac-sha1-kd in [KCRYPTO]. (In [KCRYPTO] terms, the PBKDF2 function produces a "random octet string", hence the application of therandom-to-key function even though it’s effectively a simple identity operation.) The resulting key is the user’s long-term key for usewith the encryption algorithm in question.tkey = random2key(PBKDF2(passphrase, salt, iter_count, keylength))key = DK(tkey, "kerberos")The pseudorandom function used by PBKDF2 will be a SHA-1 HMAC of the passphrase and salt, as described in Appendix B.1 to PKCS#5.The number of iterations is specified by the string-to-key parameters supplied. The parameter string is four octets indicating an unsigned number in big-endian order. This is the number of iterations to beperformed. If the value is 00 00 00 00, the number of iterations to be performed is 4,294,967,296 (2**32). (Thus the minimum expressible iteration count is 1.)For environments where slower hardware is the norm, implementationsof protocols such as Kerberos may wish to limit the number ofiterations to prevent a spoofed response supplied by an attacker from consuming lots of client-side CPU time; if such a limit isimplemented, it SHOULD be no less than 50,000. Even for environments with fast hardware, 4 billion iterations is likely to take a fairlylong time; much larger bounds might still be enforced, and it mightbe wise for implementations to permit interruption of this operation by the user if the environment allows for it.Raeburn Standards Track [Page 2]If the string-to-key parameters are not supplied, the value used is00 00 10 00 (decimal 4,096, indicating 4,096 iterations).Note that this is not a requirement, nor even a recommendation, forthis value to be used in "optimistic preauthentication" (e.g.,attempting timestamp-based preauthentication using the user’s long-term key without having first communicated with the KDC) in theabsence of additional information, or as a default value for sites to use for their principals’ long-term keys in their Kerberos database. It is simply the interpretation of the absence of the string-to-keyparameter field when the KDC has had an opportunity to provide it.Sample test vectors are given in Appendix B.5. Ciphertext StealingCipher block chaining is used to encrypt messages, with the initialvector stored in the cipher state. Unlike previous Kerberoscryptosystems, we use ciphertext stealing to handle the possiblypartial final block of the message.Ciphertext stealing is described on pages 195-196 of [AC], andsection 8 of [RC5]; it has the advantage that no message expansion is done during encryption of messages of arbitrary sizes as is typically done in CBC mode with padding. Some errata for [RC5] are listed inAppendix A and are considered part of the ciphertext stealingtechnique as used here.Ciphertext stealing, as defined in [RC5], assumes that more than one block of plain text is available. If exactly one block is to beencrypted, that block is simply encrypted with AES (also known as ECB mode). Input smaller than one block is padded at the end to oneblock; the values of the padding bits are unspecified.(Implementations MAY use all-zero padding, but protocols MUST NOTrely on the result being deterministic. Implementations MAY userandom padding, but protocols MUST NOT rely on the result not beingdeterministic. Note that in most cases, the Kerberos encryptionprofile will add a random confounder independent of this padding.)For consistency, ciphertext stealing is always used for the last two blocks of the data to be encrypted, as in [RC5]. If the data length is a multiple of the block size, this is equivalent to plain CBC mode with the last two ciphertext blocks swapped.A test vector is given in Appendix B.Raeburn Standards Track [Page 3]The initial vector carried out from one encryption for use in asubsequent encryption is the next-to-last block of the encryptionoutput; this is the encrypted form of the last plaintext block. When decrypting, the next-to-last block of the supplied ciphertext iscarried forward as the next initial vector. If only one ciphertextblock is available (decrypting one block, or encrypting one block or less), then that one block is carried out instead.6. Kerberos Algorithm Profile ParametersThis is a summary of the parameters to be used with the simplifiedalgorithm profile described in [KCRYPTO]:+--------------------------------------------------------------------+ | protocol key format 128- or 256-bit string | | | | string-to-key function PBKDF2+DK with variable | | iteration count (see | | above) | | | | default string-to-key parameters 00 00 10 00 | | | | key-generation seed length key size | | | | random-to-key function identity function | | | | hash function, H SHA-1 | | | | HMAC output size, h 12 octets (96 bits) | | | | message block size, m 1 octet | | | | encryption/decryption functions, AES in CBC-CTS mode | | E and D (cipher block size 16 | | octets), with next-to- | | last block (last block | | if only one) as CBC-style | | ivec | +--------------------------------------------------------------------+ Using this profile with each key size gives us two each of encryption and checksum algorithm definitions.Raeburn Standards Track [Page 4]7. Assigned NumbersThe following encryption type numbers are assigned:+--------------------------------------------------------------------+ | encryption types | +--------------------------------------------------------------------+ | type name etype value key size | +--------------------------------------------------------------------+ | aes128-cts-hmac-sha1-96 17 128 | | aes256-cts-hmac-sha1-96 18 256 | +--------------------------------------------------------------------+ The following checksum type numbers are assigned:+--------------------------------------------------------------------+ | checksum types | +--------------------------------------------------------------------+ | type name sumtype value length | +--------------------------------------------------------------------+ | hmac-sha1-96-aes128 15 96 | | hmac-sha1-96-aes256 16 96 | +--------------------------------------------------------------------+ These checksum types will be used with the corresponding encryptiontypes defined above.8. Security ConsiderationsThis new algorithm has not been around long enough to receive thedecades of intense analysis that DES has received. It is possiblethat some weakness exists that has not been found by thecryptographers analyzing these algorithms before and during the AESselection process.The use of the HMAC function has drawbacks for certain pass phraselengths. For example, a pass phrase longer than the hash functionblock size (64 bytes, for SHA-1) is hashed to a smaller size (20bytes) before applying the main HMAC algorithm. However, entropy is generally sparse in pass phrases, especially in long ones, so thismay not be a problem in the rare cases of users with long passphrases.Also, generating a 256-bit key from a pass phrase of any length maybe deceptive, as the effective entropy in pass-phrase-derived keycannot be nearly that large given the properties of the string-to-key function described here.Raeburn Standards Track [Page 5]The iteration count in PBKDF2 appears to be useful primarily as aconstant multiplier for the amount of work required for an attackerusing brute-force methods. Unfortunately, it also multiplies, by the same amount, the work needed by a legitimate user with a validpassword. Thus the work factor imposed on an attacker (who may have many powerful workstations at his disposal) must be balanced against the work factor imposed on the legitimate user (who may have a PDA or cell phone); the available computing power on either side increasesas time goes on, as well. A better way to deal with the brute-force attack is through preauthentication mechanisms that provide betterprotection of the user’s long-term key. Use of such mechanisms isout of the scope of this document.If a site does wish to use this means of protection against a brute- force attack, the iteration count should be chosen based on thefacilities available to both attacker and legitimate user, and theamount of work the attacker should be required to perform to acquire the key or password.As an example:The author’s tests on a 2GHz Pentium 4 system indicated that inone second, nearly 90,000 iterations could be done, producing a256-bit key. This was using the SHA-1 assembly implementationfrom OpenSSL, and a pre-release version of the PBKDF2 code forMIT’s Kerberos package, on a single system. No attempt was madeto do multiple hashes in parallel, so we assume an attacker doing so can probably do at least 100,000 iterations per second --rounded up to 2**17, for ease of calculation. For simplicity, we also assume the final AES encryption step costs nothing.Paul Leach estimates [LEACH] that a password-cracking dictionarymay have on the order of 2**21 entries, with capitalization,punctuation, and other variations contributing perhaps a factor of 2**11, giving a ballpark estimate of 2**32.Thus, for a known iteration count N and a known salt string, anattacker with some number of computers comparable to the author’s would need roughly N*2**15 CPU seconds to convert the entiredictionary plus variations into keys.An attacker using a dozen such computers for a month would haveroughly 2**25 CPU seconds available. So using 2**12 (4,096)iterations would mean an attacker with a dozen such computersdedicated to a brute-force attack against a single key (actually, any password-derived keys sharing the same salt and iteration Raeburn Standards Track [Page 6]count) would process all the variations of the dictionary entries in four months and, on average, would likely find the user’spassword in two months.Thus, if this form of attack is of concern, users should berequired to change their passwords every few months, and aniteration count a few orders of magnitude higher should be chosen. Perhaps several orders of magnitude, as many users will tend touse the shorter and simpler passwords (to the extent they can,given a site’s password quality checks) that the attacker wouldlikely try first.Since this estimate is based on currently available CPU power, the iteration counts used for this mode of defense should be increased over time, at perhaps 40%-60% each year or so.Note that if the attacker has a large amount of storage available, intermediate results could be cached, saving a lot of work for the next attack with the same salt and a greater number of iterations than had been run at the point where the intermediate results were saved. Thus, it would be wise to generate a new random saltstring when passwords are changed. The default salt string,derived from the principal name, only protects against the use of one dictionary of keys against multiple users.If the PBKDF2 iteration count can be spoofed by an intruder on thenetwork, and the limit on the accepted iteration count is very high, the intruder may be able to introduce a form of denial of serviceattack against the client by sending a very high iteration count,causing the client to spend a great deal of CPU time computing anincorrect key.An intruder spoofing the KDC reply, providing a low iteration countand reading the client’s reply from the network, may be able toreduce the work needed in the brute-force attack outlined above.Thus, implementations may seek to enforce lower bounds on the number of iterations that will be used.Since threat models and typical end-user equipment will vary widelyfrom site to site, allowing site-specific configuration of suchbounds is recommended.Any benefit against other attacks specific to the HMAC or SHA-1algorithms is probably achieved with a fairly small number ofiterations.Raeburn Standards Track [Page 7]In the "optimistic preauthentication" case mentioned in section 3,the client may attempt to produce a key without first communicatingwith the KDC. If the client has no additional information, it canonly guess as to the iteration count to be used. Even suchheuristics as "iteration count X was used to acquire tickets for the same principal only N hours ago" can be wrong. Given therecommendation above for increasing the iteration counts used overtime, it is impossible to recommend any specific default value forthis case; allowing site-local configuration is recommended. (If the lower and upper bound checks described above are implemented, thedefault count for optimistic preauthentication should be betweenthose bounds.)Ciphertext stealing mode, as it requires no additional padding inmost cases, will reveal the exact length of each message beingencrypted rather than merely bounding it to a small range of possible lengths as in CBC mode. Such obfuscation should not be relied uponat higher levels in any case; if the length must be obscured from an outside observer, this should be done by intentionally varying thelength of the message to be encrypted.9. IANA ConsiderationsKerberos encryption and checksum type values used in section 7 werepreviously reserved in [KCRYPTO] for the mechanisms defined in thisdocument. The registries have been updated to list this document as the reference.10. AcknowledgementsThanks to John Brezak, Gerardo Diaz Cuellar, Ken Hornstein, PaulLeach, Marcus Watts, Larry Zhu, and others for feedback on earlierversions of this document.Raeburn Standards Track [Page 8]A. Errata for RFC 2040 Section 8(Copied from the RFC Editor’s errata web site on July 8, 2004.)Reported By: Bob Baldwin; baldwin@Date: Fri, 26 Mar 2004 06:49:02 -0800In Section 8, Description of RC5-CTS, of the encryption method,it says:1. Exclusive-or Pn-1 with the previous ciphertextblock, Cn-2, to create Xn-1.It should say:1. Exclusive-or Pn-1 with the previous ciphertextblock, Cn-2, to create Xn-1. For short messages whereCn-2 does not exist, use IV.Reported By: Bob Baldwin; baldwin@Date: Mon, 22 Mar 2004 20:26:40 -0800In Section 8, first paragraph, second sentence says:This mode handles any length of plaintext and produces ciphertext whose length matches the plaintext length.In Section 8, first paragraph, second sentence should read:This mode handles any length of plaintext longer than oneblock and produces ciphertext whose length matches theplaintext length.In Section 8, step 6 of the decryption method says:6. Decrypt En to create Pn-1.In Section 8, step 6 of the decryption method should read:6. Decrypt En and exclusive-or with Cn-2 to create Pn-1.For short messages where Cn-2 does not exist, use the IV. Raeburn Standards Track [Page 9]B. Sample Test VectorsSample values for the PBKDF2 HMAC-SHA1 string-to-key function areincluded below.Iteration count = 1Pass phrase = "password"Salt = "raeburn"128-bit PBKDF2 output:cd ed b5 28 1b b2 f8 01 56 5a 11 22 b2 56 35 15128-bit AES key:42 26 3c 6e 89 f4 fc 28 b8 df 68 ee 09 79 9f 15256-bit PBKDF2 output:cd ed b5 28 1b b2 f8 01 56 5a 11 22 b2 56 35 150a d1 f7 a0 4b b9 f3 a3 33 ec c0 e2 e1 f7 08 37256-bit AES key:fe 69 7b 52 bc 0d 3c e1 44 32 ba 03 6a 92 e6 5bbb 52 28 09 90 a2 fa 27 88 39 98 d7 2a f3 01 61Iteration count = 2Pass phrase = "password"Salt="raeburn"128-bit PBKDF2 output:01 db ee 7f 4a 9e 24 3e 98 8b 62 c7 3c da 93 5d128-bit AES key:c6 51 bf 29 e2 30 0a c2 7f a4 69 d6 93 bd da 13256-bit PBKDF2 output:01 db ee 7f 4a 9e 24 3e 98 8b 62 c7 3c da 93 5da0 53 78 b9 32 44 ec 8f 48 a9 9e 61 ad 79 9d 86256-bit AES key:a2 e1 6d 16 b3 60 69 c1 35 d5 e9 d2 e2 5f 89 6102 68 56 18 b9 59 14 b4 67 c6 76 22 22 58 24 ffIteration count = 1200Pass phrase = "password"Salt = "raeburn"128-bit PBKDF2 output:5c 08 eb 61 fd f7 1e 4e 4e c3 cf 6b a1 f5 51 2b128-bit AES key:4c 01 cd 46 d6 32 d0 1e 6d be 23 0a 01 ed 64 2a256-bit PBKDF2 output:5c 08 eb 61 fd f7 1e 4e 4e c3 cf 6b a1 f5 51 2ba7 e5 2d db c5 e5 14 2f 70 8a 31 e2 e6 2b 1e 13256-bit AES key:55 a6 ac 74 0a d1 7b 48 46 94 10 51 e1 e8 b0 a754 8d 93 b0 ab 30 a8 bc 3f f1 62 80 38 2b 8c 2aRaeburn Standards Track [Page 10]Pass phrase = "password"Salt=0x1234567878563412128-bit PBKDF2 output:d1 da a7 86 15 f2 87 e6 a1 c8 b1 20 d7 06 2a 49128-bit AES key:e9 b2 3d 52 27 37 47 dd 5c 35 cb 55 be 61 9d 8e256-bit PBKDF2 output:d1 da a7 86 15 f2 87 e6 a1 c8 b1 20 d7 06 2a 493f 98 d2 03 e6 be 49 a6 ad f4 fa 57 4b 6e 64 ee256-bit AES key:97 a4 e7 86 be 20 d8 1a 38 2d 5e bc 96 d5 90 9cab cd ad c8 7c a4 8f 57 45 04 15 9f 16 c3 6e 31(This test is based on values given in [PECMS].)Iteration count = 1200Pass phrase = (64 characters)"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" Salt="pass phrase equals block size"128-bit PBKDF2 output:13 9c 30 c0 96 6b c3 2b a5 5f db f2 12 53 0a c9128-bit AES key:59 d1 bb 78 9a 82 8b 1a a5 4e f9 c2 88 3f 69 ed256-bit PBKDF2 output:13 9c 30 c0 96 6b c3 2b a5 5f db f2 12 53 0a c9c5 ec 59 f1 a4 52 f5 cc 9a d9 40 fe a0 59 8e d1256-bit AES key:89 ad ee 36 08 db 8b c7 1f 1b fb fe 45 94 86 b056 18 b7 0c ba e2 20 92 53 4e 56 c5 53 ba 4b 34Iteration count = 1200Pass phrase = (65 characters)"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" Salt = "pass phrase exceeds block size"128-bit PBKDF2 output:9c ca d6 d4 68 77 0c d5 1b 10 e6 a6 87 21 be 61128-bit AES key:cb 80 05 dc 5f 90 17 9a 7f 02 10 4c 00 18 75 1d256-bit PBKDF2 output:9c ca d6 d4 68 77 0c d5 1b 10 e6 a6 87 21 be 611a 8b 4d 28 26 01 db 3b 36 be 92 46 91 5e c8 2a256-bit AES key:d7 8c 5c 9c b8 72 a8 c9 da d4 69 7f 0b b5 b2 d214 96 c8 2b eb 2c ae da 21 12 fc ee a0 57 40 1bRaeburn Standards Track [Page 11]Pass phrase = g-clef (0xf09d849e)Salt = "pianist"128-bit PBKDF2 output:6b 9c f2 6d 45 45 5a 43 a5 b8 bb 27 6a 40 3b 39128-bit AES key:f1 49 c1 f2 e1 54 a7 34 52 d4 3e 7f e6 2a 56 e5256-bit PBKDF2 output:6b 9c f2 6d 45 45 5a 43 a5 b8 bb 27 6a 40 3b 39e7 fe 37 a0 c4 1e 02 c2 81 ff 30 69 e1 e9 4f 52256-bit AES key:4b 6d 98 39 f8 44 06 df 1f 09 cc 16 6d b4 b8 3c57 18 48 b7 84 a3 d6 bd c3 46 58 9a 3e 39 3f 9eSome test vectors for CBC with ciphertext stealing, using an initial vector of all-zero.AES 128-bit key:0000: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69IV:0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Input:0000: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 650010: 20Output:0000: c6 35 35 68 f2 bf 8c b4 d8 a5 80 36 2d a7 ff 7f0010: 97Next IV:0000: c6 35 35 68 f2 bf 8c b4 d8 a5 80 36 2d a7 ff 7fIV:0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Input:0000: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 650010: 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20Output:0000: fc 00 78 3e 0e fd b2 c1 d4 45 d4 c8 ef f7 ed 220010: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5Next IV:0000: fc 00 78 3e 0e fd b2 c1 d4 45 d4 c8 ef f7 ed 22Raeburn Standards Track [Page 12]0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Input:0000: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 650010: 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43Output:0000: 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a80010: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84Next IV:0000: 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8IV:0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Input:0000: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 650010: 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 430020: 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2cOutput:0000: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 840010: b3 ff fd 94 0c 16 a1 8c 1b 55 49 d2 f8 38 02 9e0020: 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5Next IV:0000: b3 ff fd 94 0c 16 a1 8c 1b 55 49 d2 f8 38 02 9eIV:0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Input:0000: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 650010: 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 430020: 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c 20Output:0000: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 840010: 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d80020: 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8Next IV:0000: 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8Raeburn Standards Track [Page 13]0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Input:0000: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 650010: 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 430020: 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c 200030: 61 6e 64 20 77 6f 6e 74 6f 6e 20 73 6f 75 70 2eOutput:0000: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 840010: 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a80020: 48 07 ef e8 36 ee 89 a5 26 73 0d bc 2f 7b c8 400030: 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8Next IV:0000: 48 07 ef e8 36 ee 89 a5 26 73 0d bc 2f 7b c8 40Normative References[AC] Schneier, B., "Applied Cryptography", second edition, John Wiley and Sons, New York, 1996.[AES] National Institute of Standards and Technology, U.S.Department of Commerce, "Advanced Encryption Standard",Federal Information Processing Standards Publication 197, Washington, DC, November 2001.[KCRYPTO] Raeburn, K., "Encryption and Checksum Specifications forKerberos 5", RFC 3961, February 2005.[KEYWORDS] Bradner, S., "Key words for use in RFCs to IndicateRequirement Levels", BCP 14, RFC 2119, March 1997.[PKCS5] Kaliski, B., "PKCS #5: Password-Based CryptographySpecification Version 2.0", RFC 2898, September 2000.[RC5] Baldwin, R. and R. Rivest, "The RC5, RC5-CBC, RC5-CBC-Pad, and RC5-CTS Algorithms", RFC 2040, October 1996.[SHA1] National Institute of Standards and Technology, U.S.Department of Commerce, "Secure Hash Standard", FederalInformation Processing Standards Publication 180-1,Washington, DC, April 1995.Raeburn Standards Track [Page 14]Informative References[LEACH] Leach, P., email to IETF Kerberos working group mailinglist, 5 May 2003, ftp:///ietf-mail-archive/krb-wg/2003-05.mail.[PECMS] Gutmann, P., "Password-based Encryption for CMS", RFC3211, December 2001.Author’s AddressKenneth RaeburnMassachusetts Institute of Technology77 Massachusetts AvenueCambridge, MA 02139EMail: raeburn@Raeburn Standards Track [Page 15]Full Copyright StatementCopyright (C) The Internet Society (2005).This document is subject to the rights, licenses and restrictionscontained in BCP 78, and except as set forth therein, the authorsretain all their rights.This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNETENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THEINFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIEDWARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual PropertyThe IETF takes no position regarding the validity or scope of anyIntellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described inthis document or the extent to which any license under such rightsmight or might not be available; nor does it represent that it hasmade any independent effort to identify any such rights. Information on the IETF’s procedures with respect to rights in IETF Documents can be found in BCP 78 and BCP 79.Copies of IPR disclosures made to the IETF Secretariat and anyassurances of licenses to be made available, or the result of anattempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of thisspecification can be obtained from the IETF on-line IPR repository at /ipr.The IETF invites any interested party to bring to its attention anycopyrights, patents or patent applications, or other proprietaryrights that may cover technology that may be required to implementthis standard. Please address the information to the IETF at ietf-ipr@.AcknowledgementFunding for the RFC Editor function is currently provided by theInternet Society.Raeburn Standards Track [Page 16]。