openssl 中已弃用 AES_ige_encrypt() API 的替代方案

Alternative for deprecated AES_ige_encrypt() API in openssl

从 OpenSSL 版本 1.0.0 升级到 1.1.1x 时出现警告,指出 API AES_ige_encrypt() 已弃用,用于使用 AES_ige 进行加密和解密。 尽管源评论说该函数已被弃用,但它没有提及此 API 的任何替代方案。 搜索网络没有提供任何有用的信息。 如果有人可以建议 OpenSSL API 将提供与 AES_ige_encrypt() API.

相同的功能,那将非常有帮助

您确定您使用的 OpenSSL 版本正确吗?该功能在 master 分支中已弃用(即,将成为 OpenSSL 3.0),但在 1.1.1 中尚未弃用。

无论如何,您不应该使用这些模式。根据 CHANGES 条目:

*) The functions AES_ige_encrypt() and AES_bi_ige_encrypt() have been deprecated. These undocumented functions were never integrated into the EVP layer and implement the AES Infinite Garble Extension (IGE) mode and AES Bi-directional IGE mode. These modes were never formally standardised and usage of these functions is believed to be very small. In particular AES_bi_ige_encrypt() has a known bug. It accepts 2 AES keys, but only one is ever used. The security implications are believed to be minimal, but this issue was never fixed for backwards compatibility reasons. New code should not use these modes. [Matt Caswell]

根据我最后的评论 - 新代码不应使用这些模式。如果您正在使用它们,那么另一种方法是寻找满足您要求的替代模式,并使用 EVP 功能来使用该模式。