DEP0182:未显式指定 authTagLength 的简短 GCM 认证标签


🌐 DEP0182: Short GCM authentication tags without explicit authTagLength

类型:寿命终止

🌐 Type: End-of-Life

对于 GCM 模式下的密码,decipher.setAuthTag() 函数过去可以接受任何有效长度的认证标签(另见 DEP0090)。为了更好地符合 NIST 特别发布物 800-38D 的建议,这一例外已被移除,而打算使用比默认认证标签长度(即 AES-GCM 的 16 字节)更短的认证标签的应用,必须显式将 crypto.createDecipheriv() 函数的 authTagLength 选项设置为适当的长度。

🌐 For ciphers in GCM mode, the decipher.setAuthTag() function used to accept authentication tags of any valid length (see also DEP0090). This exception has been removed to better align with recommendations per NIST SP 800-38D, and applications that intend to use authentication tags that are shorter than the default authentication tag length (i.e., shorter than 16 bytes for AES-GCM) must explicitly set the authTagLength option of the crypto.createDecipheriv() function to the appropriate length.