共 6 篇文章 |
|
HMAC算法安全性浅析 | FEITIAN.那么,使用MD5和SHA-1的HMAC算法是不是也已经不安全,应该被淘汰了?(3) 客户端将收到的随机数提供给ePass,由ePass使用该随机数与存储在ePass中的密钥进行HMAC-MD5运算并得到一个结果作为认证证据传给服务器(此为响应)。(4) 与此同时,服务器也使用该随机数与存储在服务器数据库中的该客户密钥进行HMAC-MD5运... 阅221 转0 评0 公众公开 17-09-22 18:46 |
CCM加密学习。这几天终于搞定了AES硬件加密工具的使用,几种简单的加密模式也都实验通过了,比较麻烦的一种是CCM模式的加密,它是CTR加密模式和CMAC认证算法的混合使用。CCM是CTR加密模式和CMAC认证算法的混合使用,常用在需要同时加密和认证的领域,比如WiFi安全中的WPE协议,它就使用了AES-CCM模式。在硬件AES加密引擎上面,没有完整的实现CC... 阅824 转0 评0 公众公开 17-08-30 13:20 |
#if 0 /* Set expected tag value. A restriction in OpenSSL 1.0.1c and earlier * required the tag before any AAD or ciphertext */ EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, sizeof(gcm_tag), gcm_tag);/* Set expected tag value. Works in OpenSSL 1.0.1d and later */ EVP_CIPHER_CTX_ctr... 阅737 转0 评0 公众公开 17-08-30 11:00 |
openssl 消息认证码CMAC支持。openssl的crypto目录下有hmac和cmac两个目录分别实现了hmac和CMAC 其调用也非常简单,基本上按顺序调用下面几个函数即可,HMAC和CMAC调用基本类似。int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, const EVP_CIPHER *cipher, ENGINE *impl);int CMAC_Update(CMAC_CTX *ctx, const v... 阅920 转0 评0 公众公开 17-08-30 10:59 |
int RSA_sign(int type, const unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, RSA *rsa);int RSA_verify(int type, const unsigned char *m, unsigned int m_length, unsigned char *sigbuf, unsigned int siglen, RSA *rsa);//int RSA_verify(int type, const unsigned char *m, unsigned int m_le... 阅114 转0 评0 公众公开 13-07-31 23:40 |