跳到主要内容

6. 算法和方法命名 (Algorithm and Method Naming)

  1. 算法和方法命名 (Algorithm and Method Naming)

SSH 协议通过名称引用特定的哈希 (hash)、加密 (encryption)、完整性 (integrity)、压缩 (compression) 和密钥交换 (key exchange) 算法或方法. 有一些标准算法和方法是所有实现 (implementation) 必须 (MUST) 支持的; 也有一些算法和方法在协议规范中定义, 但属于可选 (OPTIONAL). 此外, 预期某些组织会希望使用自己的算法或方法.

在本协议中, 所有算法和方法标识符必须是 (MUST) 可打印的 US-ASCII 非空 字符串, 且长度不超过 64 个字符 (characters). 名称必须 (MUST) 区分 大小写 (case-sensitive).

RFC 4251 SSH Protocol Architecture January 2006

algorithm and method names 有两种格式:

o 不包含 at-sign ("@") 的 names 保留给 IETF CONSENSUS 分配. 示例包括 "3des-cbc", "sha-1", "hmac-sha1" 和 "zlib" (doublequotes 不是 name 的一部分). 这种格式的 names 只有先向 IANA 注册后才有效. Registered names MUST NOT 包含 at-sign ("@"), comma (","), whitespace, control characters (ASCII codes 32 或更小), 或 ASCII code 127 (DEL). Names 是 case-sensitive 的, 且 MUST NOT 长于 64 characters.

o 任何人都可以使用 name@domainname 格式的 names 定义额外 algorithms 或 methods, 例如 "[email protected]". at-sign 之前部分的 格式未指定; 但是, 这些 names MUST 是 printable US-ASCII strings, 且 MUST NOT 包含 comma character (","), whitespace, control characters (ASCII codes 32 或更小), 或 ASCII code 127 (DEL). 它们 MUST 只包含单个 at-sign. at-sign 之后的部分 MUST 是有效的 fully qualified domain name [RFC1034], 且由定义该 name 的个人或组织 控制. Names 是 case-sensitive 的, 且 MUST NOT 长于 64 characters. 每个 domain 如何管理其 local namespace 由其自行决定. 应注意, 这些 names 类似 STD 11 [RFC0822] email addresses. 这纯属巧合, 与 STD 11 [RFC0822] 无关.