用过OpenSSL的DSA的请帮助解惑

快乐鹦鹉 2011-03-03 09:08:57
DSA算法中的签名包括R和S两项数据,但OpenSSL的签名验证函数DSA_verify中,对于签名参数只包含一个指针参数和指针长度参数,那么,R和S两项数据如何作为指针参数传递呢???

int DSA_verify(int type,const unsigned char *dgst,int dgst_len,
const unsigned char *sigbuf, int siglen, DSA *dsa);
第一个参数是加密方式,应该是NID_SHA1
第二个参数是摘要,第三个是摘要的长度
第四个参数是签名,第五个参数是签名的长度
第六个参数是公钥

现在如何把R和S传递给第四个参数呢???

如能成功解决,本贴再加100分感谢。
...全文
410 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
t514901334 2013-06-06
  • 打赏
  • 举报
回复
引用 8 楼 happyparrot 的回复:
[Quote=引用 5 楼 jennyvenus 的回复:] 验签时传数据与签名结果进去,验签再算一个签名比较。 R与S是一样长的吧。 [/Quote] R和S都是20个字节长。 你说的第一句有点看不懂意思。
应该说r,s中都是32字节呢
shi5661 2013-03-26
  • 打赏
  • 举报
回复
一点也不懂。
愤豆 2013-03-05
  • 打赏
  • 举报
回复
DSA签名,验证(读取证书) 2012-01-03 09:47:27| 分类: OpenSSL | 标签: |字号大中小 订阅 . 网上的资料,真的是参差不齐阿,有的完全是在浪费你的时间!签名的输入都用到了md5哈希。 先用命令行生成整数,然后再进行DSA签名认证! openssl dsaparam -noout -out dsakey-pri.pem -genkey 1024 openssl dsa -in dsakey-pri.pem -pubout -out dsakey-pub.pem #include <string.h> #include <openssl/pem.h> #include <openssl/err.h> #include <openssl/dsa.h> unsigned int sig_len; unsigned char* dsa_sign(unsigned char *input_string) { DSA *dsa; FILE *file; unsigned char* sign_string; if ((file = fopen("/home/zc/SSL/dsakey-pri.pem", "r")) == NULL) { perror("open pri key file error"); } //读取私钥 if ((dsa = PEM_read_DSAPrivateKey(file, NULL, NULL, NULL)) == NULL) { ERR_print_errors_fp(stdout); } //分配给签名的信息 sign_string = (unsigned char*) calloc(DSA_size(dsa), sizeof(unsigned char)); if (sign_string == NULL) { fprintf(stderr, "Unable to allocate memory for sign_string\n"); exit(-1); } // sign input_string if (DSA_sign(NID_md5, input_string, strlen((char*) input_string), sign_string, &sig_len, dsa) == 0) { printf("Sign Error.\n"); } return sign_string; } int dsa_verify(unsigned char* sign_string, unsigned char* input_string) { DSA *dsa; FILE *file; if ((file = fopen("/home/zc/SSL/dsakey-pub.pem", "r")) == NULL) { perror("open pub key file error"); } if ((dsa = PEM_read_DSA_PUBKEY(file, NULL, NULL, NULL)) == NULL) { ERR_print_errors_fp(stdout); return 0; } int is_valid_signature = DSA_verify(NID_md5, input_string, strlen( (char*) input_string), sign_string, sig_len, dsa); return is_valid_signature; } int DSA_func(unsigned char *input_str) { int i, ans; unsigned char* input_string; unsigned char* sign_string; //分配空间给哈希 input_string = (unsigned char*) calloc(128, sizeof(unsigned char)); if (input_string == NULL) { fprintf(stderr, "Unable to allocate memory for input_string\n"); exit(-1); } input_string = MD5_func(input_str); sign_string = dsa_sign(input_string); ans = dsa_verify(sign_string, input_string); printf("input string = %s\n", input_str); printf("signed string = "); for (i = 0; i < sig_len; ++i) { printf("%x%x", (sign_string[i] >> 4) & 0xf, sign_string[i] & 0xf); } printf("\n"); printf("is_valid_signature? = %d\n", ans); return ans; }
cnfitc 2012-12-14
  • 打赏
  • 举报
