openssl 中 EVP_aes_256_gcm() 函数展开

在 openssl 中搜索,只能在头文件搜索到 EVP_aes_256_gcm() ,不能直接搜索到它的实现。

它的实现是通过一个宏展开的,挺难找的,如下,做记录:

文件:openssl-1.1.1g/crypto/evp/e_aes.c

c 复制代码
EVP_aes_256_gcm();

// 代码原文:
BLOCK_CIPHER_custom(NID_aes, 256, 1, 12, gcm, GCM,
                    EVP_CIPH_FLAG_AEAD_CIPHER | CUSTOM_FLAGS)

// 展开后原文:
static const EVP_CIPHER aes_256_gcm = {
    901, 1, (0x6 == 0x10001 ? 2 : 1) * 256 / 8, 12, 
    0x200000 | (0 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x800) | 0x6, 
    aes_gcm_init_key, aes_gcm_cipher, aes_gcm_cleanup, sizeof(EVP_AES_GCM_CTX), 
    ((void *)0), ((void *)0), aes_gcm_ctrl, ((void *)0)
    };
const EVP_CIPHER *EVP_aes_256_gcm(void) { return &aes_256_gcm; }
相关推荐
Arwen3032 天前
等保2.0三级认证内网IP SM2 SSL证书
网络协议·tcp/ip·ssl
Arwen3032 天前
内网IP证书:安全加密全指南
网络·网络协议·tcp/ip·ssl
Arwen3032 天前
国密SSL内网IP部署全攻略
网络·网络协议·tcp/ip·ssl
shcoc3 天前
备用 申请acme 申请ssl
网络·网络协议·ssl
草根站起来3 天前
局域网内网IP能不能申请SSL证书
服务器·tcp/ip·ssl
maycho1233 天前
基于YOLOv8深度学习的磁瓦缺陷检测:完整数据集实验之旅
ssl
BullSmall3 天前
Tomcat SSL 配置及常见问题
java·tomcat·ssl
Fr2ed0m5 天前
HTTP vs HTTPS vs SSL/TLS:https协议全面解析(附HTTPS部署指南)
http·https·ssl
宋拾壹6 天前
物理服务器映射端口
网络协议·ssl
张3蜂6 天前
SQL Server 数据库 的通信加密配置SSL安全连接
数据库·安全·ssl