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; }
相关推荐
AlbertS5 小时前
Let‘s Encrypt 证书自动续期并自动应用到Nginx
运维·nginx·ssl·cerbot·renew·续期
agathakuan5 天前
Wireshark 解密並導出TLS 1.2 / TLS 1.3 明文的方法(可控制 Client 端)
c语言·wireshark·ssl·openwrt
huainingning5 天前
防火墙重启后ssl登录提示证书过期临时解决方法
linux·服务器·ssl
Geek-Chow6 天前
ALB SSL policy conflict (AWS Load Balancer Controller)
网络协议·ssl·aws
GlobalSign数字证书7 天前
自动化时代,如何高效部署SSL证书?
运维·自动化·ssl
山顶夕景10 天前
【MAE】音频自监督训练Masked Autoencoders that Listen
音视频·ssl·多模态·自监督·mae
froyoisle10 天前
阿里云免费 SSL 证书申请及配置
服务器·阿里云·ssl·网站
VX_1811 天前
域名SSL证书监测平台
网络·网络协议·ssl
REDcker11 天前
用 eBPF 观测 SSL/TLS 明文:原理、钩点与边界
网络·网络协议·ssl
绘梨衣54712 天前
ssl-bad-ecpoint-经验帖
网络·网络协议·ssl