回复
int DSA_do_verify(const unsigned char *dgst,int dgst_len, DSA_SIG *sig,DSA *dsa); typedef struct DSA_SIG_st { BIGNUM *r; BIGNUM *s; } DSA_SIG;
快乐鹦鹉 2011-03-04
  • 打赏
  • 举报
回复
伊人何在
用户 昵称 2011-03-04
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 happyparrot 的回复:]
引用 5 楼 jennyvenus 的回复:
验签时传数据与签名结果进去,验签再算一个签名比较。

R与S是一样长的吧。

R和S都是20个字节长。
你说的第一句有点看不懂意思。
[/Quote]
DSA不懂,rsa和ecc知道一点,rsa验签跟签名的流程一样,最后就是一个memcmp,ecc的验签是传签名时生成的R和S,DSA平时没遇到过。
快乐鹦鹉 2011-03-03
  • 打赏
  • 举报
回复
这个例子对我没啥用啊。现在找到的例子总是这样:
DSA_sign(0, str1, 20, sig, &siglen, dsa);
if (DSA_verify(0, str1, 20, sig, siglen, dsa) == 1)
ret=1;

这没有意义啊,自己先签名,然后再验证,当然没有问题啊。这种样例根本没有参考价值。

实际情况都是有文件形式的证书,然后对证书进行验证,也就是不可能同时进行签名和验证,这两个过程分别由数据提供方和接收方进行,怎么可能一起使用呢。

现在的问题是,DSA_verify函数的参数sig怎么传递?实际得到的签名是在一个文本文件中,并且两个参数R和S是分别给出的,而这个函数的参数却只有一个指针,不知道怎么把两个字符串传递给这一个指针啊。
Chivalry 2011-03-03
  • 打赏
  • 举报
回复
曾经用它做过rsa,当时花了一些时间研究了一下,所以了解一点~
Chivalry 2011-03-03
  • 打赏
  • 举报
回复
上面是OpenSSL库下面的test目录下的dsatest.c的内容,看看对你有没有用,呵呵~
Chivalry 2011-03-03
  • 打赏
  • 举报
回复
/* crypto/dsa/dsatest.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/

/* Until the key-gen callbacks are modified to use newer prototypes, we allow
* deprecated functions for openssl-internal code */
#ifdef OPENSSL_NO_DEPRECATED
#undef OPENSSL_NO_DEPRECATED
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>

#include "../e_os.h"

#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/bn.h>

#ifdef OPENSSL_NO_DSA
int main(int argc, char *argv[])
{
printf("No DSA support\n");
return(0);
}
#else
#include <openssl/dsa.h>

#ifdef OPENSSL_SYS_WIN16
#define MS_CALLBACK _far _loadds
#else
#define MS_CALLBACK
#endif

static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *arg);

/* seed, out_p, out_q, out_g are taken from the updated Appendix 5 to
* FIPS PUB 186 and also appear in Appendix 5 to FIPS PIB 186-1 */
static unsigned char seed[20]={
0xd5,0x01,0x4e,0x4b,0x60,0xef,0x2b,0xa8,0xb6,0x21,0x1b,0x40,
0x62,0xba,0x32,0x24,0xe0,0x42,0x7d,0xd3,
};

static unsigned char out_p[]={
0x8d,0xf2,0xa4,0x94,0x49,0x22,0x76,0xaa,
0x3d,0x25,0x75,0x9b,0xb0,0x68,0x69,0xcb,
0xea,0xc0,0xd8,0x3a,0xfb,0x8d,0x0c,0xf7,
0xcb,0xb8,0x32,0x4f,0x0d,0x78,0x82,0xe5,
0xd0,0x76,0x2f,0xc5,0xb7,0x21,0x0e,0xaf,
0xc2,0xe9,0xad,0xac,0x32,0xab,0x7a,0xac,
0x49,0x69,0x3d,0xfb,0xf8,0x37,0x24,0xc2,
0xec,0x07,0x36,0xee,0x31,0xc8,0x02,0x91,
};

static unsigned char out_q[]={
0xc7,0x73,0x21,0x8c,0x73,0x7e,0xc8,0xee,
0x99,0x3b,0x4f,0x2d,0xed,0x30,0xf4,0x8e,
0xda,0xce,0x91,0x5f,
};

