RFC 2420
The PPP Triple-DES Encryption Protocol (3DESE)
RFC 2420: The PPP Triple-DES Encryption Protocol (3DESE) ๐
okay bestie, this one is a whole spec for encrypting PPP packets with Triple-DES, and it's giving very "serious networking, but make it cute" ๐ โจ
- Who wrote it: H. Kummert, from Nentec GmbH ๐ง
- Category: Standards Track (this is a real standard, not vibes) ๐
- Date: September 1998 ๐ธ
- Obsoletes / Updates: nothing listed in the header ๐ซถ
Status of this Memo
this doc is an Internet standards track protocol for the Internet community, and it's literally asking people to talk about it and suggest improvements ๐ฃ๏ธ๐ for the current standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). and the distribution of this memo is unlimited, so share it with everyone ๐
Copyright Notice
Copyright (C) The Internet Society (1998). All Rights Reserved. ๐
Abstract
okay so PPP [1] is the classic way to send multi-protocol datagrams over point-to-point links. then the PPP Encryption Control Protocol (ECP) [2] is the part that lets two sides negotiate and use encryption over those PPP encapsulated links ๐
this doc is the specific recipe for using Triple-DES [6] to encrypt PPP encapsulated packets. it's giving "here's exactly how" energy ๐ฆ
Table of Contents
1. Introduction .............................................. 2
1.1 Algorithm ................................................. 2
1.2 Keys ...................................................... 3
2. 3DESE Configuration Option for ECP ........................ 3
3. Packet format for 3DESE ................................... 4
4. Encryption ................................................ 5
4.1 Padding ................................................... 5
4.2 Recovery after packet loss ................................ 6
5. Security Considerations ................................... 6
6. References ................................................ 7
7. Acknowledgements .......................................... 7
8. Author's Address .......................................... 7
9. Full Copyright Statement .................................. 8
1. Introduction โจ
so the whole point of encrypting packets between two PPP implementations is to attempt to insure the privacy of whatever communication goes between them ๐ there are tons of encryption algorithms out there, and DES is one of them. DES is super well studied, well understood, and widely implemented, so it's a very trusted queen ๐
Triple-DES just means the algorithm gets applied three times to the data before it goes over the line ๐ the specific variant here is DES-EDE3-CBC, and we'll get into the details in a sec. it was also picked to be used in the security section of IP [5], so it's got good company ๐
this doc shows how to send Triple-DES encrypted packets over a point-to-point link. it lives inside the bigger context of the generic PPP Encryption Control Protocol [2] ๐ง
because CBC mode is used, there's a sequence number so the packets stay in the right order. that also means lost packets can be detected ๐ต๏ธโโ๏ธ
the padding section reflects the result of the discussion on that topic on the ppp mailing list ๐ฌ
the key words "MUST", "SHOULD", and "recommended" in this document are to be interpreted as described in [3]. (iykyk, these are the official requirement words ๐)
1.1. Algorithm
okay so DES-EDE3-CBC is a simple variant of DES-CBC ๐ the Initialization Vector (IV) gets XOR'd with the first 64-bit (8 octet) plaintext block (P1). then the keyed DES function runs three times: an encryption (E), then a decryption (D), then an encryption (E). that generates the ciphertext (C1) for that block. each of those three steps uses an independent key: k1, k2, and k3 ๐
for the blocks after that, the previous ciphertext block gets XOR'd with the current 8-octet plaintext block (Pi). then the keyed DES-EDE3 encryption function makes the ciphertext (Ci) for that block ๐ฆ
P1 P2 Pi
| | |
IV--->(X) +------>(X) +-------->(X)
v | v | v
+-----+ | +-----+ | +-----+
k1->| E | | k1->| E | : k1->| E |
+-----+ | +-----+ : +-----+
| | | : |
v | v : v
+-----+ ^ +-----+ ^ +-----+
k2->| D | | k2->| D | | k2->| D |
+-----+ | +-----+ | +-----+
| | | | |
v | v | v
+-----+ | +-----+ | +-----+
k3->| E | | k3->| E | | k3->| E |
+-----+ | +-----+ | +-----+
| | | | |
+---->+ +------>+ +---->
| | |
C1 C2 Ci
to decrypt, you reverse the order of the functions: decrypt with k3, encrypt with k2, decrypt with k1, and XOR with the previous ciphertext block ๐
when all three keys (k1, k2 and k3) are the same, DES-EDE3-CBC is equivalent to DES-CBC. no cap, that's a fun fact ๐คญ
1.2. Keys
the secret DES-EDE3 key shared between the two parties is effectively 168 bits long ๐ it's made of three independent 56-bit quantities, which are the ones the DES algorithm uses. each of the three 56-bit subkeys gets stored as a 64-bit (8 octet) quantity, and the least significant bit of each octet is used as a parity bit ๐งฎ
when you're configuring keys for 3DESE, keys with incorrect parity or so-called weak keys [6] SHOULD be rejected. no keys with bad vibes allowed ๐ โโ๏ธ๐
2. 3DESE Configuration Option for ECP ๐
Description
the ECP 3DESE Configuration Option says that the implementation sending it is offering to use this spec for decrypting communications on the link. you can also think of it as a request for the peer to encrypt packets this way ๐ซถ the option has the following fields, transmitted from left to right:
Figure 1: ECP 3DESE Configuration Option
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | Initial Nonce ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type
the value is 2, which indicates the 3DESE protocol ๐
Length
the value is 10 ๐
Initial Nonce
this is an 8 byte quantity that the peer implementation uses to encrypt the first packet transmitted after the sender reaches the opened state. to guard against replay attacks, the implementation SHOULD offer a different value during each ECP negotiation. replay attacks are not it, bestie ๐ โโ๏ธ๐
3. Packet format for 3DESE ๐ง
Description
the 3DESE packets that contain the encrypted payload have the following fields ๐
Figure 2: 3DESE Encryption Protocol Packet Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address | Control | 0000 | Protocol ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Seq. No. High | Seq. No. Low | Ciphertext ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Address and Control
these fields MUST be present unless the PPP Address and Control Field Compression option (ACFC) has been negotiated. the MUST here is not optional, babe ๐ข
Protocol ID
the value of this field is 0x53 or 0x55. the 0x55 one means the Individual Link Encryption Control Protocol is in use and the ciphertext contains a Multilink fragment ๐งฉ Protocol Field Compression MAY be applied to the leading zero if it was negotiated โจ
Sequence Number
these are 16-bit numbers that the encryptor assigns sequentially, starting with 0 for the first packet transmitted once ECP has reached the opened state ๐ข
Ciphertext
how this data gets generated is described in the next section ๐
to be continued in part 2! Section 4 (Encryption, including the padding stuff with the MUST NOT, MUST, and SHOULD vibes) and everything after it is coming next ๐๐ฆ
4.2. Recovery after packet loss
Okay so packet loss gets detected when the sequence numbers of consecutive packets stop lining up ๐ Say packet number N - 1 gets an unrecoverable error or is otherwise lost, but packets N and N + 1 arrive just fine โจ
Here's the tea ๐ซ The algorithm we went over earlier needs the last Ci of packet N - 1 to decrypt C1 of packet N. Since that packet is gone, packet N is impossible to decrypt ๐ญ But packet N + 1 and everything after it can be decrypted the normal way, because all you need is the last block of ciphertext from the previous packet. In this case that's packet N, which WAS received ๐
5. Security Considerations ๐
Bestie, this part is serious, so read it slowly ๐ซถ This proposal is only about confidentiality. It doesn't cover integrity, authentication, or nonrepudiation ๐ It can't promise that a message you receive hasn't been changed in transit through replay, cut-and-paste, or active tampering. It also doesn't authenticate who sent a packet, and it can't stop a sender from denying they wrote it ๐
Security is the main thing this memo is about ๐ฅ The proposal depends on outside methods, which aren't specified, for getting shared secrets. It doesn't invent any new privacy tech. It just describes a convention for using the 3DES cipher to send data between PPP implementations ๐ So whatever method you use to protect and retrieve shared secrets matters, and so does any limitation of the 3DES cipher. Those all apply here ๐
6. References ๐
[1] Simpson, W., Editor, "The Point-to-Point Protocol (PPP)", STD 51, RFC 1661, July 1994.
[2] Meyer, G., "The PPP Encryption Control Protocol (ECP)", RFC 1968, June 1996.
[3] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[4] Sklower, K., and G. Meyer, "The PPP DES Encryption Protocol, Version 2 (DESE-bis)", RFC 2419, September 1998.
[5] Doraswamy, N., Metzger, P., Simpson, W., "The ESP Triple DES Transform", Work in Progress, June 1997.
[6] Schneier, B., "Applied Cryptography", Second Edition, John Wiley & Sons, New York, NY, 1995, ISBN 0-471-12845-7.
7. Acknowledgements ๐ซถ
Many portions of this document were taken from [4] and [5] ๐ง Bill Simpson gave useful hints on the initial revision ๐
8. Author's Address ๐
Holger Kummert
Nentec Gesellschaft fuer Netzwerktechnologie
76227 Karlsruhe, Killisfeldstr. 64, Germany
Phone: +49 721 9495 0
EMail: kummert@nentec.de
9. Full Copyright Statement โญ
Copyright (C) The Internet Society (1998). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ๐ฆ
๐ฆ where this page comes from
- ietf: rfc2420 1998-09
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms