liuqun / openssl-demo Goto Github PK
View Code? Open in Web Editor NEW1测试TLS1.2报文修改; 2测试OpenSSL1.1.1提供的SM4对称加密算法;
1测试TLS1.2报文修改; 2测试OpenSSL1.1.1提供的SM4对称加密算法;
。。。
测试程序中假定块长度必须是16字节, 否则输出缓冲区会溢出
https://github.com/liuqun/openssl-sm4-demo/blob/475732997a3727a682b5bb61bf6adb407baef6ce/main.c#L32
https://www.openssl.org/docs/manmaster/man3/EVP_sm4_cbc.html
#include <openssl/evp.h>
const EVP_CIPHER *EVP_sm4_cbc(void);
const EVP_CIPHER *EVP_sm4_ecb(void);
const EVP_CIPHER *EVP_sm4_cfb(void);
const EVP_CIPHER *EVP_sm4_cfb128(void);
const EVP_CIPHER *EVP_sm4_ofb(void);
const EVP_CIPHER *EVP_sm4_ctr(void);
OpenSSL的EVP_Cipher API为什么不检查密钥长度?
只有一个EVP_MAX_KEY_LENGTH
可以作为密钥长度上限
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.