static unsigned char out_g[]={
0x62,0x6d,0x02,0x78,0x39,0xea,0x0a,0x13,
0x41,0x31,0x63,0xa5,0x5b,0x4c,0xb5,0x00,
0x29,0x9d,0x55,0x22,0x95,0x6c,0xef,0xcb,
0x3b,0xff,0x10,0xf3,0x99,0xce,0x2c,0x2e,
0x71,0xcb,0x9d,0xe5,0xfa,0x24,0xba,0xbf,
0x58,0xe5,0xb7,0x95,0x21,0x92,0x5c,0x9c,
0xc4,0x2e,0x9f,0x6f,0x46,0x4b,0x08,0x8c,
0xc5,0x72,0xaf,0x53,0xe6,0xd7,0x88,0x02,
};

static const unsigned char str1[]="12345678901234567890";

static const char rnd_seed[] = "string to make the random number generator think it has entropy";

static BIO *bio_err=NULL;

int main(int argc, char **argv)
{
BN_GENCB cb;
DSA *dsa=NULL;
int counter,ret=0,i,j;
unsigned char buf[256];
unsigned long h;
unsigned char sig[256];
unsigned int siglen;

if (bio_err == NULL)
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);

CRYPTO_malloc_debug_init();
CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);

ERR_load_crypto_strings();
RAND_seed(rnd_seed, sizeof rnd_seed);

BIO_printf(bio_err,"test generation of DSA parameters\n");

BN_GENCB_set(&cb, dsa_cb, bio_err);
if(((dsa = DSA_new()) == NULL) || !DSA_generate_parameters_ex(dsa, 512,
seed, 20, &counter, &h, &cb))
goto end;

BIO_printf(bio_err,"seed\n");
for (i=0; i<20; i+=4)
{
BIO_printf(bio_err,"%02X%02X%02X%02X ",
seed[i],seed[i+1],seed[i+2],seed[i+3]);
}
BIO_printf(bio_err,"\ncounter=%d h=%ld\n",counter,h);

if (dsa == NULL) goto end;
DSA_print(bio_err,dsa,0);
if (counter != 105)
{
BIO_printf(bio_err,"counter should be 105\n");
goto end;
}
if (h != 2)
{
BIO_printf(bio_err,"h should be 2\n");
goto end;
}

i=BN_bn2bin(dsa->q,buf);
j=sizeof(out_q);
if ((i != j) || (memcmp(buf,out_q,i) != 0))
{
BIO_printf(bio_err,"q value is wrong\n");
goto end;
}

i=BN_bn2bin(dsa->p,buf);
j=sizeof(out_p);
if ((i != j) || (memcmp(buf,out_p,i) != 0))
{
BIO_printf(bio_err,"p value is wrong\n");
goto end;
}

i=BN_bn2bin(dsa->g,buf);
j=sizeof(out_g);
if ((i != j) || (memcmp(buf,out_g,i) != 0))
{
BIO_printf(bio_err,"g value is wrong\n");
goto end;
}

dsa->flags |= DSA_FLAG_NO_EXP_CONSTTIME;
DSA_generate_key(dsa);
DSA_sign(0, str1, 20, sig, &siglen, dsa);
if (DSA_verify(0, str1, 20, sig, siglen, dsa) == 1)
ret=1;

dsa->flags &= ~DSA_FLAG_NO_EXP_CONSTTIME;
DSA_generate_key(dsa);
DSA_sign(0, str1, 20, sig, &siglen, dsa);
if (DSA_verify(0, str1, 20, sig, siglen, dsa) == 1)
ret=1;

end:
if (!ret)
ERR_print_errors(bio_err);
if (dsa != NULL) DSA_free(dsa);
CRYPTO_cleanup_all_ex_data();
ERR_remove_state(0);
ERR_free_strings();
CRYPTO_mem_leaks(bio_err);
if (bio_err != NULL)
{
BIO_free(bio_err);
bio_err = NULL;
}
#ifdef OPENSSL_SYS_NETWARE
if (!ret) printf("ERROR\n");
#endif
EXIT(!ret);
return(0);
}

