Network Working Group J. Altman
Request for Comments: 2950 Columbia University
Category: Standards Track September 2000
Telnet Encryption: CAST-128 64 bit Cipher Feedback
1. Command Names and Codes
Encryption Type
2. Command Meanings
IAC SB ENCRYPT IS CAST5_40_CFB64 CFB64_IV <initial vector> IAC SE IAC SB ENCRYPT IS CAST128_CFB64 CFB64_IV <initial vector> IAC SE
Altman Standards Track [Page 1]
RFC 2950 CAST-128 64 bit Cipher Feedback September 2000
The sender of these commands either accepts or rejects the initial vector received in a CFB64_IV command. Only the side of the connection that is DO ENCRYPT may send the CFB64_IV_OK and CFB64_IV_BAD commands. The CFB64_IV_OK command MUST be sent for backwards compatibility with existing implementations; there really isn't any reason why a sender would need to send the CFB64_IV_BAD command except in the case of a protocol violation where the IV sent was not of the correct length (i.e., 8 bytes).
3. Implementation Rules
Once a CFB64_IV_OK command has been received, the WILL ENCRYPT side of the connection should do keyid negotiation using the ENC_KEYID command. Once the keyid negotiation has successfully identified a common keyid, then START and END commands may be sent by the side of the connection that is WILL ENCRYPT. Data will be encrypted using the CAST128 64 bit Cipher Feedback algorithm.
Altman Standards Track [Page 2]
RFC 2950 CAST-128 64 bit Cipher Feedback September 2000 4. AlgorithmCAST 64 bit Cipher Feedback
key --->+------+
+->| CAST |--+
| +------+ |
| v
INPUT --(---------->(+)+---> DATA
| |
+--------------+
Given: iV: Initial vector, 64 bits (8 bytes) long. Dn: the nth chunk of 64 bits (8 bytes) of data to encrypt (decrypt). On: the nth chunk of 64 bits (8 bytes) of encrypted (decrypted) output.
5. Integration with the AUTHENTICATION telnet option
As noted in the telnet ENCRYPTION option specifications, a keyid value of zero indicates the default encryption key, as might be derived from the telnet AUTHENTICATION option. If the default encryption key negotiated as a result of the telnet AUTHENTICATION option contains less than 16 (5) bytes, then the CAST128_CFB64 (CAST5_40_CFB64) option must not be offered or used as a valid telnet encryption option.
6. Security Considerations
Encryption using Cipher Feedback does not ensure data integrity; the active attacker has a limited ability to modify text, if he can predict the clear-text that was being transmitted. The limitations faced by the attacker (that only 8 bytes can be modified at a time, and the following 8-byte block of data will be corrupted, thus making detection likely) are significant, but it is possible that an active attacker still might be able to exploit this weakness.
Altman Standards Track [Page 3]
RFC 2950 CAST-128 64 bit Cipher Feedback September 2000
The tradeoff here is that adding a message authentication code (MAC) will significantly increase the number of bytes needed to send a single character in the telnet protocol, which will impact performance on slow (i.e. dialup) links.
7. Acknowledgments
This document was based on the "Telnet Encryption: DES 64 bit Cipher Feedback" document originally written by Dave Borman of Cray Research with the assistance of the IETF Telnet Working Group.
8. References
[1] Adams, C., "The CAST-128 Encryption Algorithm", RFC 2144, May
Altman Standards Track [Page 4]
RFC 2950 CAST-128 64 bit Cipher Feedback September 2000
Full Copyright Statement