WO2019104455A1 - Encryption/decryption method, encryption/decryption terminal, and double random phase encryption and decryption system - Google Patents

Encryption/decryption method, encryption/decryption terminal, and double random phase encryption and decryption system Download PDF

Info

Publication number
WO2019104455A1
WO2019104455A1 PCT/CN2017/113261 CN2017113261W WO2019104455A1 WO 2019104455 A1 WO2019104455 A1 WO 2019104455A1 CN 2017113261 W CN2017113261 W CN 2017113261W WO 2019104455 A1 WO2019104455 A1 WO 2019104455A1
Authority
WO
WIPO (PCT)
Prior art keywords
ciphertext
value
decryption
encryption
cyclic shift
Prior art date
Application number
PCT/CN2017/113261
Other languages
French (fr)
Chinese (zh)
Inventor
邹文斌
庄兆永
焦述铭
李霞
徐晨
Original Assignee
深圳大学
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳大学 filed Critical 深圳大学
Priority to PCT/CN2017/113261 priority Critical patent/WO2019104455A1/en
Publication of WO2019104455A1 publication Critical patent/WO2019104455A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords

Definitions

  • the invention belongs to the technical field of data processing, and in particular relates to an encryption/decryption method against an ciphertext attack, an encryption/decryption terminal and a dual random phase encryption and decryption system.
  • optical encryption systems are widely used in information encryption, information authentication and information hiding.
  • information is processed optically rather than digitally, so it has the advantages of multi-dimensionality, high parallelism and fast processing speed.
  • the Double Random Phase Encoding (DRPE) system was the first attempt to encrypt information using an optical encryption system in 1995.
  • the DRPE can be used in the image domain and the Fourier transform domain of the 4f optical lens system, or in the fractional Fourier domain, Fresnel domain.
  • DRPE technology still faces some difficulties and challenges, such as the lack of security strength of DRPE systems.
  • the technical problem to be solved by the present invention is to provide an encryption/decryption method against an ciphertext attack, an encryption/decryption terminal, and a dual random phase encryption and decryption system, which aims to solve the problem that the ciphertext only attack COA can be separately secreted in the prior art.
  • the plaintext is illegally recovered, and the DRPE system has serious security vulnerabilities.
  • an encryption method includes:
  • the quasi-final ciphertext is input into a double random phase encryption system to obtain a final ciphertext.
  • the generating the hidden key according to the preset cyclic shift value and the flip value includes:
  • the key seed is input to a random number generator to generate the hidden key.
  • the shifting and flipping the original plaintext by using the hidden key to obtain the initial ciphertext includes:
  • the shifting and flipping the initial ciphertext picture according to the cyclic shift value and the flip value to obtain the quasi-final ciphertext includes:
  • the embodiment of the invention further provides an encryption terminal, including:
  • a key generating unit configured to generate a hidden key according to the preset cyclic shift value and the flip value
  • the plaintext encryption unit is configured to encrypt the original plaintext by using the hidden key to obtain an initial ciphertext image, and perform shifting and flipping on the initial ciphertext image according to the cyclic shift value and the flip value to obtain a quasi-final secret
  • the quasi-final ciphertext is input into the double random phase encryption system to obtain a final ciphertext.
  • plaintext encryption unit is specifically configured to:
  • the embodiment of the invention further provides a decryption method, including:
  • the shifting and flipping the quasi-final ciphertext according to the decryption shift flip information, and obtaining the initial ciphertext image comprises:
  • the embodiment of the invention further provides a decryption end, comprising:
  • a ciphertext decryption unit configured to input the decryption key and the final ciphertext into the double random phase decryption system to obtain a quasi-final ciphertext
  • An initial decrypting unit configured to calculate a cyclic shift value (x 0 , y 0 ) and a flip value f p according to the original position reference information and the position reference information in the quasi-final ciphertext, and the cyclic shift value (x) 0 , y 0 ) and the inverted value f p are used as decryption shift flip information, and the quasi-final ciphertext is respectively shifted and inverted according to the cyclic shift value (-x 0 , -y 0 ) flip value -f p , respectively.
  • a plaintext decryption unit configured to generate a key seed according to the cyclic shift value (x 0 , y 0 ) and a flip value f p , and input the key seed into a random number generator to generate the hidden key, and
  • the initial ciphertext picture is binary coded to obtain a binary sequence initial ciphertext, and the binary sequence initial ciphertext is decrypted by using the hidden key to obtain a binary plaintext, and the binary plaintext is converted to obtain the original Clear text.
  • the embodiment of the invention further provides a dual random phase encryption and decryption system against ciphertext attacks, including the encryption terminal and the decryption terminal described above.
  • the present invention has the beneficial effects that the embodiment of the present invention generates a hidden key according to the cyclic shift value and the inverted value preset by the user, and encrypts the original plaintext by using the hidden key to obtain an initial ciphertext.
  • the image is shifted and inverted according to the preset cyclic shift value and the inverted value to obtain the quasi-final ciphertext, and finally the quasi-final ciphertext is input into the double random phase encryption system DRPE to obtain the final ciphertext. .
  • the embodiment of the present invention generates a hidden key by using a cyclic shift value and a flip value, and constructs an additional encryption layer in the original plaintext and dual random phase encryption system DRPE by using the hidden key, because the ciphertext attack COA is in the pair.
  • the ciphertext attack cannot obtain the correct cyclic shift and flip value, so the hidden key cannot be obtained according to the correct cyclic shift and the flip value, so that the final ciphertext encrypted by the embodiment of the present invention cannot be cracked.
  • Embodiments of the invention are capable of enhancing the security of a dual random phase encryption system.
  • FIG. 1 is a flowchart of an encryption method according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an encryption end according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a decryption method according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a decryption end according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a dual random phase encryption and decryption system against ciphertext attack according to an embodiment of the present invention
  • FIG. 6 is a flowchart of a dual random phase encryption and decryption system against ciphertext attack according to an embodiment of the present invention.
  • the cyclic shift value and the flip value input by the user are used to generate hidden key information and utilize the hidden secret.
  • the key constructs an additional layer of encryption between the original plaintext and the dual random phase encryption system DRPE.
  • FIG. 1 shows an encryption method provided by an embodiment of the present invention, including:
  • the cyclic shift value is represented by (x 0 , y 0 )
  • the inverted value is represented by f p
  • the cyclic shift value (x 0 , y 0 ) and the inverted value f p are used as the encrypted information, according to the
  • the encryption information generates a hidden key
  • the specific steps include: generating a key seed according to the cyclic shift value (x 0 , y 0 ) and the flip value f p , and inputting the key seed into the random number generator to generate the hidden secret key.
  • step S102 the original plaintext is encrypted by using the hidden key generated in step S101.
  • the specific encryption process includes: binary encoding the original plaintext to obtain an original binary plaintext; and using the hidden key to the original binary
  • the plaintext is encrypted to obtain a binary sequence initial ciphertext; the binary sequence initial ciphertext is converted into the initial ciphertext picture.
  • the hidden secret generated by the user-preset cyclic shift value and the flip value is generated.
  • the key encrypts the original plaintext, making the original plaintext more secure with this simple encryption operation.
  • converting the initial ciphertext of the binary sequence to the original ciphertext image is to convert the binary number in the initial ciphertext of the binary sequence into a decimal number, and the decimal number is the pixel of the initial ciphertext image.
  • the initial ciphertext image obtained by encrypting in step S102 is again flipped and flipped by using the cyclic shift value and the flip value preset by the user.
  • the specific shift flipping process includes: inserting the original in the initial ciphertext image. Position reference information, obtaining a reference picture; shifting the reference picture according to the cyclic shift value, and flipping the shifted reference picture according to the inversion value to obtain the quasi-final ciphertext.
  • an additional encryption layer is added between the original plaintext and the DRPE system, and the encryption layer is implemented by a loop key generated by the user and a hidden key generated by the inverted value, and the encryption method is implemented by the encryption method. It can enhance the security of the existing DRPE system and solve the problem of ciphertext attacking COA.
  • FIG. 2 shows an encryption terminal provided by an embodiment of the present invention, including:
  • the key generation unit 201 is configured to generate a hidden key according to the preset cyclic shift value and the inverted value;
  • the plaintext encryption unit 202 is configured to encrypt the original plaintext by using the hidden key to obtain an initial ciphertext image, and perform shifting and flipping on the initial ciphertext image according to the cyclic shift value and the flip value to obtain a quasi-final In the ciphertext, the quasi-final ciphertext is input into the double random phase encryption system to obtain the final ciphertext.
  • plaintext encryption unit 201 is specifically configured to:
  • FIG. 3 shows a decryption method provided by an embodiment of the present invention, including:
  • S302 Perform shifting and flipping the quasi-final ciphertext according to the decryption shift flip information to obtain an initial ciphertext picture;
  • step 301 the user uses the encryption key of the DRPE encryption system as the decryption key, inputs the decryption key and the final ciphertext into the dual random phase decryption system, and decrypts the quasi-final ciphertext through the double random phase decryption system.
  • the quasi-final ciphertext includes position reference information, and the original position reference information used in the encryption and the position reference information in the quasi-final ciphertext are calculated to obtain the position distance of the two, and the cyclic shift is determined according to the position distance.
  • the quasi-final ciphertext shifts the cyclic shift value (-x 0 , -y 0 ) and the flip value -f p according to the cyclic shift value (-x 0 , -y 0 ) and the flip value -f p
  • the quasi-final ciphertext is shifted and flipped to obtain an initial ciphertext picture.
  • step S303 the decryption end generates a key seed according to the cyclic shift value (x 0 , y 0 ) and the inverted value f p , and inputs the key seed into a random number generator to generate the hidden key.
  • the initial ciphertext picture is binary coded to obtain a binary sequence initial ciphertext, and the binary sequence initial ciphertext is decrypted by using the hidden key to obtain a binary plaintext, and the binary plaintext is converted to obtain the original plaintext. .
  • FIG. 4 shows a decryption end according to an embodiment of the present invention, including:
  • a ciphertext decryption unit 401 configured to input the decryption key and the final ciphertext into the double random phase decryption system to obtain a quasi-final ciphertext;
  • the initial decryption unit 402 is configured to perform shifting and flipping the quasi-final ciphertext according to the decryption shift flip information to obtain an initial ciphertext picture.
  • the plaintext decryption unit 403 is configured to generate a hidden key according to the decrypted shift flip information, and decrypt the initial ciphertext image according to the hidden key to obtain an original plaintext.
  • the initial decryption unit 402 is specifically configured to: calculate a cyclic shift value (x 0 , y 0 ) and a flip value f p according to the original position reference information and the position reference information in the quasi-final ciphertext, in the loop
  • the shift value (x 0 , y 0 ) and the flip value f p are used as decryption shift flip information, and the quasi-final ciphertext is respectively inverted according to the cyclic shift value ( ⁇ x 0 , ⁇ y 0 ) ⁇ f p Shift and flip to get the initial ciphertext picture.
  • the plaintext decryption unit 403 is specifically configured to: generate a key seed according to the cyclic shift value (x 0 , y 0 ) and the inverted value f p , and input the key seed into a random number generator to generate the hidden key Binding the initial ciphertext picture to obtain a binary sequence initial ciphertext, decrypting the binary sequence initial ciphertext by using the hidden key, obtaining a binary plaintext, and converting the binary plaintext to obtain a The original plain text.
  • FIG. 5 shows a dual random phase encryption and decryption system against ciphertext attack according to an embodiment of the present invention, including the encryption end shown in FIG. 2 and the decryption end shown in FIG.
  • an encryption end may correspond to one or more decryption ends, that is, after the encryption end completes encryption of the original plaintext, the encrypted final ciphertext is transmitted to one or more decryption ends, and the decryption end transmits according to the encryption end.
  • the final ciphertext and the encryption key used in the encryption decrypt the final key.
  • the encryption end and the decryption end perform encryption and decryption in a symmetric manner, that is, when the encryption end uses a random number generator to generate a hidden key, the same random number generator is used to generate a hidden key on the decryption end, and the encryption end will be used.
  • the encryption key used in the final ciphertext input into the DEPR encryption system will be used as the decryption key when the decryption end decrypts the final ciphertext using the DRPE decryption system.
  • the decryption end When decrypting the final ciphertext transmitted by the encryption end, the decryption end needs to use the original location reference information used for encryption, the preset cyclic shift value and the flip value of the user, and the encryption key of the encryption end, and the encryption end is used by the decryption end.
  • the encryption key, the original location reference information, the cyclic shift value, and the flip value can complete the decryption of the final ciphertext.
  • FIG. 6 shows an encryption and decryption process of a dual random phase encryption and decryption system against ciphertext attack provided by an embodiment of the present invention, including:
  • the encryption end performs binary coding on the original plaintext 2DC1 to obtain the original binary plaintext;
  • the encryption end combines the cyclic shift value (x 0 , y 0 ) set by the user and the inverted value f p to generate a key seed;
  • the encryption end inputs the key seed into the random number generator to generate a hidden key
  • the encryption end encrypts the original binary plaintext by using a hidden key to obtain a binary sequence initial ciphertext
  • the encryption end converts the initial ciphertext of the binary sequence into the initial ciphertext picture 703D;
  • the encryption end inserts the original position reference information Y into the initial ciphertext picture 703D to obtain a reference picture, and shifts and flips the reference picture according to the cyclic shift value (x 0 , y 0 ) and the inverted f p value set by the user. Obtain the quasi-final ciphertext Y703D;
  • the encryption terminal inputs the quasi-final ciphertext Y703D into the double random phase encryption system DRPE to obtain the final ciphertext;
  • the encryption end transmits the final ciphertext to a specific decryption end in an unsafe environment
  • the decryption end uses the key of the double random phase encryption system DRPE as the decryption key, and inputs the decryption key and the final ciphertext into the double random phase decryption system to obtain the decrypted quasi-final ciphertext Y703D;
  • the decryption end determines the cyclic shift value according to the calculated position distance according to the original position reference information Y in the decrypted quasi-final ciphertext Y703D, combined with the position distance calculated according to the original position reference information Y inserted during encryption. 0 , y 0 ) and flipping the f p value, the decryption end decrypts the quasi-final ciphertext Y703D according to the loop position (-x 0 , -y 0 ) and flips -f p to obtain the initial ciphertext picture 703D;
  • the decryption end performs binary encoding on the initial ciphertext picture 703D to obtain a binary sequence initial ciphertext
  • the decryption end combines the decrypted cyclic shift value (x 0 , y 0 ) and the inverted f p value to generate a key seed;
  • the decryption end inputs the key seed into the same random number generator as the encryption end to generate a hidden key
  • the decryption end decrypts the initial ciphertext of the binary sequence according to the hidden key, and obtains the decrypted binary plaintext
  • the decryption end converts the decrypted binary plaintext into the decrypted plaintext 2DC1.
  • the cyclic shift and flip state of the plaintext content recovered by the existing ciphertext attack COA crack recovery using the double random phase encryption system DRPE research is usually an incorrect defect, and the cyclic shift and flip are performed.
  • the state is used as a key seed to generate a hidden key to encrypt the plaintext, and an enhanced dual random phase encryption system against the ciphertext attack is proposed, that is, it performs symmetric encryption and then DRPE encryption before DRPE encryption.
  • the cyclic shift and flip state of the plaintext obtained by the ciphertext attack COA crack is usually incorrect, the calculated cyclic shift and flip value are also incorrect, so the hidden key is not obtained.
  • the encrypted ciphertext obtained by the embodiment of the invention can be protected from the ciphertext attack COA, and the security of the DRPE encryption system is improved.
  • the embodiment of the present invention combines symmetric encryption and DRPE encryption, and can be widely applied to information security protection in the fields of military, government affairs, business, finance, and personal privacy.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention is suitable for use in the technical field of data processing, and provides an encryption method, comprising: generating a hidden key according to a preset cyclic shift value and flip value; using the hidden key to encrypt an original plaintext to obtain an initial ciphertext image; shifting and flipping the initial ciphertext image according to a cyclic shift value and a flip value to obtain a quasi-final ciphertext; inputting the quasi-final ciphertext into a double random phase encryption system to obtain a final ciphertext. In the embodiments of the present invention, a hidden key is generated from a cyclic shift value and a flip value, and said hidden key is used for building an additional encryption layer in an original plaintext and double random phase encryption system; it is impossible for a ciphertext-only attack (COA) to obtain the correct cyclic shift and flip value when attacking a final ciphertext; therefore it is impossible to obtain a hidden key according to a correct cyclic shift and flip value, and thus impossible to decipher a final ciphertext encrypted by means of the embodiments of the present invention; the security of a double random phase encryption system can be improved by means of the embodiments of the present invention.

Description

一种加/解密方法、加/解密端及双随机相位加解密系统Add/decrypt method, encryption/decryption terminal and double random phase encryption and decryption system
本发明属于数据处理技术领域,尤其涉及一种对抗唯密文攻击的加/解密方法、加/解密端及双随机相位加解密系统。The invention belongs to the technical field of data processing, and in particular relates to an encryption/decryption method against an ciphertext attack, an encryption/decryption terminal and a dual random phase encryption and decryption system.
光学信息安全的研究近十年来越来越受到重视。光学加密系统广泛应用于信息加密、信息认证和信息隐藏等领域。光学安全加密中,信息是以光学方式而不是数字方式处理的,因此其具有多维度、高并行性和处理速度快等优点。Research on optical information security has received increasing attention in the past decade. Optical encryption systems are widely used in information encryption, information authentication and information hiding. In optical security encryption, information is processed optically rather than digitally, so it has the advantages of multi-dimensionality, high parallelism and fast processing speed.
双随机相位加密(Double Random Phase Encoding, DRPE)系统是1995年提出的使用光学加密系统进行信息加密的首次尝试。DRPE可以在4f光学透镜系统的图像域和傅里叶变换域中使用,也可在分数傅立叶域、菲涅耳域中使用。尽管取得了很多成就,但DRPE技术仍然面临着一些困难和挑战,如DRPE系统的安全强度不够高。The Double Random Phase Encoding (DRPE) system was the first attempt to encrypt information using an optical encryption system in 1995. The DRPE can be used in the image domain and the Fourier transform domain of the 4f optical lens system, or in the fractional Fourier domain, Fresnel domain. Despite many achievements, DRPE technology still faces some difficulties and challenges, such as the lack of security strength of DRPE systems.
在过往,学术界积极研究光学加密系统存在的安全漏洞,并提出了攻击算法来破解该光学加密系统,然后又针对该攻击方案所存在的弱点改进其光学加密系统。改进的光学加密系统可能会被新的攻击方法进一步破解。这是安全加密系统发展过程中新的破解方法和新的反破解加密安全系统之间的反复循环进步过程。对于DRPE系统,已经存在很多攻击方法破解该加密系统,以往常用的攻击方法有已知明文攻击、选择明文攻击、选择密文攻击和唯密文攻击(Ciphertext Only Attack, COA)等攻击方法。在这些攻击方法中,唯密文攻击COA是对DRPE系统最致命的破解方法,因为唯密文攻击COA可以单独从密文信息中非法地恢复出明文,因此DRPE系统存在严峻的安全漏洞问题。In the past, the academic community actively studied the security vulnerabilities of optical encryption systems, and proposed an attack algorithm to crack the optical encryption system, and then improved its optical encryption system against the weaknesses of the attack scheme. Improved optical encryption systems may be further exploited by new attack methods. This is a repetitive cycle of progress between the new cracking method in the development of secure encryption systems and the new anti-hacking encryption security system. For the DRPE system, there are many attack methods to crack the encryption system. The commonly used attack methods include known plaintext attacks, plaintext attacks, ciphertext attacks, and ciphertext attacks (Ciphertext).                 Attack methods such as Only Attack, COA). Among these attack methods, the ciphertext attack COA is the most deadly method for the DRPE system. Because the ciphertext attack COA can illegally recover the plaintext from the ciphertext information alone, the DRPE system has serious security vulnerabilities.
发明内容Summary of the invention
本发明所要解决的技术问题在于提供一种对抗唯密文攻击的加/解密方法、加/解密端及双随机相位加解密系统,旨在解决现有技术中唯密文攻击COA可以单独从密文信息中非法地恢复出明文, DRPE系统存在严峻的安全漏洞的问题。The technical problem to be solved by the present invention is to provide an encryption/decryption method against an ciphertext attack, an encryption/decryption terminal, and a dual random phase encryption and decryption system, which aims to solve the problem that the ciphertext only attack COA can be separately secreted in the prior art. In the text information, the plaintext is illegally recovered, and the DRPE system has serious security vulnerabilities.
本发明是这样实现的,一种加密方法,包括:The present invention is implemented in such a manner that an encryption method includes:
根据预设的循环移位值和翻转值生成隐藏密钥;Generating a hidden key according to a preset cyclic shift value and a flip value;
利用所述隐藏密钥对原始明文进行加密,得到初始密文图片;Encrypting the original plaintext by using the hidden key to obtain an initial ciphertext picture;
根据所述循环移位值和翻转值对所述初始密文图片进行移位翻转,得到准最终密文;And shifting and flipping the initial ciphertext picture according to the cyclic shift value and the flip value to obtain a quasi-final ciphertext;
将所述准最终密文输入双随机相位加密系统,得到最终密文。The quasi-final ciphertext is input into a double random phase encryption system to obtain a final ciphertext.
进一步地,所述根据预设的循环移位值和翻转值生成隐藏密钥包括:Further, the generating the hidden key according to the preset cyclic shift value and the flip value includes:
根据所述循环移位值和所述翻转值生成密钥种子;Generating a key seed according to the cyclic shift value and the inverted value;
将所述密钥种子输入随机数字生成器,生成所述隐藏密钥。The key seed is input to a random number generator to generate the hidden key.
进一步地,所述利用所述隐藏密钥对原始明文进行移位翻转,得到初始密文包括:Further, the shifting and flipping the original plaintext by using the hidden key to obtain the initial ciphertext includes:
对所述原始明文进行二进制编码,得到原始二进制明文;Binding the original plaintext to obtain the original binary plaintext;
利用所述隐藏密钥对所述原始二进制明文进行加密,得到二进制序列初始密文;Encrypting the original binary plaintext by using the hidden key to obtain a binary sequence initial ciphertext;
将所述二进制序列初始密文转换为所述初始密文图片。Converting the binary sequence initial ciphertext to the initial ciphertext picture.
进一步地,所述根据所述循环移位值和翻转值对所述初始密文图片进行移位翻转,得到准最终密文包括:Further, the shifting and flipping the initial ciphertext picture according to the cyclic shift value and the flip value to obtain the quasi-final ciphertext includes:
在所述初始密文图片中插入原始位置参考信息,得到参考图片;Inserting original location reference information into the initial ciphertext picture to obtain a reference picture;
根据所述循环移位值对所述参考图片进行移位,并根据所述翻转值对移位后的参考图片进行翻转,得到所述准最终密文。And shifting the reference picture according to the cyclic shift value, and flipping the shifted reference picture according to the inversion value to obtain the quasi-final ciphertext.
本发明实施例还提供了一种加密端,包括:The embodiment of the invention further provides an encryption terminal, including:
密钥生成单元,用于根据预设的循环移位值和翻转值生成隐藏密钥;a key generating unit, configured to generate a hidden key according to the preset cyclic shift value and the flip value;
明文加密单元,用于利用所述隐藏密钥对原始明文进行加密,得到初始密文图片,根据所述循环移位值和翻转值对所述初始密文图片进行移位翻转,得到准最终密文,将所述准最终密文输入双随机相位加密系统,得到最终密文。The plaintext encryption unit is configured to encrypt the original plaintext by using the hidden key to obtain an initial ciphertext image, and perform shifting and flipping on the initial ciphertext image according to the cyclic shift value and the flip value to obtain a quasi-final secret For example, the quasi-final ciphertext is input into the double random phase encryption system to obtain a final ciphertext.
进一步地,所述明文加密单元具体用于:Further, the plaintext encryption unit is specifically configured to:
根据所述循环移位值和所述翻转值生成密钥种子;Generating a key seed according to the cyclic shift value and the inverted value;
将所述密钥种子输入随机数字生成器,生成所述隐藏密钥;Inputting the key seed into a random number generator to generate the hidden key;
对所述原始明文进行二进制编码,得到原始二进制明文;Binding the original plaintext to obtain the original binary plaintext;
利用所述隐藏密钥对所述原始二进制明文进行加密,得到二进制序列初始密文;Encrypting the original binary plaintext by using the hidden key to obtain a binary sequence initial ciphertext;
将所述二进制序列初始密文转换为所述初始密文图片;Converting the binary sequence initial ciphertext into the initial ciphertext picture;
在所述初始密文图片中插入原始位置参考信息,得到参考图片;Inserting original location reference information into the initial ciphertext picture to obtain a reference picture;
根据所述循环移位值对所述参考图片进行移位,并根据所述翻转值对移位后的参考图片进行翻转,得到所述准最终密文。And shifting the reference picture according to the cyclic shift value, and flipping the shifted reference picture according to the inversion value to obtain the quasi-final ciphertext.
本发明实施例还提供了一种解密方法,包括:The embodiment of the invention further provides a decryption method, including:
将解密密钥和最终密文输入双随机相位解密系统,得到准最终密文;Entering the decryption key and the final ciphertext into the double random phase decryption system to obtain a quasi-final ciphertext;
根据解密移位翻转信息对所述准最终密文进行移位翻转,得到初始密文图片;Performing shifting and flipping the quasi-final ciphertext according to the decryption shift flip information to obtain an initial ciphertext picture;
根据所述解密移位翻转信息生成隐藏密钥,根据所述隐藏密钥对所述初始密文图片进行解密,得到原始明文。Generating a hidden key according to the decrypted shift flip information, and decrypting the initial ciphertext picture according to the hidden key to obtain an original plaintext.
进一步地,所述根据解密移位翻转信息对所述准最终密文进行移位翻转,4得到初始密文图片包括:Further, the shifting and flipping the quasi-final ciphertext according to the decryption shift flip information, and obtaining the initial ciphertext image comprises:
根据原始位置参考信息和所述准最终密文中的位置参考信息计算得到循环移位值(x0,y0)和翻转值fp ,以所述循环移位值(x0,y0)和翻转值fp作为解密移位翻转信息;Calculating a cyclic shift value (x 0 , y 0 ) and a flip value f p according to the original position reference information and the position reference information in the quasi-final ciphertext, and the cyclic shift value (x 0 , y 0 ) and Flipping the value f p as decryption shift flip information;
将所述准最终密文按照循环移位值(-x0,-y0)翻转值-fp分别进行移位和翻转,得到所述初始密文图片;And shifting the quasi-final ciphertext according to the cyclic shift value (-x 0 , -y 0 ) flip value -f p respectively to obtain the initial ciphertext picture;
则所述根据所述解密移位翻转信息生成隐藏密钥,根据所述隐藏密钥对所述初始密文图片进行解密,得到原始明文包括:And generating a hidden key according to the decryption shift flip information, and decrypting the initial ciphertext image according to the hidden key, to obtain the original plaintext, including:
根据所述循环移位值(x0,y0)和翻转值fp生成密钥种子,将所述密钥种子输入随机数字生成器,生成所述隐藏密钥;Generating a key seed according to the cyclic shift value (x 0 , y 0 ) and the inverted value f p , and inputting the key seed into a random number generator to generate the hidden key;
将所述初始密文图片进行二进制编码,得到二进制序列初始密文;Binding the initial ciphertext picture to obtain a binary sequence initial ciphertext;
利用所述隐藏密钥对所述二进制序列初始密文进行解密,得到二进制明文;Decrypting the initial ciphertext of the binary sequence by using the hidden key to obtain a binary plaintext;
对所述二进制明文进行转换,得到所述原始明文。Converting the binary plaintext to obtain the original plaintext.
本发明实施例还提供了一种解密端,包括:The embodiment of the invention further provides a decryption end, comprising:
密文解密单元,用于将解密密钥和最终密文输入双随机相位解密系统,得到准最终密文;a ciphertext decryption unit, configured to input the decryption key and the final ciphertext into the double random phase decryption system to obtain a quasi-final ciphertext;
初始解密单元,用于根据原始位置参考信息和所述准最终密文中的位置参考信息计算得到循环移位值(x0,y0)和翻转值fp ,以所述循环移位值(x0,y0)和翻转值fp作为解密移位翻转信息,将所述准最终密文按照循环移位值(-x0,-y0)翻转值-fp分别进行移位和翻转,得到所述初始密文图片;An initial decrypting unit, configured to calculate a cyclic shift value (x 0 , y 0 ) and a flip value f p according to the original position reference information and the position reference information in the quasi-final ciphertext, and the cyclic shift value (x) 0 , y 0 ) and the inverted value f p are used as decryption shift flip information, and the quasi-final ciphertext is respectively shifted and inverted according to the cyclic shift value (-x 0 , -y 0 ) flip value -f p , respectively. Obtaining the initial ciphertext picture;
明文解密单元,用于根据所述循环移位值(x0,y0)和翻转值fp生成密钥种子,将所述密钥种子输入随机数字生成器,生成所述隐藏密钥,将所述初始密文图片进行二进制编码,得到二进制序列初始密文,利用所述隐藏密钥对所述二进制序列初始密文进行解密,得到二进制明文,对所述二进制明文进行转换,得到所述原始明文。a plaintext decryption unit, configured to generate a key seed according to the cyclic shift value (x 0 , y 0 ) and a flip value f p , and input the key seed into a random number generator to generate the hidden key, and The initial ciphertext picture is binary coded to obtain a binary sequence initial ciphertext, and the binary sequence initial ciphertext is decrypted by using the hidden key to obtain a binary plaintext, and the binary plaintext is converted to obtain the original Clear text.
本发明实施例还提供了一种对抗唯密文攻击的双随机相位加解密系统,包括上述所述的加密端和解密端。The embodiment of the invention further provides a dual random phase encryption and decryption system against ciphertext attacks, including the encryption terminal and the decryption terminal described above.
本发明与现有技术相比,有益效果在于:本发明实施例根据用户预设的循环移位值和翻转值生成隐藏密钥,并利用该隐藏密钥对原始明文进行加密,得到初始密文图片,根据预设的循环移位值和翻转值对该初始密文图片进行移位翻转,得到准最终密文,最后将该准最终密文输入双随机相位加密系统DRPE中,得到最终密文。本发明实施例通过将循环移位值和翻转值生成隐藏密钥,并利用该隐藏密钥在原始明文和双随机相位加密系统DRPE中构建一个额外的加密层,因为唯密文攻击COA在对最终密文攻击时无法得到正确的循环移位和翻转值,因此无法根据正确的循环移位和翻转值得到隐藏密钥,从而无法对通过本发明实施例加密的最终密文进行破解,通过本发明实施例能够增强双随机相位加密系统的安全性。Compared with the prior art, the present invention has the beneficial effects that the embodiment of the present invention generates a hidden key according to the cyclic shift value and the inverted value preset by the user, and encrypts the original plaintext by using the hidden key to obtain an initial ciphertext. The image is shifted and inverted according to the preset cyclic shift value and the inverted value to obtain the quasi-final ciphertext, and finally the quasi-final ciphertext is input into the double random phase encryption system DRPE to obtain the final ciphertext. . The embodiment of the present invention generates a hidden key by using a cyclic shift value and a flip value, and constructs an additional encryption layer in the original plaintext and dual random phase encryption system DRPE by using the hidden key, because the ciphertext attack COA is in the pair. In the end, the ciphertext attack cannot obtain the correct cyclic shift and flip value, so the hidden key cannot be obtained according to the correct cyclic shift and the flip value, so that the final ciphertext encrypted by the embodiment of the present invention cannot be cracked. Embodiments of the invention are capable of enhancing the security of a dual random phase encryption system.
附图说明DRAWINGS
图1是本发明实施例提供的一种加密方法的流程图;FIG. 1 is a flowchart of an encryption method according to an embodiment of the present invention;
图2是本发明实施例提供的一种加密端的结构示意图;2 is a schematic structural diagram of an encryption end according to an embodiment of the present invention;
图3是本发明实施例提供的一种解密方法的流程图;3 is a flowchart of a decryption method according to an embodiment of the present invention;
图4是本发明实施例提供的一种解密端的结构示意图;4 is a schematic structural diagram of a decryption end according to an embodiment of the present invention;
图5是本发明实施例提供的一种对抗唯密文攻击的双随机相位加解密系统的结构示意图;FIG. 5 is a schematic structural diagram of a dual random phase encryption and decryption system against ciphertext attack according to an embodiment of the present invention; FIG.
图6是本发明实施例提供的一种对抗唯密文攻击的双随机相位加解密系统的工作流程图。FIG. 6 is a flowchart of a dual random phase encryption and decryption system against ciphertext attack according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
在现有的COA破解方法中的相位提取步骤存在一个陷,即COA破解方法虽然能够破解出明文内容,但是其破解恢复的明文内容的循环移位和翻转状态是不正确的。In the existing COA cracking method, there is a trap in the phase extraction step. That is, although the COA cracking method can crack out the plaintext content, the cyclic shifting and flipping state of the plaintext content of the cracked recovery is incorrect.
基于此,在本发明实施例中,我们提出的对抗唯密文攻击的双随机相位加解密系统中,用户输入的循环移位值和翻转值被用来生成隐藏密钥信息并且利用该隐藏密钥在原始明文和双随机相位加密系统DRPE之间构建一个额外的加密层。Based on this, in the embodiment of the present invention, in the dual random phase encryption and decryption system against ciphertext attack, the cyclic shift value and the flip value input by the user are used to generate hidden key information and utilize the hidden secret. The key constructs an additional layer of encryption between the original plaintext and the dual random phase encryption system DRPE.
图1示出了本发明实施例提供的一种加密方法,包括:FIG. 1 shows an encryption method provided by an embodiment of the present invention, including:
S101,根据预设的循环移位值和翻转值生成隐藏密钥;S101. Generate a hidden key according to the preset cyclic shift value and the inverted value.
S102,利用所述隐藏密钥对原始明文进行加密,得到初始密文图片;S102. Encrypt the original plaintext by using the hidden key to obtain an initial ciphertext picture.
S103,根据所述循环移位值和翻转值对所述初始密文图片进行移位翻转,得到准最终密文;S103: Perform shifting and flipping on the initial ciphertext image according to the cyclic shift value and the flip value to obtain a quasi-final ciphertext;
S104,将所述准最终密文输入双随机相位加密系统,得到最终密文。S104. Input the quasi-final ciphertext into the dual random phase encryption system to obtain a final ciphertext.
在上述步骤S101中,以(x0,y0)表示循环移位值,以fp表示翻转值,以循环移位值(x0,y0)和翻转值fp作为加密信息,根据该加密信息生成隐藏密钥,具体步骤包括:根据循环移位值(x0,y0)和翻转值fp生成密钥种子,将所述密钥种子输入随机数字生成器,生成所述隐藏密钥。In the above step S101, the cyclic shift value is represented by (x 0 , y 0 ), the inverted value is represented by f p , and the cyclic shift value (x 0 , y 0 ) and the inverted value f p are used as the encrypted information, according to the The encryption information generates a hidden key, and the specific steps include: generating a key seed according to the cyclic shift value (x 0 , y 0 ) and the flip value f p , and inputting the key seed into the random number generator to generate the hidden secret key.
在步骤S102中,利用步骤S101生成的隐藏密钥对原始明文进行加密,具体的加密过程包括:对所述原始明文进行二进制编码,得到原始二进制明文;利用所述隐藏密钥对所述原始二进制明文进行加密,得到二进制序列初始密文;将所述二进制序列初始密文转换为所述初始密文图片。在本步骤中,针对现存的COA攻击方法对DRPE破解的弱点,即破解识别出的循环移位值和翻转值不正确的弱点,利用用户预设的循环移位值和翻转值生成的隐藏密钥对原始明文进行加密,通过这个简单的加密操作让原始明文更加安全。进一步地,将二进制序列初始密文转换为初始密文图片的实质,是将二进制序列初始密文中的二进制数转换为十进制数,十进制数即为初始密文图片的像素。In step S102, the original plaintext is encrypted by using the hidden key generated in step S101. The specific encryption process includes: binary encoding the original plaintext to obtain an original binary plaintext; and using the hidden key to the original binary The plaintext is encrypted to obtain a binary sequence initial ciphertext; the binary sequence initial ciphertext is converted into the initial ciphertext picture. In this step, for the vulnerability of the existing COA attack method to the DRPE crack, that is, cracking the identified loop shift value and the inversion of the incorrect value, the hidden secret generated by the user-preset cyclic shift value and the flip value is generated. The key encrypts the original plaintext, making the original plaintext more secure with this simple encryption operation. Further, converting the initial ciphertext of the binary sequence to the original ciphertext image is to convert the binary number in the initial ciphertext of the binary sequence into a decimal number, and the decimal number is the pixel of the initial ciphertext image.
在S103中,再次利用用户预设的循环移位值和翻转值对步骤S102中加密得到初始密文图片进行移位翻转,具体的移位翻转过程包括:在所述初始密文图片中插入原始位置参考信息,得到参考图片;根据所述循环移位值对所述参考图片进行移位,并根据所述翻转值对移位后的参考图片进行翻转,得到所述准最终密文。In S103, the initial ciphertext image obtained by encrypting in step S102 is again flipped and flipped by using the cyclic shift value and the flip value preset by the user. The specific shift flipping process includes: inserting the original in the initial ciphertext image. Position reference information, obtaining a reference picture; shifting the reference picture according to the cyclic shift value, and flipping the shifted reference picture according to the inversion value to obtain the quasi-final ciphertext.
通过本实施例提供的加密方法,在原始明文与DRPE系统之间增加了一个额外的加密层,该加密层由用户设置的循环移位值和翻转值生成的隐藏密钥实现,通过本加密方法,能够增强现有的DRPE系统的安全性,解决了唯密文攻击COA的问题。With the encryption method provided in this embodiment, an additional encryption layer is added between the original plaintext and the DRPE system, and the encryption layer is implemented by a loop key generated by the user and a hidden key generated by the inverted value, and the encryption method is implemented by the encryption method. It can enhance the security of the existing DRPE system and solve the problem of ciphertext attacking COA.
图2示出了本发明实施例提供的一种加密端,包括:FIG. 2 shows an encryption terminal provided by an embodiment of the present invention, including:
密钥生成单元201,用于根据预设的循环移位值和翻转值生成隐藏密钥;The key generation unit 201 is configured to generate a hidden key according to the preset cyclic shift value and the inverted value;
明文加密单元202,用于利用所述隐藏密钥对原始明文进行加密,得到初始密文图片,根据所述循环移位值和翻转值对所述初始密文图片进行移位翻转,得到准最终密文,将所述准最终密文输入双随机相位加密系统,得到最终密文。The plaintext encryption unit 202 is configured to encrypt the original plaintext by using the hidden key to obtain an initial ciphertext image, and perform shifting and flipping on the initial ciphertext image according to the cyclic shift value and the flip value to obtain a quasi-final In the ciphertext, the quasi-final ciphertext is input into the double random phase encryption system to obtain the final ciphertext.
进一步的,明文加密单元201具体用于:Further, the plaintext encryption unit 201 is specifically configured to:
根据所述循环移位值和所述翻转值生成密钥种子;Generating a key seed according to the cyclic shift value and the inverted value;
将所述密钥种子输入随机数字生成器,生成所述隐藏密钥;Inputting the key seed into a random number generator to generate the hidden key;
对所述原始明文进行二进制编码,得到原始二进制明文;Binding the original plaintext to obtain the original binary plaintext;
利用所述隐藏密钥对所述原始二进制明文进行加密,得到二进制序列初始密文;Encrypting the original binary plaintext by using the hidden key to obtain a binary sequence initial ciphertext;
将所述二进制序列初始密文转换为所述初始密文图片;Converting the binary sequence initial ciphertext into the initial ciphertext picture;
在所述初始密文图片中插入原始位置参考信息,得到参考图片;Inserting original location reference information into the initial ciphertext picture to obtain a reference picture;
根据所述循环移位值对所述参考图片进行移位,并根据所述翻转值对移位后的参考图片进行翻转,得到所述准最终密文。And shifting the reference picture according to the cyclic shift value, and flipping the shifted reference picture according to the inversion value to obtain the quasi-final ciphertext.
针对上述加密方法,图3示出了本发明实施例提供的一种解密方法,包括:For the above encryption method, FIG. 3 shows a decryption method provided by an embodiment of the present invention, including:
S301,将解密密钥和最终密文输入双随机相位解密系统,得到准最终密文;S301. Enter a decryption key and a final ciphertext into the dual random phase decryption system to obtain a quasi-final ciphertext;
S302,根据解密移位翻转信息对所述准最终密文进行移位翻转,得到初始密文图片;S302: Perform shifting and flipping the quasi-final ciphertext according to the decryption shift flip information to obtain an initial ciphertext picture;
S303,根据所述解密移位翻转信息生成隐藏密钥,根据所述隐藏密钥对所述初始密文图片进行解密,得到原始明文。S303. Generate a hidden key according to the decryption shift flip information, and decrypt the initial ciphertext picture according to the hidden key to obtain an original plaintext.
在步骤301中,用户以DRPE加密系统的加密密钥作为解密密钥,将解密密钥和最终密文输入双随机相位解密系统中,经该双随机相位解密系统解密得到准最终密文。In step 301, the user uses the encryption key of the DRPE encryption system as the decryption key, inputs the decryption key and the final ciphertext into the dual random phase decryption system, and decrypts the quasi-final ciphertext through the double random phase decryption system.
在步骤S302中,准最终密文中包含有位置参考信息,将加密时使用的原始位置参考信息和准最终密文中的位置参考信息进行计算,得到二者的位置距离,根据该位置距离确定循环移位值(x0,y0)和翻转值fp,将循环移位值(x0,y0)和翻转值fp,作为解密移位翻转信息,以该解密移位翻转信息确定需要对该准最终密文进行移位的循环移位值(-x0,-y0)和翻转值-fp,按照该循环移位值(-x0,-y0)和翻转值-fp对该准最终密文进行移位和翻转,得到初始密文图片。In step S302, the quasi-final ciphertext includes position reference information, and the original position reference information used in the encryption and the position reference information in the quasi-final ciphertext are calculated to obtain the position distance of the two, and the cyclic shift is determined according to the position distance. a bit value (x 0 , y 0 ) and a flip value f p , the cyclic shift value (x 0 , y 0 ) and the inverted value f p are used as decryption shift flip information, and the decryption shift flip information is determined to be required The quasi-final ciphertext shifts the cyclic shift value (-x 0 , -y 0 ) and the flip value -f p according to the cyclic shift value (-x 0 , -y 0 ) and the flip value -f p The quasi-final ciphertext is shifted and flipped to obtain an initial ciphertext picture.
在步骤S303中,解密端根据循环移位值(x0,y0)和翻转值fp生成密钥种子,将所述密钥种子输入随机数字生成器,生成所述隐藏密钥,将所述初始密文图片进行二进制编码,得到二进制序列初始密文,利用所述隐藏密钥对所述二进制序列初始密文进行解密,得到二进制明文,对所述二进制明文进行转换,得到所述原始明文。In step S303, the decryption end generates a key seed according to the cyclic shift value (x 0 , y 0 ) and the inverted value f p , and inputs the key seed into a random number generator to generate the hidden key. The initial ciphertext picture is binary coded to obtain a binary sequence initial ciphertext, and the binary sequence initial ciphertext is decrypted by using the hidden key to obtain a binary plaintext, and the binary plaintext is converted to obtain the original plaintext. .
图4示出了本发明实施例提供的一种解密端,包括:FIG. 4 shows a decryption end according to an embodiment of the present invention, including:
密文解密单元401,用于将解密密钥和最终密文输入双随机相位解密系统,得到准最终密文;a ciphertext decryption unit 401, configured to input the decryption key and the final ciphertext into the double random phase decryption system to obtain a quasi-final ciphertext;
初始解密单元402,用于根据解密移位翻转信息对所述准最终密文进行移位翻转,得到初始密文图片。The initial decryption unit 402 is configured to perform shifting and flipping the quasi-final ciphertext according to the decryption shift flip information to obtain an initial ciphertext picture.
明文解密单元403,用于根据所述解密移位翻转信息生成隐藏密钥,根据所述隐藏密钥对所述初始密文图片进行解密,得到原始明文。The plaintext decryption unit 403 is configured to generate a hidden key according to the decrypted shift flip information, and decrypt the initial ciphertext image according to the hidden key to obtain an original plaintext.
进一步地,初始解密单元402具体用于:根据原始位置参考信息和所述准最终密文中的位置参考信息计算得到循环移位值(x0,y0)和翻转值fp ,以所述循环移位值(x0,y0)和翻转值fp作为解密移位翻转信息,将所述准最终密文按照循环移位值(-x0,-y0)翻转值-fp分别进行移位和翻转,得到所述初始密文图片。Further, the initial decryption unit 402 is specifically configured to: calculate a cyclic shift value (x 0 , y 0 ) and a flip value f p according to the original position reference information and the position reference information in the quasi-final ciphertext, in the loop The shift value (x 0 , y 0 ) and the flip value f p are used as decryption shift flip information, and the quasi-final ciphertext is respectively inverted according to the cyclic shift value (−x 0 , −y 0 )−f p Shift and flip to get the initial ciphertext picture.
明文解密单元403具体用于:根据所述循环移位值(x0,y0)和翻转值fp生成密钥种子,将所述密钥种子输入随机数字生成器,生成所述隐藏密钥,将所述初始密文图片进行二进制编码,得到二进制序列初始密文,利用所述隐藏密钥对所述二进制序列初始密文进行解密,得到二进制明文,对所述二进制明文进行转换,得到所述原始明文。The plaintext decryption unit 403 is specifically configured to: generate a key seed according to the cyclic shift value (x 0 , y 0 ) and the inverted value f p , and input the key seed into a random number generator to generate the hidden key Binding the initial ciphertext picture to obtain a binary sequence initial ciphertext, decrypting the binary sequence initial ciphertext by using the hidden key, obtaining a binary plaintext, and converting the binary plaintext to obtain a The original plain text.
图5示出了本发明实施例提供的一种对抗唯密文攻击的双随机相位加解密系统,包括图2所示的加密端和图4所示的解密端。FIG. 5 shows a dual random phase encryption and decryption system against ciphertext attack according to an embodiment of the present invention, including the encryption end shown in FIG. 2 and the decryption end shown in FIG.
在具体应用中,一个加密端可以对应一个或者多个解密端,即加密端完成对原始明文的加密后,将加密得到的最终密文传输给一个或者多个解密端,解密端根据加密端传输的最终密文和加密时用到的加密密钥对最终密钥进行解密。本实施例中,加密端和解密端采用对称方式进行加解密,即在加密端使用随机数字生成器生成隐藏密钥,则在解密端使用同样的随机数字生成器生成隐藏密钥,加密端将最终密文输入DEPR加密系统时用到的加密密钥将作为解密端使用DRPE解密系统对最终密文进行解密时的解密密钥。In a specific application, an encryption end may correspond to one or more decryption ends, that is, after the encryption end completes encryption of the original plaintext, the encrypted final ciphertext is transmitted to one or more decryption ends, and the decryption end transmits according to the encryption end. The final ciphertext and the encryption key used in the encryption decrypt the final key. In this embodiment, the encryption end and the decryption end perform encryption and decryption in a symmetric manner, that is, when the encryption end uses a random number generator to generate a hidden key, the same random number generator is used to generate a hidden key on the decryption end, and the encryption end will be used. The encryption key used in the final ciphertext input into the DEPR encryption system will be used as the decryption key when the decryption end decrypts the final ciphertext using the DRPE decryption system.
解密端在对加密端传输的最终密文进行解密时,需要用到加密时使用到的原始位置参考信息、用户预设的循环移位值和翻转值及加密端的加密密钥,通过该加密端的加密密钥、该原始位置参考信息、循环移位值和翻转值才能完成对最终密文的解密。When decrypting the final ciphertext transmitted by the encryption end, the decryption end needs to use the original location reference information used for encryption, the preset cyclic shift value and the flip value of the user, and the encryption key of the encryption end, and the encryption end is used by the decryption end. The encryption key, the original location reference information, the cyclic shift value, and the flip value can complete the decryption of the final ciphertext.
图6示出了通过本发明实施例提供的对抗唯密文攻击的双随机相位加解密系统进行加密和解密流程,包括:FIG. 6 shows an encryption and decryption process of a dual random phase encryption and decryption system against ciphertext attack provided by an embodiment of the present invention, including:
a、加密端对原始明文2DC1进行二进制编码,得到原始二进制明文;a. The encryption end performs binary coding on the original plaintext 2DC1 to obtain the original binary plaintext;
b、加密端根据用户设置的循环移位值(x0,y0)和翻转值fp组合起来生成密钥种子;b. The encryption end combines the cyclic shift value (x 0 , y 0 ) set by the user and the inverted value f p to generate a key seed;
c、加密端将密钥种子输入随机数字生成器生成隐藏密钥;c. The encryption end inputs the key seed into the random number generator to generate a hidden key;
d、加密端利用隐藏密钥对原始二进制明文加密得到二进制序列初始密文;d. The encryption end encrypts the original binary plaintext by using a hidden key to obtain a binary sequence initial ciphertext;
e、加密端将二进制序列初始密文转换为初始密文图片703D;e, the encryption end converts the initial ciphertext of the binary sequence into the initial ciphertext picture 703D;
f、加密端在初始密文图片703D中插入原始位置参考信息Y得到参考图片,并根据用户设置的循环移位值(x0,y0)和翻转fp值对参考图片进行移位和翻转得到准最终密文Y703D;f. The encryption end inserts the original position reference information Y into the initial ciphertext picture 703D to obtain a reference picture, and shifts and flips the reference picture according to the cyclic shift value (x 0 , y 0 ) and the inverted f p value set by the user. Obtain the quasi-final ciphertext Y703D;
g、加密端将准最终密文Y703D输入双随机相位加密系统DRPE中,得到最终密文;g. The encryption terminal inputs the quasi-final ciphertext Y703D into the double random phase encryption system DRPE to obtain the final ciphertext;
h、加密端将最终密文在不安全的情况环境下传输给特定的解密端;h, the encryption end transmits the final ciphertext to a specific decryption end in an unsafe environment;
i、解密端将双随机相位加密系统DRPE的密钥作为解密密钥,将该解密密钥和最终密文输入双随机相位解密系统得到解密的准最终密文Y703D;。i. The decryption end uses the key of the double random phase encryption system DRPE as the decryption key, and inputs the decryption key and the final ciphertext into the double random phase decryption system to obtain the decrypted quasi-final ciphertext Y703D;
j、解密端根据解密的准最终密文Y703D中的原始位置参考信息Y,结合根据加密时插入的原始位置参考信息Y计算的位置距离,以计算得出的位置距离确定循环移位值(x0,y0)和翻转fp值,解密端将解密得到的准最终密文Y703D按照循环位置(-x0,-y0)和翻转-fp得到初始密文图片703D;j. The decryption end determines the cyclic shift value according to the calculated position distance according to the original position reference information Y in the decrypted quasi-final ciphertext Y703D, combined with the position distance calculated according to the original position reference information Y inserted during encryption. 0 , y 0 ) and flipping the f p value, the decryption end decrypts the quasi-final ciphertext Y703D according to the loop position (-x 0 , -y 0 ) and flips -f p to obtain the initial ciphertext picture 703D;
k、解密端对初始密文图片703D经过二进制编码得到二进制序列初始密文;k. The decryption end performs binary encoding on the initial ciphertext picture 703D to obtain a binary sequence initial ciphertext;
l、解密端将解密得到的循环移位值(x0,y0)和翻转fp值组合起来生成密钥种子;l, the decryption end combines the decrypted cyclic shift value (x 0 , y 0 ) and the inverted f p value to generate a key seed;
m、解密端将密钥种子输入与加密端一样的随机数字生成器,生成隐藏密钥;m, the decryption end inputs the key seed into the same random number generator as the encryption end to generate a hidden key;
n、解密端根据隐藏密钥对二进制序列初始密文进行解密,得到解密二进制明文;n, the decryption end decrypts the initial ciphertext of the binary sequence according to the hidden key, and obtains the decrypted binary plaintext;
o、解密端将解密得到的二进制明文转换为解密明文2DC1。o. The decryption end converts the decrypted binary plaintext into the decrypted plaintext 2DC1.
在本发明实施例中,利用双随机相位加密系统DRPE研究中发现的现有唯密文攻击COA破解恢复的明文内容的循环移位和翻转状态通常是不正确的缺陷,把循环移位和翻转状态作为密钥种子生成隐藏密钥对明文加密,提出对抗唯密文攻击的增强型双随机相位加密系统,即其在DRPE加密之前先进行一次对称加密然后再进行DRPE加密。因为唯密文攻击COA破解得到的明文的循环移位和翻转状态通常是不正确的,所以其计算出来的循环移位和翻转值也是不正确的,因此得不到隐藏密钥,所以经本发明实施例加密得到的密文可以免受唯密文攻击COA,提高了DRPE加密系统的安全性。In the embodiment of the present invention, the cyclic shift and flip state of the plaintext content recovered by the existing ciphertext attack COA crack recovery using the double random phase encryption system DRPE research is usually an incorrect defect, and the cyclic shift and flip are performed. The state is used as a key seed to generate a hidden key to encrypt the plaintext, and an enhanced dual random phase encryption system against the ciphertext attack is proposed, that is, it performs symmetric encryption and then DRPE encryption before DRPE encryption. Because the cyclic shift and flip state of the plaintext obtained by the ciphertext attack COA crack is usually incorrect, the calculated cyclic shift and flip value are also incorrect, so the hidden key is not obtained. The encrypted ciphertext obtained by the embodiment of the invention can be protected from the ciphertext attack COA, and the security of the DRPE encryption system is improved.
本发明实施例将对称加密和DRPE加密相结合的技术,可以广泛应用于军事、政务、商务、金融、个人隐私等领域的信息安全保护。The embodiment of the present invention combines symmetric encryption and DRPE encryption, and can be widely applied to information security protection in the fields of military, government affairs, business, finance, and personal privacy.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims (10)

  1. 一种加密方法,其特征在于,包括:
    根据预设的循环移位值和翻转值生成隐藏密钥;
    利用所述隐藏密钥对原始明文进行加密,得到初始密文图片;
    根据所述循环移位值和翻转值对所述初始密文图片进行移位翻转,得到准最终密文;
    将所述准最终密文输入双随机相位加密系统,得到最终密文。
    An encryption method, comprising:
    Generating a hidden key according to a preset cyclic shift value and a flip value;
    Encrypting the original plaintext by using the hidden key to obtain an initial ciphertext picture;
    And shifting and flipping the initial ciphertext picture according to the cyclic shift value and the flip value to obtain a quasi-final ciphertext;
    The quasi-final ciphertext is input into a double random phase encryption system to obtain a final ciphertext.
  2. 如权利要求1所述的加密方法,其特征在于,所述根据预设的循环移位值和翻转值生成隐藏密钥包括:
    根据所述循环移位值和所述翻转值生成密钥种子;
    将所述密钥种子输入随机数字生成器,生成所述隐藏密钥。
    The encryption method according to claim 1, wherein the generating the hidden key according to the preset cyclic shift value and the inverted value comprises:
    Generating a key seed according to the cyclic shift value and the inverted value;
    The key seed is input to a random number generator to generate the hidden key.
  3. 如权利要求1或2所述的加密方法,其特征在于,所述利用所述隐藏密钥对原始明文进行加密,得到初始密文包括:
    对所述原始明文进行二进制编码,得到原始二进制明文;
    利用所述隐藏密钥对所述原始二进制明文进行加密,得到二进制序列初始密文;
    将所述二进制序列初始密文转换为所述初始密文图片。
    The encryption method according to claim 1 or 2, wherein the encrypting the original plaintext by using the hidden key to obtain the initial ciphertext comprises:
    Binding the original plaintext to obtain the original binary plaintext;
    Encrypting the original binary plaintext by using the hidden key to obtain a binary sequence initial ciphertext;
    Converting the binary sequence initial ciphertext to the initial ciphertext picture.
  4. 如权利要求1所述的加密方法,其特征在于,所述根据所述循环移位值和翻转值对所述初始密文图片进行移位翻转,得到准最终密文包括:
    在所述初始密文图片中插入原始位置参考信息,得到参考图片;
    根据所述循环移位值对所述参考图片进行移位,并根据所述翻转值对移位后的参考图片进行翻转,得到所述准最终密文。
    The encryption method according to claim 1, wherein the shifting and flipping the initial ciphertext picture according to the cyclic shift value and the flip value to obtain a quasi-final ciphertext comprises:
    Inserting original location reference information into the initial ciphertext picture to obtain a reference picture;
    And shifting the reference picture according to the cyclic shift value, and flipping the shifted reference picture according to the inversion value to obtain the quasi-final ciphertext.
  5. 一种加密端,其特征在于,包括:
    密钥生成单元,用于根据预设的循环移位值和翻转值生成隐藏密钥;
    明文加密单元,用于利用所述隐藏密钥对原始明文进行加密,得到初始密文图片,根据所述循环移位值和翻转值对所述初始密文图片进行移位翻转,得到准最终密文,将所述准最终密文输入双随机相位加密系统,得到最终密文。
    An encryption terminal, comprising:
    a key generating unit, configured to generate a hidden key according to the preset cyclic shift value and the flip value;
    The plaintext encryption unit is configured to encrypt the original plaintext by using the hidden key to obtain an initial ciphertext image, and perform shifting and flipping on the initial ciphertext image according to the cyclic shift value and the flip value to obtain a quasi-final secret For example, the quasi-final ciphertext is input into the double random phase encryption system to obtain a final ciphertext.
  6. 如权利要求5所述的加密端,其特征在于,所述明文加密单元具体用于:
    根据所述循环移位值和所述翻转值生成密钥种子;
    将所述密钥种子输入随机数字生成器,生成所述隐藏密钥;
    对所述原始明文进行二进制编码,得到原始二进制明文;
    利用所述隐藏密钥对所述原始二进制明文进行加密,得到二进制序列初始密文;
    将所述二进制序列初始密文转换为所述初始密文图片;
    在所述初始密文图片中插入原始位置参考信息,得到参考图片;
    根据所述循环移位值对所述参考图片进行移位,并根据所述翻转值对移位后的参考图片进行翻转,得到所述准最终密文。
    The encryption terminal according to claim 5, wherein the plaintext encryption unit is specifically configured to:
    Generating a key seed according to the cyclic shift value and the inverted value;
    Inputting the key seed into a random number generator to generate the hidden key;
    Binding the original plaintext to obtain the original binary plaintext;
    Encrypting the original binary plaintext by using the hidden key to obtain a binary sequence initial ciphertext;
    Converting the binary sequence initial ciphertext into the initial ciphertext picture;
    Inserting original location reference information into the initial ciphertext picture to obtain a reference picture;
    And shifting the reference picture according to the cyclic shift value, and flipping the shifted reference picture according to the inversion value to obtain the quasi-final ciphertext.
  7. 一种解密方法,其特征在于,包括:
    将解密密钥和最终密文输入双随机相位解密系统,得到准最终密文;
    根据解密移位翻转信息对所述准最终密文进行移位翻转解密,得到初始密文图片;
    根据所述解密移位翻转信息生成隐藏密钥,根据所述隐藏密钥对所述初始密文图片进行解密,得到原始明文。
    A decryption method, comprising:
    Entering the decryption key and the final ciphertext into the double random phase decryption system to obtain a quasi-final ciphertext;
    And translating and decrypting the quasi-final ciphertext according to the decryption shift flip information to obtain an initial ciphertext picture;
    Generating a hidden key according to the decrypted shift flip information, and decrypting the initial ciphertext picture according to the hidden key to obtain an original plaintext.
  8. 如权利要求7所述的解密方法,其特征在于,所述根据解密移位翻转信息对所述准最终密文进行解密,得到初始密文图片包括:
    根据原始位置参考信息和所述准最终密文中的位置参考信息计算得到循环移位值(x0,y0)和翻转值fp ,以所述循环移位值(x0,y0)和翻转值fp作为解密移位翻转信息;
    将所述准最终密文按照循环移位值(-x0,-y0)翻转值-fp分别进行移位和翻转,得到所述初始密文图片;
    则所述根据所述解密移位翻转信息生成隐藏密钥,根据所述隐藏密钥对所述初始密文图片进行解密,得到原始明文包括:
    根据所述循环移位值(x0,y0)和翻转值fp生成密钥种子,将所述密钥种子输入随机数字生成器,生成所述隐藏密钥;
    将所述初始密文图片进行二进制编码,得到二进制序列初始密文;
    利用所述隐藏密钥对所述二进制序列初始密文进行解密,得到二进制明文;
    对所述二进制明文进行转换,得到所述原始明文。
    The decryption method according to claim 7, wherein the decrypting the quasi-final ciphertext according to the decryption shift flip information, and obtaining the initial ciphertext image comprises:
    Calculating a cyclic shift value (x 0 , y 0 ) and a flip value f p according to the original position reference information and the position reference information in the quasi-final ciphertext, and the cyclic shift value (x 0 , y 0 ) and Flipping the value f p as decryption shift flip information;
    And shifting the quasi-final ciphertext according to the cyclic shift value (-x 0 , -y 0 ) flip value -f p respectively to obtain the initial ciphertext picture;
    And generating a hidden key according to the decryption shift flip information, and decrypting the initial ciphertext image according to the hidden key, to obtain the original plaintext, including:
    Generating a key seed according to the cyclic shift value (x 0 , y 0 ) and the inverted value f p , and inputting the key seed into a random number generator to generate the hidden key;
    Binding the initial ciphertext picture to obtain a binary sequence initial ciphertext;
    Decrypting the initial ciphertext of the binary sequence by using the hidden key to obtain a binary plaintext;
    Converting the binary plaintext to obtain the original plaintext.
  9. 一种解密端,其特征在于,包括:
    密文解密单元,用于将解密密钥和最终密文输入双随机相位解密系统,得到准最终密文;
    初始解密单元,用于根据原始位置参考信息和所述准最终密文中的位置参考信息计算得到循环移位值(x0,y0)和翻转值fp ,以所述循环移位值(x0,y0)和翻转值fp作为解密移位翻转信息,将所述准最终密文按照循环移位值(-x0,-y0)翻转值-fp分别进行移位和翻转,得到所述初始密文图片;
    明文解密单元,用于根据所述循环移位值(x0,y0)和翻转值fp生成密钥种子,将所述密钥种子输入随机数字生成器,生成所述隐藏密钥,将所述初始密文图片进行二进制编码,得到二进制序列初始密文,利用所述隐藏密钥对所述二进制序列初始密文进行解密,得到二进制明文,对所述二进制明文进行转换,得到所述原始明文。
    A decryption end, comprising:
    a ciphertext decryption unit, configured to input the decryption key and the final ciphertext into the double random phase decryption system to obtain a quasi-final ciphertext;
    An initial decrypting unit, configured to calculate a cyclic shift value (x 0 , y 0 ) and a flip value f p according to the original position reference information and the position reference information in the quasi-final ciphertext, and the cyclic shift value (x) 0 , y 0 ) and the inverted value f p are used as decryption shift flip information, and the quasi-final ciphertext is respectively shifted and inverted according to the cyclic shift value (-x 0 , -y 0 ) flip value -f p , respectively. Obtaining the initial ciphertext picture;
    a plaintext decryption unit, configured to generate a key seed according to the cyclic shift value (x 0 , y 0 ) and a flip value f p , and input the key seed into a random number generator to generate the hidden key, and The initial ciphertext picture is binary coded to obtain a binary sequence initial ciphertext, and the binary sequence initial ciphertext is decrypted by using the hidden key to obtain a binary plaintext, and the binary plaintext is converted to obtain the original Clear text.
  10. 一种对抗唯密文攻击的双随机相位加解密系统,其特征在于,包括权利要求5或6所述的加密端和权利要求9所述的解密端。A dual random phase encryption and decryption system against ciphertext attack, comprising the encryption end according to claim 5 or 6, and the decryption end according to claim 9.
PCT/CN2017/113261 2017-11-28 2017-11-28 Encryption/decryption method, encryption/decryption terminal, and double random phase encryption and decryption system WO2019104455A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/113261 WO2019104455A1 (en) 2017-11-28 2017-11-28 Encryption/decryption method, encryption/decryption terminal, and double random phase encryption and decryption system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/113261 WO2019104455A1 (en) 2017-11-28 2017-11-28 Encryption/decryption method, encryption/decryption terminal, and double random phase encryption and decryption system

Publications (1)

Publication Number Publication Date
WO2019104455A1 true WO2019104455A1 (en) 2019-06-06

Family

ID=66664372

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/113261 WO2019104455A1 (en) 2017-11-28 2017-11-28 Encryption/decryption method, encryption/decryption terminal, and double random phase encryption and decryption system

Country Status (1)

Country Link
WO (1) WO2019104455A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708282A (en) * 2019-08-21 2020-01-17 苏州科技大学 Chosen plaintext attack for double random polarization encoding encryption system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486076A (en) * 2014-11-18 2015-04-01 中国科学院大学 Double-random phase optical encryption system without phase detection
CN106506150A (en) * 2016-10-28 2017-03-15 深圳大学 A kind of dual image optical encryption method of high safety intensity and its decryption method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486076A (en) * 2014-11-18 2015-04-01 中国科学院大学 Double-random phase optical encryption system without phase detection
CN106506150A (en) * 2016-10-28 2017-03-15 深圳大学 A kind of dual image optical encryption method of high safety intensity and its decryption method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PENG, XIANG ET AL.: "Ciphertext-only Attack on Optical Encryption based on Double Random Phase Encoding", ACTA PHYSICA SINICA, vol. 56, no. 5, 31 May 2007 (2007-05-31) *
WAN, QIN.: "Improved Known-plaintext Attack on Optical Encryption based on Double Random Phase Encoding", PHOTONICS AND OPTOELECTRONIC (SOPO, 21 June 2010 (2010-06-21), pages 1 - 4, XP031704802 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708282A (en) * 2019-08-21 2020-01-17 苏州科技大学 Chosen plaintext attack for double random polarization encoding encryption system
CN110708282B (en) * 2019-08-21 2023-06-02 苏州科技大学 Encryption key acquisition method for double random polarization coding encryption system

Similar Documents

Publication Publication Date Title
Patel et al. Image encryption using different techniques: A review
CN107968705B (en) Encryption/decryption method, encryption/decryption end and double-random-phase encryption/decryption system
US20120023336A1 (en) System and method for designing secure client-server communication protocols based on certificateless public key infrastructure
US20130028419A1 (en) System and a method for use in a symmetric key cryptographic communications
US11874935B2 (en) Protecting data from brute force attack
Saini et al. Triple security of data in cloud computing
CN104243494B (en) A kind of data processing method
CN102594551B (en) Method for reliable statistics of privacy data on radio frequency identification (RFID) tag
Karthikeyan et al. Enhanced security in steganography using encryption and quick response code
CN104881838B (en) One kind is based on GF (23) (K, N) significant point deposited without expansion image and reconstructing method
CN105282090A (en) Public URL encryption coding method for preventing illegal access on internet
Kshirsagar et al. Anatomized study of security solutions for multimedia: deep learning-enabled authentication, cryptography and information hiding
Abu-Faraj et al. Increasing the security of transmitted text messages using chaotic key and image key cryptography
Mohammed et al. Advancing Cloud Image Security via AES Algorithm Enhancement Techniques
US10938790B2 (en) Security system and method
CN109412799B (en) System and method for generating local key
WO2019104455A1 (en) Encryption/decryption method, encryption/decryption terminal, and double random phase encryption and decryption system
Wang et al. Optical image encryption via reverse engineering of a modified amplitude-phase retrieval-based attack
KR101608378B1 (en) Asymmetric based image authentication method using photon-counting double random phase encoding
Devi et al. Preventing Data Leakage in Cloud Servers through Watermarking and Encryption Techniques
JP2005114870A (en) Cryptocommunication system
Ahuja et al. Dual layer secured password manager using Blowfish and LSB
Pawar et al. Survey of cryptography techniques for data security
Meghana et al. A new method for secret image transmission via mosaic fragments using ecc key
Negi et al. Strengthening Data Security of India using a mixed approach of Cryptography and Steganography Techniques: A Review

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17933542

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 07/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17933542

Country of ref document: EP

Kind code of ref document: A1