当前位置: 首页 > news >正文

nist关于rsa中p,q的要求

NIST.FIPS.186-4

美国国家标准与技术研究院(National Institute of Standards and Technology,NIST)

FIPS,美国联邦信息处理标准(Federal Information Processing Standard)

Criteria for IFC Key Pairs

B.3.1 Criteria for IFC Key Pairs
Key pairs for IFC consist of a public key ( n , e ), and a private key ( n , d ), where n is the modulus
and is the product of two prime numbers p and q . The security of IFC depends on the quality and
secrecy of these primes and the private exponent d . The primes p and q shall be generated using 51
one of the following methods:
A. Both p and q are randomly generated prime numbers (Random Primes), where p and q
shall both be either :
1. Provable primes (see Appendix B.3.2), or
2. Probable primes (see Appendix B.3.3).
Using methods 1 and 2, p and q with lengths of 1024 or 1536 bits may be generated; p
and q with lengths of 512 bits shall not be generated using these methods. Instead, p
and q with lengths of 512 bits shall be generated using the conditions based on auxiliary
primes (see Appendices B.3.4, B.3.5, or B.3.6).
B. Both p and q are randomly generated prime numbers that satisfy the following additional
conditions (Primes with Conditions):
( p –1) has a prime factor p 1
( p +1) has a prime factor p 2
( q –1) has a prime factor q 1
( q +1) has a prime factor q 2
where p 1 , p 2 , q 1 and q 2 are called auxiliary primes of p and q .
Using this method, one of the following cases shall apply:
1. The primes p 1 , p 2 , q 1 , q 2 , p and q shall all be provable primes (see Appendix
B.3.4),
2. The primes p 1 , p 2 , q 1 and q 2 shall be provable primes, and the primes p and q
shall be probable primes (see Appendix B.3.5), or
3 The primes p 1 , p 2 , q 1 , q 2 , p and q shall all be probable primes (see Appendix
B.3.6).
The minimum lengths for each of the auxiliary primes p 1 , p 2 , q 1 and q 2 are dependent on
nlen , where nlen is the length of the modulus n in bits. Note that nlen is also called the
key size. The lengths of the auxiliary primes may be fixed or randomly chosen, subject to
the restrictions in Table B.1. The maximum length is determined by nlen (the sum of the
length of each auxiliary prime pair) and whether the primes p and q are probable primes
or provable primes (e.g., for the auxiliary prime pair p 1 and p 2 , len ( p 1 ) + len ( p 2 ) shall be
less than a value determined by nlen , whether p 1 and p 2 are generated to be probable or
provable primes) 3 .
3
In addition, all IFC keys shall meet the following criteria in order to conform to FIPS 186-4:
1. The public exponent e shall be selected with the following constraints:
(a) The public verification exponent e shall be selected prior to generating the primes
p and q , and the private signature exponent d .
(b) The exponent e shall be an odd positive integer such that:
2 16 < e < 2 256 .
Note that the value of e may be any value that meets constraint 1(b), i.e., e may be
either a fixed value or a random value.
2. The primes p and q shall be selected with the following constraints:
(a) ( p –1) and ( q –1) shall be relatively prime to the public exponent e .
(b) The private prime factor p shall be selected randomly and shall satisfy
and len ( q ). In each case, len ( p ) = len ( q ) = nlen /2. 53
( 2 )(2 ( nlen / 2) – 1 ) p (2 nlen / 2 – 1), where nlen is the appropriate length for the
desired security_strength .
(c) The private prime factor q shall be selected randomly and shall satisfy
( 2 )(2 ( nlen / 2) – 1 ) q (2 nlen / 2 – 1), where nlen is the appropriate length for the
desired security_strength .
(d) | p q | > 2 ( nlen / 2) – 100 .
3. The private signature exponent d shall be selected with the following constraints after the
generation of p and q :
(a) The exponent d shall be a positive integer value such that
2 nlen / 2 < d < LCM( p –1, q –1), and
(b) d = e^  –1 mod (LCM( p –1, q –1)).
That is, the inequality in (a) holds, and 1 ( ed ) (mod LCM( p –1, q –1)).
In the extremely rare event that d 2 nlen / 2 , then new values for p , q and d shall be
determined. A different value of e may be used, although this is not required.
Any hash function used during the generation of the key pair shall be approved (i.e., specified in
FIPS 180).

 1,

( p –1) has a prime factor p 1
( p +1) has a prime factor p 2
( q –1) has a prime factor q 1
( q +1) has a prime factor q 2
这些数都应含有大的素因子以对抗光滑数分解(Pollard's p-1,Williams's p+1)。
2, | p q | > 2 ( nlen / 2) – 100 .p和q具有足够的距离以对抗费马分解。
3,计算逆元的模用的LCM( p –1, q –1),并非常见的n的欧拉函数。
4,2 nlen / 2 < d < LCM( p –1, q –1),也规定了d的范围,一般来说d是接近的n的,很难被爆破。

相关文章:

nist关于rsa中p,q的要求

NIST.FIPS.186-4 美国国家标准与技术研究院&#xff08;National Institute of Standards and Technology&#xff0c;NIST&#xff09; FIPS,美国联邦信息处理标准&#xff08;Federal Information Processing Standard&#xff09; Criteria for IFC Key Pairs B.3.1 Crite…...

Vue3项目如何使用TailWind CSS保姆级教程

‌一、简单介绍一下TailWind CSS TailWind CSS是一个实用工具优先的 CSS 框架&#xff0c;它通过提供大量的原子化 CSS 类&#xff0c;允许开发者通过组合这些类来快速构建界面&#xff0c;而无需编写额外的 CSS 文件。这种设计理念使得开发过程更加直观和高效&#xff…...

NO.22十六届蓝桥杯备战|一维数组|七道练习|冒泡排序(C++)

B2093 查找特定的值 - 洛谷 题⽬要求下标是从0开始的&#xff0c;和数组的下标是吻合的&#xff0c;存放数据应该从下标0开始n的取值范围是1~10000数组中存放的值的绝对值不超10000&#xff0c;说明int类型就⾜够了找到了输出下标&#xff0c;找不到要输出-1&#xff0c;这⼀点…...

Mysql的索引失效

MySQL 的索引失效指的是&#xff1a;尽管在表上建立了索引&#xff0c;但在某些查询场景下&#xff0c;MySQL 优化器却没有利用这些索引&#xff0c;从而导致查询走了全表扫描&#xff0c;性能大大降低。下面详细说明几种常见的导致索引失效的情况及其原因&#xff1a; 1. 对索…...

现代前端框架渲染机制深度解析:虚拟DOM到编译时优化

引言&#xff1a;前端框架的性能进化论 TikTok Web将React 18迁移至Vue 3后&#xff0c;点击响应延迟降低42%&#xff0c;内存占用减少35%。Shopify采用Svelte重构核心交互模块&#xff0c;首帧渲染速度提升580%。Discord在Next.js 14中启用React Server Components后&#xf…...

set 和 map 的左右护卫 【刷题反思】

1. 相近的营业额 1.1 题目 题目描述&#xff1a;我们定义&#xff0c;一天营业额的最小波动 min { | 该天以前某一天的营业额 - 该天营业额 | } 特别的&#xff0c;第一天的营业额最小波动为第一天的营业额 输入描述&#xff1a;第一行 n &#xff08;n < 32767&#xf…...

【Linux高级IO】多路转接(poll epoll)

目录 1. poll 2. epoll 2.1 epoll_ctl 2.2 epoll_wait 2.3 epoll原理 2.4 epoll的工作模式 2.5 epoll的惊群效应 使用建议 总结 1. poll poll也是实现 I/O 多路复用的系统调用&#xff0c;可以解决select等待fd上限的问题&#xff0c;将输入输出参数分离&#xff0c;不需要…...

Linux上用C++和GCC开发程序实现两个不同PostgreSQL实例下单个数据库中多个Schema稳定高效的数据迁移到其它PostgreSQL实例

设计一个在Linux上运行的GCC C程序&#xff0c;同时连接三个不同的PostgreSQL实例&#xff0c;其中两个实例中分别有两个数据库中多个Schema的表结构分别与第三实例中两个数据库中多个Schema个结构完全相同&#xff0c;同时复制两个实例中两个数据库中多个Schema里的所有表的数…...

Linux下的网络通信编程

在不同主机之间&#xff0c;进行进程间的通信。 1解决主机之间硬件的互通 2.解决主机之间软件的互通. 3.IP地址&#xff1a;来区分不同的主机&#xff08;软件地址&#xff09; 4.MAC地址&#xff1a;硬件地址 5.端口号&#xff1a;区分同一主机上的不同应用进程 网络协议…...

Windows在多网络下指定上网接口

Windows在多网络下指定上网接口 一、说明 设备情况&#xff1a;win11&#xff0c;同时连接了有线网和WLAN&#xff0c;有线网连接着NAS必须保持连接。需求&#xff1a;有些情况时&#xff0c;有线网无网络而WLAN有网&#xff0c;但系统仍走着有线导致无法上网。 二、方法 过…...

网络安全员证书

软考网络安全员证书&#xff1a;信息安全领域的黄金标准 随着信息技术的飞速发展&#xff0c;网络安全问题日益凸显&#xff0c;网络安全员的需求也日益增加。软考网络安全员证书作为信息安全领域的黄金标准&#xff0c;对于网络安全从业者来说具有重要意义。本文将详细介绍…...

CMU15445(2023fall) Project #4 - Concurrency Control踩坑历程

把树木磨成月亮最亮时的样子&#xff0c; 就能让它更快地滚下山坡&#xff0c; 有时会比骑马还快。 完整代码见&#xff1a; SnowLegend-star/CMU15445-2023fall: Having Conquered the Loftiest Peak, We Stand But a Step Away from Victory in This Stage. With unwavering…...

医疗AR眼镜:FPC如何赋能科技医疗的未来之眼?【新立电子】

随着科技的飞速发展&#xff0c;增强现实&#xff08;AR&#xff09;技术在医疗领域的应用逐渐成为焦点。医疗AR眼镜作为一种前沿的智能设备&#xff0c;正在为医疗行业带来深刻的变革。它不仅能够提升医生的工作效率&#xff0c;还能改善患者的就医体验&#xff0c;成为医疗科…...

Python从0到100(八十九):Resnet、LSTM、Shufflenet、CNN四种网络分析及对比

前言&#xff1a; 零基础学Python&#xff1a;Python从0到100最新最全教程。 想做这件事情很久了&#xff0c;这次我更新了自己所写过的所有博客&#xff0c;汇集成了Python从0到100&#xff0c;共一百节课&#xff0c;帮助大家一个月时间里从零基础到学习Python基础语法、Pyth…...

服务器迁移记录【腾讯云-->阿里云】

准备工作 压缩/root /usr/local/nginx /data三个目录到zip&#xff0c;并下载到本地。 zip root.zip /root zip nginx.zip /usr/local/nginx zip data.zip /datasz root.zip sz nginx.zip sz data.zip连接mysql数据库&#xff0c;导出数据库结构与数据到dzs_mysql.sql 安装l…...

序列化选型:字节流抑或字符串

序列化既可以将对象转换为字节流&#xff0c;也可以转换为字符串&#xff0c;具体取决于使用的序列化方式和场景。 转换为字节流 常见工具及原理&#xff1a;在许多编程语言中&#xff0c;都有将对象序列化为字节流的机制。例如 Python 中的 pickle 模块、Java 中的对象序列化…...

面向实时性的超轻量级动态感知视觉SLAM系统

一、重构后的技术架构设计(基于ROS1 ORB-SLAM2增强) #mermaid-svg-JEJte8kZd7qlnq3E {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-JEJte8kZd7qlnq3E .error-icon{fill:#552222;}#mermaid-svg-JEJte8kZd7qlnq3E .…...

4-3自定义加载器,并添加功能

一、自定义类加载器的实现步骤 ​继承ClassLoader类​ 自定义类加载器需继承java.lang.ClassLoader&#xff0c;并选择性地重写以下方法&#xff1a; ​findClass(String name)&#xff1a;核心方法&#xff0c;用于根据类名查找并加载类的字节码。需从自定义路径&#xff08…...

Python Scrapy爬虫面试题及参考答案

目录 简述 Scrapy 框架的基本工作流程,并说明各组件的作用 Scrapy 中的 Spider、CrawlSpider 和 Rule 的作用及区别? 如何通过 Scrapy Shell 快速调试页面解析逻辑? Scrapy 的 start_requests 方法与 start_urls 的关系是什么? 解释 Scrapy 的 Request 和 Response 对象…...

Swan 表达式 - 选择表达式

ANSYS Swan 表达式支持选择(selection)表达式 case, if/then/else。选择表达式根据特定的条件选择不同的分支流。 if/then/else 表达式 if/then/else 表达式的文法如下 if expr then expr else expr 其中&#xff0c;首个expr 的布尔表达式&#xff0c;若其为 true, 则返回 …...

网络六边形受到攻击

大家读完觉得有帮助记得关注和点赞&#xff01;&#xff01;&#xff01; 抽象 现代智能交通系统 &#xff08;ITS&#xff09; 的一个关键要求是能够以安全、可靠和匿名的方式从互联车辆和移动设备收集地理参考数据。Nexagon 协议建立在 IETF 定位器/ID 分离协议 &#xff08;…...

XCTF-web-easyupload

试了试php&#xff0c;php7&#xff0c;pht&#xff0c;phtml等&#xff0c;都没有用 尝试.user.ini 抓包修改将.user.ini修改为jpg图片 在上传一个123.jpg 用蚁剑连接&#xff0c;得到flag...

使用VSCode开发Django指南

使用VSCode开发Django指南 一、概述 Django 是一个高级 Python 框架&#xff0c;专为快速、安全和可扩展的 Web 开发而设计。Django 包含对 URL 路由、页面模板和数据处理的丰富支持。 本文将创建一个简单的 Django 应用&#xff0c;其中包含三个使用通用基本模板的页面。在此…...

【杂谈】-递归进化:人工智能的自我改进与监管挑战

递归进化&#xff1a;人工智能的自我改进与监管挑战 文章目录 递归进化&#xff1a;人工智能的自我改进与监管挑战1、自我改进型人工智能的崛起2、人工智能如何挑战人类监管&#xff1f;3、确保人工智能受控的策略4、人类在人工智能发展中的角色5、平衡自主性与控制力6、总结与…...

RocketMQ延迟消息机制

两种延迟消息 RocketMQ中提供了两种延迟消息机制 指定固定的延迟级别 通过在Message中设定一个MessageDelayLevel参数&#xff0c;对应18个预设的延迟级别指定时间点的延迟级别 通过在Message中设定一个DeliverTimeMS指定一个Long类型表示的具体时间点。到了时间点后&#xf…...

Oracle查询表空间大小

1 查询数据库中所有的表空间以及表空间所占空间的大小 SELECTtablespace_name,sum( bytes ) / 1024 / 1024 FROMdba_data_files GROUP BYtablespace_name; 2 Oracle查询表空间大小及每个表所占空间的大小 SELECTtablespace_name,file_id,file_name,round( bytes / ( 1024 …...

ESP32读取DHT11温湿度数据

芯片&#xff1a;ESP32 环境&#xff1a;Arduino 一、安装DHT11传感器库 红框的库&#xff0c;别安装错了 二、代码 注意&#xff0c;DATA口要连接在D15上 #include "DHT.h" // 包含DHT库#define DHTPIN 15 // 定义DHT11数据引脚连接到ESP32的GPIO15 #define D…...

CocosCreator 之 JavaScript/TypeScript和Java的相互交互

引擎版本&#xff1a; 3.8.1 语言&#xff1a; JavaScript/TypeScript、C、Java 环境&#xff1a;Window 参考&#xff1a;Java原生反射机制 您好&#xff0c;我是鹤九日&#xff01; 回顾 在上篇文章中&#xff1a;CocosCreator Android项目接入UnityAds 广告SDK。 我们简单讲…...

ElasticSearch搜索引擎之倒排索引及其底层算法

文章目录 一、搜索引擎1、什么是搜索引擎?2、搜索引擎的分类3、常用的搜索引擎4、搜索引擎的特点二、倒排索引1、简介2、为什么倒排索引不用B+树1.创建时间长,文件大。2.其次,树深,IO次数可怕。3.索引可能会失效。4.精准度差。三. 倒排索引四、算法1、Term Index的算法2、 …...

Android15默认授权浮窗权限

我们经常有那种需求&#xff0c;客户需要定制的apk集成在ROM中&#xff0c;并且默认授予其【显示在其他应用的上层】权限&#xff0c;也就是我们常说的浮窗权限&#xff0c;那么我们就可以通过以下方法在wms、ams等系统服务的systemReady()方法中调用即可实现预置应用默认授权浮…...