static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *arg)
{
char c='*';
static int ok=0,num=0;

if (p == 0) { c='.'; num++; };
if (p == 1) c='+';
if (p == 2) { c='*'; ok++; }
if (p == 3) c='\n';
BIO_write(arg->arg,&c,1);
(void)BIO_flush(arg->arg);

if (!ok && (p == 0) && (num > 1))
{
BIO_printf((BIO *)arg,"error in dsatest\n");
return 0;
}
return 1;
}
#endif
xengine-qyt 2011-03-03
  • 打赏
  • 举报
回复
我只是拷贝过去的。没弄过!能帮就帮呗,别这么大意见 没弄过!
快乐鹦鹉 2011-03-03
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 jennyvenus 的回复:]
验签时传数据与签名结果进去,验签再算一个签名比较。

R与S是一样长的吧。
[/Quote]
R和S都是20个字节长。
你说的第一句有点看不懂意思。
快乐鹦鹉 2011-03-03
  • 打赏
  • 举报
回复
楼上的,拜托看完贴再回好不好哦......
xengine-qyt 2011-03-03
  • 打赏
  • 举报
回复


#include <string.h>

#include <openssl/objects.h>

#include <openssl/dsa.h>



int main()

{

int ret;

DSA *d;

int i,bits=1024,signlen,datalen,alg,nid;

unsigned chardata[100],signret[200];



d=DSA_new();

ret=DSA_generate_parameters_ex(d,512,NULL,0,NULL,NULL,NULL);

if(ret!=1)

{

DSA_free(d);

return -1;

}

ret=DSA_generate_key(d);

if(ret!=1)

{

DSA_free(d);

return -1;

}

for(i=0;i<100;i++)

memset(&data[i],i+1,1);

printf("please select digest alg: \n");

printf("1.NID_md5\n");

printf("2.NID_sha\n");

printf("3.NID_sha1\n");

printf("4.NID_md5_sha1\n");

scanf("%d",&alg);

if(alg==1)

{

datalen=20;

nid=NID_md5;

}

else if(alg==2)

{

datalen=20;

nid=NID_sha;

}

else if(alg==3)

{

datalen=20;

nid=NID_sha1;

}

else if(alg==4)

{

datalen=20;

nid=NID_md5_sha1;

}

ret=DSA_sign(nid,data,datalen,signret,&signlen,d);

if(ret!=1)

{

printf("DSA_sign err!\n");

DSA_free(d);

return -1;

}

ret=DSA_verify(nid,data,datalen,signret,signlen,d);

if(ret!=1)

{

printf("DSA_verify err!\n");

DSA_free(d);

return -1;

}

DSA_free(d);

printf("test ok!\n");

return 0;

}



用户 昵称 2011-03-03
  • 打赏
  • 举报
回复
验签时传数据与签名结果进去,验签再算一个签名比较。

