rfc-2950

Telnet Encryption: CAST-128 64 bit Cipher Feedback

J. Altman
date2000-09 streamLegacy statusPROPOSED STANDARD pages5 canonicalhttps://www.rfc-editor.org/rfc/rfc2950 doi10.17487/RFC2950
This document specifies how to use the CAST-128 encryption algorithm in cipher feedback mode with the telnet encryption option. Two key sizes are defined: 40 bit and 128 bit. [STANDARDS-TRACK]

Extracted elements (19)

design-rationale §6

A message authentication code (MAC) was not added to CFB mode because doing so would significantly increase the byte overhead per character in the Telnet protocol, impacting performance on slow (dialup) links.

crypto, security

design-rationale §6

The 40-bit key variant (CAST5_40_CFB64) is included not for security but to document implementations already prevalent on the Internet that had never been formally specified.

crypto

normative-requirement §3 MUST

If a new CFB64_IV command is received while encryption is enabled, the encryption machine must be re-initialized immediately after the command using the new initial vector and the keyid from the last START command.

crypto

normative-requirement §3 MUST

If a START command is received with a different keyid, the encryption machine must be re-initialized immediately after the START command using the new key and the last received CFB64_IV initial vector.

crypto

normative-requirement §3 MUST

If encryption is not enabled when a CFB64_IV command is received, the encryption machine must be re-initialized after the next START command, using the keyid from that START command and the IV from the CFB64_IV command.

crypto

normative-requirement §3 MUST

If encryption is turned off and back on with the same keyid, intervening clear text must not change the state of the encryption machine.

crypto

normative-requirement §5 MUST NOT

If the default encryption key derived from the AUTHENTICATION option contains fewer than 16 bytes (CAST128_CFB64) or 5 bytes (CAST5_40_CFB64), that encryption option must not be offered or used.

crypto

normative-requirement §5 REQUIRED

If there are fewer than 32 (10) bytes of key data, the first 16 (5) bytes are used as keyid 0 in each direction. If there are at least 32 (10) bytes, the first 16 (5) are used for client-to-server encryption and the second 16 (5) for server-to-client encryption.

crypto

normative-requirement §2 MUST

The CFB64_IV_OK command MUST be sent for backwards compatibility with existing implementations upon acceptance of the initial vector.

crypto

protocol-element §5

Any key data beyond the minimum required amounts is used as random data to be sent as an initialization vector.

crypto

protocol-element §2

CFB64_IV_BAD is sent only in the case of a protocol violation where the received IV was not the correct length (8 bytes). Only the DO ENCRYPT side may send CFB64_IV_OK or CFB64_IV_BAD.

crypto

protocol-element §2

The CFB64_IV command carries a randomly generated 8-byte initial vector sent in clear text. Only the WILL ENCRYPT side may send this command.

crypto

protocol-element §1

Three suboption commands are defined: CFB64_IV (code 1) for sending the initial vector, CFB64_IV_OK (code 2) for accepting it, and CFB64_IV_BAD (code 3) for rejecting it.

crypto

protocol-element §1

Two encryption type codes are defined: CAST5_40_CFB64 with code 8 (40-bit key) and CAST128_CFB64 with code 10 (128-bit key), for use with the Telnet encryption option.

crypto, registry

registry §1

This document assigns Telnet encryption type numbers: CAST5_40_CFB64 = 8 and CAST128_CFB64 = 10, extending the Telnet Encryption Type registry.

registry, crypto

security-consideration §6

CFB mode does not ensure data integrity; an active attacker who can predict plaintext can modify up to 8 bytes at a time, though the following 8-byte block will be corrupted, making detection likely.

crypto, security

security-consideration §6

Encryption modes using 40-bit keys are not to be considered secure. CAST5_40_CFB64 is documented only to capture existing prevalent implementations.

crypto, security

state-machine §3

After CFB64_IV_OK is received, the WILL ENCRYPT side performs keyid negotiation via ENC_KEYID. Once a common keyid is identified, START and END commands may be exchanged to enable or disable encryption.

crypto

wire-format §4

The CAST 64-bit CFB algorithm uses a 64-bit (8-byte) initial vector and processes data in 64-bit chunks. V0 = CAST(iV, key); On = Dn XOR Vn; V(n+1) = CAST(On, key).

crypto