摘要: 密码工程-大素数 #include<stdio.h> #include<openssl/bn.h> #include <string.h> int main(){ BIGNUM *r; char *out; r = BN_new(); BN_generate_prime_ex(r, 256, 0, 阅读全文
posted @ 2021-06-03 11:15 20181217Cindy 阅读(70) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //这里用了int类型,所支持的整数范围较小且本程序仅支持非负整数,可能缺乏实际用途,仅供演示。 struct EX_GCD { //s,t是裴蜀等式中的系数,gcd是a,b的最大公约数 int s; int t; int gcd; }; struct EX_G 阅读全文
posted @ 2021-06-03 09:02 20181217Cindy 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1.使用OpenSSL的命令产生不少于5个素数,提交运行结果截图(5‘) 参考《密码工程》p107伪代码基于Eratosthenes算法实现 SmallPrimeList,写出测试代码与OpenSSL产生的素数对比,提交代码和运行结果截图(10 ’) #include <stdio.h> #defi 阅读全文
posted @ 2021-06-03 08:18 20181217Cindy 阅读(179) 评论(0) 推荐(0) 编辑