R与S是一样长的吧。
面向工程应用:市面上的一些密码学课程和密码学的书籍,很多都是从考证出发,讲解算法原理并不面向工程应用,而我们现在缺少的是工程应用相关的知识,本课程从工程应用出发,每种技术都主要讲解其在工程中的使用,并演示工程应用的代码。 从零实现部分算法: 课程中实现了base16编解码 ,XOR对称加解密算法,PKCS7 pading数据填充算法,通过对一些简单算法的实现,从而加深对密码学的理解。理论与实践结合: 课程如果只是讲代码,同学并不能理解接口背后的原理,在项目设计中就会留下隐患,出现错误也不容易排查出问题。如果只讲理论,比如对密码学的一些研究,对于大部分从事工程应用的同学并没有必要,而是理论与实践结合,一切为了工程实践。代码现场打出: 代码不放在ppt而是现场打出,更好的让学员理解代码编写的逻辑,老师现场敲出代码正是展示出了工程项目的思考,每个步骤为什么要这么做,考虑了哪些异常,易学不枯燥: 课程为了确保大部分人开发者都学得会,理解算法原理(才能真正理解算法特性),学会工程应用(接口调用,但不局限接口调用,理解接口背后的机制,并能解决工程中会出现的问题),阅读算法源码但不实现密码算法,,并能将密码学投入到实际工程中,如果是想学习具体的加密算法实现,关注我后面的课程。
第一章 基础知识 8
1.1 对称算法 8
1.2摘要算法 8
1.3 公钥算法 9
1.4 回调函数 11
第二章 openssl简介 13
2.1 openssl简介 13
2.2 openssl安装 13
2.2.1 linux下的安装 13
2.2.2 windows编译与安装 13
2.3 openssl源代码 14
2.4 openssl学习方法 16
第三章openssl堆栈 17
3.1 openssl堆栈 17
3.2 数据结构 17
3.3 源码 17
3.4 定义用户自己的堆栈函数 18
3.5 编程示例 19
第四章 openssl哈希表 21
4.1 哈希表 21
4.2 哈希表数据结构 21
4.3 函数说明 22
4.4 编程示例 24
第五章 openssl内存分配 27
5.1 openssl内存分配 27
5.2 内存数据结构 27
5.3 主要函数 28
5.4 编程示例 28
第六章 Openssl动态模块加载 31
6.1 动态库加载 31
6.2 DSO概述 31
6.3 数据结构 31
6.4 编程示例 32
第七章 openssl抽象IO 35
7.1 openssl抽象IO 35
7.2 数据结构 35
7.3 BIO 函数 36
7.4 编程示例 37
7.4.1 mem bio 37
7.4.2 file bio 37
7.4.3 socket bio 38
7.4.4 md BIO 40
7.4.5 cipher BIO 40
7.4.6 ssl BIO 41
7.4.7 其他示例 43
第八章 Openssl配置文件 44
8.1 概述 44
8.2 openssl配置文件读取 44
8.3 主要函数 44
8.4 编程示例 45
第九章 Openssl随机数 47
9.1 随机数 47
9.2 openssl随机数数据结构与源码 47
9.3 主要函数 48
9.4 编程示例 49
第十章 Openssl文本数据库 51
10.1 概述 51
10.2 数据结构 51
10.3 函数说明 52
10.4 编程示例 52
第十一章 Openssl大数 55
11.1 介绍 55
11.2 openssl大数表示 55
11.3 大数函数 55
11.4 使用示例 58
第十二章 Openssl base64编解码 65
12.1 BASE64编码介绍 65
12.2 BASE64编解码原理 65
12.3 主要函数 66
12.4 编程示例 66
第十三章 Openssl ASN1库 69
13.1 ASN1简介 69
13.2 DER编码 70
13.3 ASN1基本类型示例 71
13.4 openssl 的ASN.1库 73
13.5 用openssl的ASN.1库DER编码 74
13.6 Openssl的ASN.1宏 75
13.7 ASN1常用函数 76
13.8 属性证书编码 90
第十四章 Openssl错误处理 94
14.1 概述 94
14.2 数据结构 94
14.3 主要函数 96
14.4 编程示例 98
第十五章 Openssl摘要与HMAC 101
15.1 概述 101
15.2 openssl摘要实现 101
15.3 函数说明 101
15.4 编程示例 102
15.5 HMAC 103
第十六章 Openssl数据压缩 105
16.1 简介 105
16.2 数据结构 105
16.3 函数说明 106
16.4 openssl中压缩算法协商 106
16.5 编程示例 107
第十七章 Openssl RSA 108
17.1 RSA介绍 108
17.2 openssl的RSA实现 108
17.3 RSA签名与验证过程 109
17.4 数据结构 109
17.4.1 RSA_METHOD 109
17.4.2 RSA 110
17.5 主要函数 111
17.6编程示例 112
17.6.1密钥生成 112
17.6.2 RSA加解密运算 114
17.6.3签名与验证 117
第十八章 Openssl DSA 120
18.1 DSA简介 120
18.2 opensslDSA实现 120
18.3 DSA数据结构 121
18.4 主要函数 122
18.5 编程示例 123
18.5.1密钥生成 123
18.5.2签名与验证 124
第十九章Openssl DH 127
19.1 DH算法介绍 127
19.2 openssl的DH实现 127
19.3数据结构 128
19.4 主要函数 129
19.5 编程示例 130
第二十章 Openssl椭圆曲线 133
20.1 ECC介绍 133
20.2 openssl的ECC实现 133
20.3 主要函数 134
20.4 编程示例 134
第二十一章 Openssl EVP 138
21.1 EVP简介 138
21.2 数据结构 138
21.2.1 EVP_PKEY 138
21.2.2 EVP_MD 139
21.2.3 EVP_CIPHER 140
21.2.4 EVP_CIPHER_CTX 141
21.3 源码结构 141
21.4 摘要函数 142
21.5 对称加解密函数 142
21.6 非对称函数 143
21.7 BASE64编解码函数 144
21.8其他函数 144
21.9 对称加密过程 146
21.10 编程示例 147
第二十二章 Openssl PEM格式 154
22.1 PEM概述 154
22.2 openssl的PEM实现 154
22.3 PEM函数 155
22.4 编程示例 156
第二十三章 Openssl Engine 160
23.1 Engine概述 160
23.2 Engine支持的原理 160
23.3 Engine数据结构 160
23.4 openssl 的Engine源码 161
23.5 Engine函数 162
23.6 实现Engine示例 163
第二十四章 Openssl 通用数据结构 177
24.1通用数据结构 177
24.2 X509_ALGOR 177
24.3 X509_VAL 178
24.4 X509_SIG 180
24.5 X509_NAME_ENTRY 181
24.6 X509_NAME 181
24.7 X509_EXTENSION 187
24.8 X509_ATTRIBUTE 193
24.9 GENERAL_NAME 195
第二十五章 Openssl 证书申 198
25.1 证书申介绍 198
25.2 数据结构 198
25.3 主要函数 199
25.4 编程示例 201
25.4.1生成证书求文件 201
25.4.2 解码证书求文件 203
第二十六章 Openssl X509数字证书 205
26.1 X509数字证书 205
26.2 opessl实现 205
26.3 X509数据结构 205
26.4 X509_TRUST与X509_CERT_AUX 208
26.5 X509_PURPOSE 210
26.6 主要函数 213
26.7 证书验证 216
26.7.1证书验证项 216
26.7.2 Openssl中的证书验证 216
第二十七章 Openssl OCSP 217
27.1 概述 217
27.2 openssl实现 217
27.3 主要函数 217
27.4编程示例 222
第二十八章 Openssl CRL 223
28.1 CRL介绍 223
28.2 数据结构 223
28.3 CRL函数 224
28.4 编程示例 226
第二十九章 Openssl PKCS7 228
29.1概述 228
29.2 数据结构 228
29.3 函数 229
29.4 消息编解码 229
29.4.1 data 230
29.4.2 signed data 230
29.4.3 enveloped 231
29.4.4 signed_and_enveloped 232
29.4.5 digest 233
29.4.6 encrypted 233
29.4.7 读取PEM 234
29.4.8 解码pkcs7 235
第三十章 Openssl PKCS12 236
30.1 概述 236
30.2 openss实现 236
30.3数据结构 236
30.4函数 237
30.5 编程示例 239
第三十一章 Openssl SSL实现 249
31.1概述 249
31.2 openssl实现 249
31.3 建立SSL测试环境 249
31.4 数据结构 250
31.5 加密套件 251
31.6 密钥信息 252
31.7 SESSION 252
31.8 多线程支持 253
31.9 编程示例 253
31.10 函数 264
第三十二章 Openssl命令 267
32.1概述 267
32.2 asn1parse 267
32.3 dgst 269
32.4 gendh 270
32.5 passwd 270
32.6 rand 271
32.7 genrsa 271
32.8 req 272
32.9 x509 274
32.10 version 277
32.11 speed 277
32.12 sess_id 278
32.13 s_server 278
32.14 s_client 280
32.15 rsa 282
32.16 pkcs7 283
32.17 dsaparam 284
32.18 gendsa 284
32.19 enc 285
32.20 ciphers 286
32.21 CA 287
32.22 verify 291
32.23 rsatul 292
32.24 crl 293
32.25 crl2pkcs7 294
32.26 errstr 294
32.27 ocsp 295
32.28 pkcs12 298
32.29 pkcs8 300
32.30 s_time 301
32.31 dhparam和dh 302
32.32 ecparam 303
32.33 ec 304
32.34 dsa 305
32.35 nseq 306
32.36 prime 307
32.37 smime 307

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