⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc1829.txt

📁 著名的RFC文档,其中有一些文档是已经翻译成中文的的.
💻 TXT
📖 第 1 页 / 共 2 页
字号:
Network Working Group                                            P. KarnRequest for Comments: 1829                                      QualcommCategory: Standards Track                                     P. Metzger                                                                Piermont                                                              W. Simpson                                                              Daydreamer                                                             August 1995                       The ESP DES-CBC TransformStatus of this Memo   This document specifies an Internet standards track protocol for the   Internet community, and requests discussion and suggestions for   improvements.  Please refer to the current edition of the "Internet   Official Protocol Standards" (STD 1) for the standardization state   and status of this protocol.  Distribution of this memo is unlimited.Abstract   This document describes the DES-CBC security transform for the IP   Encapsulating Security Payload (ESP).Table of Contents     1.     Introduction ..........................................    1        1.1       Keys ............................................    1        1.2       Initialization Vector ...........................    1        1.3       Data Size .......................................    2        1.4       Performance .....................................    2     2.     Payload Format ........................................    3     3.     Algorithm .............................................    5        3.1       Encryption ......................................    5        3.2       Decryption ......................................    5     SECURITY CONSIDERATIONS ......................................    6     ACKNOWLEDGEMENTS .............................................    7     REFERENCES ...................................................    8     AUTHOR'S ADDRESS .............................................   10Karn, Metzger & Simpson     Standards Track                     [Page i]RFC 1829                      ESP DES-CBC                    August 19951.  Introduction   The Encapsulating Security Payload (ESP) [RFC-1827] provides   confidentiality for IP datagrams by encrypting the payload data to be   protected.  This specification describes the ESP use of the Cipher   Block Chaining (CBC) mode of the US Data Encryption Standard (DES)   algorithm [FIPS-46, FIPS-46-1, FIPS-74, FIPS-81].   All implementations that claim conformance or compliance with the   Encapsulating Security Payload specification MUST implement this   DES-CBC transform.   This document assumes that the reader is familiar with the related   document "Security Architecture for the Internet Protocol"   [RFC-1825], which defines the overall security plan for IP, and   provides important background for this specification.1.1.  Keys   The secret DES key shared between the communicating parties is eight   octets in length.  This key consists of a 56-bit quantity used by the   DES algorithm.  The 56-bit key is stored as a 64-bit (eight octet)   quantity, with the least significant bit of each octet used as a   parity bit.1.2.  Initialization Vector   This mode of DES requires an Initialization Vector (IV) that is eight   octets in length.   Each datagram contains its own IV.  Including the IV in each datagram   ensures that decryption of each received datagram can be performed,   even when other datagrams are dropped, or datagrams are re-ordered in   transit.   The method for selection of IV values is implementation dependent.   Notes:      A common acceptable technique is simply a counter, beginning with      a randomly chosen value.  While this provides an easy method for      preventing repetition, and is sufficiently robust for practical      use, cryptanalysis may use the rare serendipitous occurrence when      a corresponding bit position in the first DES block increments in      exactly the same fashion.Karn, Metzger & Simpson     Standards Track                     [Page 1]RFC 1829                      ESP DES-CBC                    August 1995      Other implementations exhibit unpredictability, usually through a      pseudo-random number generator.  Care should be taken that the      periodicity of the number generator is long enough to prevent      repetition during the lifetime of the session key.1.3.  Data Size   The DES algorithm operates on blocks of eight octets.  This often   requires padding after the end of the unencrypted payload data.   Both input and output result in the same number of octets, which   facilitates in-place encryption and decryption.   On receipt, if the length of the data to be decrypted is not an   integral multiple of eight octets, then an error is indicated, as   described in [RFC-1825].1.4.  Performance   At the time of writing, at least one hardware implementation can   encrypt or decrypt at about 1 Gbps [Schneier94, p. 231].Karn, Metzger & Simpson     Standards Track                     [Page 2]RFC 1829                      ESP DES-CBC                    August 19952.  Payload Format   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                Security Parameters Index (SPI)                |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                                                               |   ~                   Initialization Vector (IV)                  ~   |                                                               |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                                                               |   ~                          Payload Data                         ~   |                                                               |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+             ... Padding           |  Pad Length   | Payload Type  |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Security Parameters Index (SPI)      A 32-bit value identifying the Security Parameters for this      datagram.  The value MUST NOT be zero.   Initialization Vector (IV)      The size of this field is variable, although it is constant for      all DES-CBC datagrams of the same SPI and IP Destination.  Octets      are sent in network order (most significant octet first)      [RFC-1700].      The size MUST be a multiple of 32-bits.  Sizes of 32 and 64 bits      are required to be supported.  The use of other sizes is beyond      the scope of this specification.  The size is expected to be      indicated by the key management mechanism.      When the size is 32-bits, a 64-bit IV is formed from the 32-bit      value followed by (concatenated with) the bit-wise complement of      the 32-bit value.  This field size is most common, as it aligns      the Payload Data for both 32-bit and 64-bit processing.      All conformant implementations MUST also correctly process a      64-bit field size.  This provides strict compatibility with      existing hardware implementations.         It is the intent that the value not repeat during the lifetime         of the encryption session key.  Even when a full 64-bit IV is         used, the session key SHOULD be changed at least as frequently         as 2**32 datagrams.Karn, Metzger & Simpson     Standards Track                     [Page 3]RFC 1829                      ESP DES-CBC                    August 1995   Payload Data      The size of this field is variable.      Prior to encryption and after decryption, this field begins with      the IP Protocol/Payload header specified in the Payload Type      field.  Note that in the case of IP-in-IP encapsulation (Payload      Type 4), this will be another IP header.   Padding      The size of this field is variable.      Prior to encryption, it is filled with unspecified implementation      dependent (preferably random) values, to align the Pad Length and      Payload Type fields at an eight octet boundary.      After decryption, it MUST be ignored.   Pad Length      This field indicates the size of the Padding field.  It does not      include the Pad Length and Payload Type fields.  The value      typically ranges from 0 to 7, but may be up to 255 to permit      hiding of the actual data length.      This field is opaque.  That is, the value is set prior to      encryption, and is examined only after decryption.   Payload Type      This field indicates the contents of the Payload Data field, using      the IP Protocol/Payload value.  Up-to-date values of the IP      Protocol/Payload are specified in the most recent "Assigned      Numbers" [RFC-1700].      This field is opaque.  That is, the value is set prior to      encryption, and is examined only after decryption.         For example, when encrypting an entire IP datagram (Tunnel-         Mode), this field will contain the value 4, which indicates         IP-in-IP encapsulation.Karn, Metzger & Simpson     Standards Track                     [Page 4]RFC 1829                      ESP DES-CBC                    August 19953.  Algorithm   In DES-CBC, the base DES encryption function is applied to the XOR of   each plaintext block with the previous ciphertext block to yield the   ciphertext for the current block.  This provides for   re-synchronization when datagrams are lost.   For more explanation and implementation information for DES, see   [Schneier94].3.1.  Encryption   Append zero or more octets of (preferably random) padding to the   plaintext, to make its modulo 8 length equal to 6.  For example, if   the plaintext length is 41, 5 octets of padding are added.   Append a Pad Length octet containing the number of padding octets   just added.   Append a Payload Type octet containing the IP Protocol/Payload value

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -