CN112383398A - 使用哈希函数构造cca2安全的密码方案的方法 - Google Patents
使用哈希函数构造cca2安全的密码方案的方法 Download PDFInfo
- Publication number
- CN112383398A CN112383398A CN202011179218.XA CN202011179218A CN112383398A CN 112383398 A CN112383398 A CN 112383398A CN 202011179218 A CN202011179218 A CN 202011179218A CN 112383398 A CN112383398 A CN 112383398A
- Authority
- CN
- China
- Prior art keywords
- scheme
- hash function
- constructing
- key
- ciphertext
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 22
- 101100217298 Mus musculus Aspm gene Proteins 0.000 claims description 3
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
- H04L9/3239—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Storage Device Security (AREA)
Abstract
本发明公开了使用哈希函数构造CCA2安全的密码方案的方法,通过本方案得到CCA2安全的方案为Π′=KeyGen′,Enc′,Dec′,本方案在Random Oracle的背景之下,使用哈希函数的摘要结果,保证密文的完整性,并将摘要结果与原始密文合并,组成算法输出的密文,使其满足RO模型的安全性要求,能够抵御CCA2攻击。
Description
技术领域
本发明涉及密文加密的技术领域,特别涉及使用哈希函数构造CCA2安全的密码方案的方法。
背景技术
针对某些支持密文上运算的加密算法,由于其密文具有一定的延展性,使得其无法保证CCA2安全,具有一定的安全隐患。
发明内容
本发明的目的在于提供使用哈希函数构造CCA2安全的密码方案的方法,以解决上述背景技术中提出的问题。
为实现上述目的,本发明提供如下技术方案:
使用哈希函数构造CCA2安全的密码方案的方法,包括数据加密方与数据解密方,包括以下步骤:
步骤1、KeyGen′:数据加密方输入输入安全参数k,依据k生成到密钥key,以及哈希函数H(·);
步骤2、Enc′:数据加密方输入消息m,使用key加密m得到密文c1,并使用函数运算c2=H(c1||key),公式中c2为运算得到的摘要结果;
步骤3、Dec′:输入c1,c2,先验算c2=H(c1||key)是否成立,若成立则继续,若不成立则放弃继续执行方案;
步骤4、使用步骤1中的key解密c1得到m。
进一步地,在步骤1中基于Paillier加密方案的运算过程:
输入安全参数k,设n=pq,其中p和q是大素数,|p|=|q|=k,即设定p,q的长度为k,记λ=lcm(p-1,q-1),lcm为最小公倍数,取g=n+1,公钥pk=(g,n),私钥sk=λ。
进一步地,步骤2中基于Paillier加密方案的运算过程:
取明文m,m<n,随机选取随机数r<n;
使用公钥pk计算密文c=gm·rnmod n2,mod为求余运算。
讲一步地,步骤3中基干Paillier加密方案的运算过程:
进一步地,哈希函数可以选用目前比较通用的SHA256,SHA1,MD5哈希函数。
与现有技术相比,本发明的有益效果是:本发明的方案在Random Oracle的背景之下,使用哈希函数的摘要结果,保证密文的完整性,并将摘要结果与原始密文合并,组成算法输出的密文,使其满足RO模型的安全性要求,能够抵御CCA2攻击。
具体实施方式
下面将对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
实施例
本发明提供一种技术方案:便用哈希函数构造CCA2安全的密码方案的方法,包括数据加密方与数据解密方,包括以下步骤:
步骤1、KeyGen′:数据加密方输入输入安全参数k,依据k生成到密钥key,以及哈希函数H(·);
步骤2、Enc′:数据加密方输入消息m,使用kdy加密m得到密文c1,并使用函数运算c2=H(c1||key),公式中c2为运算得到的摘要结果;
步骤3、Dec′:输入c1,c2,先验算c2=H(c1||key)是否成立,若成立则继续,若不成立则放弃继续执行方案;
步骤4、使用步骤1中的key解密c1得到m。
下述技术方案仅采用通用的Paillier加密方案进行实施例展示:
在步骤1中基于Paillier加密方案的运算过程:
输入安全参数k,设n=pq,其中p和q是大素数,|p|=|q|=k,即设定p,q的长度为k,记λ=lcm(p-1,q-1),1cm为最小公倍数,取g=n+1,公钥pk=(g,n),私钥sk=λ。
步骤2中基于Paillier加密方案的运算过程:
取明文m,m<n,随机选取随机数r<n;
使用公钥pk计算密文c=gm·rnmod n2,mod为求余运算。
步骤3中基干Paillier加密方案的运算过程:
哈希函数可以选用目前比较通用的SHA256,SHA1,MD5哈希函数。
在本发明的描述中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”、“固定”应做广义理解,可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义,电路连接采用现有技术中常规的连接方式,在此不再详述。
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同物限定。
Claims (5)
1.使用哈希函数构造CCA2安全的密码方案的方法,包括数据加密方与数据解密方,其特征在于,包括以下步骤:
步骤1、KeyGen′:数据加密方输入输入安全参数k,依据k生成到密钥key,以及哈希函数H(·);
步骤2、Enc′:数据加密方输入消息m,使用key加密m得到密文c1,并使用函数运算c2=H(c1||key),公式中c2为运算得到的摘要结果;
步骤3、Dec′:输入c1,c2,先验算c2=H(c1||key)是否成立,若成立则继续,若不成立则放弃继续执行方案;
步骤4、使用步骤1中的key解密c1得到m。
2.根据权利要求1所述的使用哈希函数构造CCA2安全的密码方案的方法,其特征在于,在步骤1中基于Paillier加密方案的运算过程:
输入安全参数k,设n=pq,其中p和q是大素数,|p|=|q|=k,即设定p,q的长度为k,记λ=lcm(p-1,q-1),1cm为最小公倍数,取g=n+1,公钥pk=(g,n),私钥sk=λ。
3.根据权利要求1所述的使用哈希函数构造CCA2安全的密码方案的方法,其特征在于,步骤2中基于Paillier加密方案的运算过程:
取明文m,m<n,随机选取随机数r<n;
使用公钥pk计算密文c=gm·rnmod n2,公式中mod为求余运算。
5.根据权利要求1所述的使用哈希函数构造CCA2安全的密码方案的方法,其特征在于,哈希函数选用目前比较通用的SHA256,SHA1,MD5哈希函数。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011179218.XA CN112383398A (zh) | 2020-10-29 | 2020-10-29 | 使用哈希函数构造cca2安全的密码方案的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011179218.XA CN112383398A (zh) | 2020-10-29 | 2020-10-29 | 使用哈希函数构造cca2安全的密码方案的方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112383398A true CN112383398A (zh) | 2021-02-19 |
Family
ID=74577012
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011179218.XA Pending CN112383398A (zh) | 2020-10-29 | 2020-10-29 | 使用哈希函数构造cca2安全的密码方案的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112383398A (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107241196A (zh) * | 2017-06-30 | 2017-10-10 | 杰创智能科技股份有限公司 | 基于区块链技术的数字签名方法及系统 |
CN108989346A (zh) * | 2018-08-30 | 2018-12-11 | 上海同态信息科技有限责任公司 | 基于账号隐匿的第三方有效身份托管敏捷认证访问模式 |
CN110176986A (zh) * | 2019-05-30 | 2019-08-27 | 杭州奇治信息技术股份有限公司 | 一种多重加密的数据加密方法、装置及移动终端 |
CN111639345A (zh) * | 2019-03-01 | 2020-09-08 | 王伟 | 基于同态加密的安全的多方云计算的方法和系统 |
-
2020
- 2020-10-29 CN CN202011179218.XA patent/CN112383398A/zh active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107241196A (zh) * | 2017-06-30 | 2017-10-10 | 杰创智能科技股份有限公司 | 基于区块链技术的数字签名方法及系统 |
CN108989346A (zh) * | 2018-08-30 | 2018-12-11 | 上海同态信息科技有限责任公司 | 基于账号隐匿的第三方有效身份托管敏捷认证访问模式 |
CN111639345A (zh) * | 2019-03-01 | 2020-09-08 | 王伟 | 基于同态加密的安全的多方云计算的方法和系统 |
CN110176986A (zh) * | 2019-05-30 | 2019-08-27 | 杭州奇治信息技术股份有限公司 | 一种多重加密的数据加密方法、装置及移动终端 |
Non-Patent Citations (1)
Title |
---|
郭俊岭等: "基于同态加密技术的实验室开放管理系统", 《信息安全研究》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11233659B2 (en) | Method of RSA signature or decryption protected using a homomorphic encryption | |
CN110958219B (zh) | 一种面向医疗云共享数据的sm2代理重加密方法与装置 | |
JP2017063432A (ja) | 証明書不要公開鍵基盤に基づく安全なクライアント・サーバ通信プロトコルを設計するシステムと方法 | |
CN111342976B (zh) | 一种可验证的理想格上门限代理重加密方法及系统 | |
CN110138543B (zh) | 格公钥密码体制下的盲签密方法 | |
CN111277412B (zh) | 基于区块链密钥分发的数据安全共享系统及方法 | |
CN105933345B (zh) | 一种基于线性秘密共享的可验证外包属性基加密方法 | |
CN110572370B (zh) | 一种抗量子攻击的代理重加密系统及方法 | |
CN111953479B (zh) | 数据处理的方法及装置 | |
CN112737764B (zh) | 一种轻量级多用户多数据的全同态数据加密封装方法 | |
CN110519226B (zh) | 基于非对称密钥池和隐式证书的量子通信服务端保密通信方法和系统 | |
CN114095170B (zh) | 数据处理方法、装置、系统及计算机可读存储介质 | |
Chatterjee et al. | Cryptography in cloud computing: a basic approach to ensure security in cloud | |
CN110851845A (zh) | 一种轻量级单用户多数据的全同态数据封装方法 | |
CN110784300B (zh) | 一种基于乘法同态加密的密钥合成方法 | |
CN109756335B (zh) | 一种阶为梅森素数的有限域乘法群的公钥加密解密方法 | |
Oleiwi et al. | Overview and Performance Analysis of Encryption Algorithms | |
CN109981254B (zh) | 一种基于有限李型群分解问题的微型公钥加解密方法 | |
CN114362912A (zh) | 基于分布式密钥中心的标识密码生成方法、电子设备及介质 | |
CN115809459A (zh) | 软件密码模块的数据保护及解密方法、系统、设备及介质 | |
CN116436593A (zh) | 一种基于代理重加密的tee联邦学习隐私保护方法 | |
CN112383398A (zh) | 使用哈希函数构造cca2安全的密码方案的方法 | |
CN115276986A (zh) | 一种通用场景下的云代理池分流重加密共享方法 | |
JP4563037B2 (ja) | 暗号化装置および復号化装置、並びにこれらを備えた暗号システム、暗号化方法および復号化方法 | |
Das et al. | Cryptanalysis of Signcryption Protocols Based On Elliptic Curve |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210219 |
|
RJ01 | Rejection of invention patent application after publication |