CN113190867B - Key generation method, key generation device, electronic device, and storage medium - Google Patents

Key generation method, key generation device, electronic device, and storage medium Download PDF

Info

Publication number
CN113190867B
CN113190867B CN202110581253.2A CN202110581253A CN113190867B CN 113190867 B CN113190867 B CN 113190867B CN 202110581253 A CN202110581253 A CN 202110581253A CN 113190867 B CN113190867 B CN 113190867B
Authority
CN
China
Prior art keywords
sequence
chaotic
subsequence
generating
target image
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.)
Active
Application number
CN202110581253.2A
Other languages
Chinese (zh)
Other versions
CN113190867A (en
Inventor
唐浩
吴昊
陈晓
陈挚诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110581253.2A priority Critical patent/CN113190867B/en
Publication of CN113190867A publication Critical patent/CN113190867A/en
Application granted granted Critical
Publication of CN113190867B publication Critical patent/CN113190867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • G06F21/46Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Image Processing (AREA)

Abstract

The present disclosure provides a key generation method that may be used in the field of encryption technology, finance, or other fields. The key generation method comprises the following steps: converting the multi-frame target image to obtain a data matrix corresponding to the multi-frame target image; generating a first sequence based on the data matrix; generating initial parameters of the chaotic system based on the first sequence; inputting the initial parameters into the chaotic system to obtain a second sequence; and combining the first sequence and the second sequence to obtain a key corresponding to the multi-frame target image. Furthermore, the present disclosure also provides a key generation apparatus, an electronic device, a readable storage medium and a computer program product.

Description

Key generation method, key generation device, electronic device, and storage medium
Technical Field
The present disclosure relates to the field of encryption technology and the field of finance, and more particularly, to a key generation method, a key generation apparatus, an electronic device, a readable storage medium, and a computer program product.
Background
Along with the promotion of informatization process and the popularization of mobile terminals, information digitization, internet sharing modes and the like bring more convenient and rapid production and living experience to users.
In the course of implementing the disclosed concept, the inventor found that the risk of disclosure of personal privacy of the user increases while the user enjoys the convenience of the informatization age.
Disclosure of Invention
In view of this, the present disclosure provides a key generation method, a key generation apparatus, an electronic device, a readable storage medium, and a computer program product.
One aspect of the present disclosure provides a key generation method, including: converting a multi-frame target image to obtain a data matrix corresponding to the multi-frame target image; generating a first sequence based on the data matrix; generating initial parameters of the chaotic system based on the first sequence; inputting the initial parameters into the chaotic system to obtain a second sequence; and combining the first sequence and the second sequence to obtain a key corresponding to the multi-frame target image.
According to an embodiment of the present disclosure, the converting the multi-frame target image to obtain a data matrix corresponding to the multi-frame target image includes: converting each frame of the target image into at least one first data matrix; processing all the first data matrixes according to a preset processing mode to obtain a plurality of second data matrixes; and combining the plurality of second data matrixes according to a first preset sequence to obtain the data matrixes.
According to an embodiment of the present disclosure, the generating a first sequence based on the data matrix includes: processing the data matrix by using a hash algorithm to obtain a first subsequence; generating a second sub-sequence by using a random number generation algorithm, wherein parameters in the second sub-sequence are the same as the binary system of parameters in the first sub-sequence; and combining the first subsequence and the second subsequence to obtain the first sequence.
According to an embodiment of the disclosure, generating initial parameters of the chaotic system based on the first sequence includes: sequencing the first sequences according to a second preset sequence to obtain sequenced first sequences; dividing the ordered first sequence into a third subsequence and a fourth subsequence according to a preset proportion; performing decimal conversion on the third subsequence and the fourth subsequence respectively to obtain a first characteristic value and a second characteristic value; and inputting the first characteristic value and the second characteristic value into a system parameter generating function, and outputting to obtain the initial parameters of the chaotic system.
According to an embodiment of the present disclosure, the system parameter generation function includes a linear function.
According to an embodiment of the present disclosure, the inputting the initial parameter into the chaotic system to obtain a second sequence includes: performing multiple iterations on the chaotic system based on the initial parameters to obtain a first chaotic sequence; arranging the first chaotic sequences according to a third preset sequence to obtain a second chaotic sequence; conducting derivation processing on the second chaotic sequence to obtain a third chaotic sequence; and performing binary conversion on the third chaotic sequence to obtain the second sequence.
According to an embodiment of the present disclosure, the chaotic system includes a piecewise linear chaotic mapping system.
Another aspect of the present disclosure provides a key generation apparatus, including a conversion module, a first generation module, a second generation module, an operation module, and a combination module. Wherein: the conversion module is used for converting the multi-frame target image to obtain a data matrix corresponding to the multi-frame target image; the first generation module is used for generating a first sequence based on the data matrix; the second generation module is used for generating initial parameters of the chaotic system based on the first sequence; the operation module is used for inputting the initial parameters into the chaotic system to obtain a second sequence; and a merging module, configured to merge the first sequence and the second sequence to obtain a key corresponding to the multi-frame target image.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more instructions that, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a method as described above.
Another aspect of the present disclosure provides a computer program product comprising computer executable instructions which, when executed, are for implementing a method as described above.
According to the embodiment of the disclosure, a first sequence is generated according to a data matrix obtained through transformation and combination of multi-frame target images, initial parameters of a chaotic system are obtained through calculation according to the first sequence, then the initial parameters are input into the chaotic system, a second sequence is obtained through multiple iterations, and finally the first sequence and the second sequence are combined to obtain a secret key corresponding to the multi-frame target images. By the method, the problem that the secret key can be cracked through a conventional algorithm is at least partially solved, the secret key space of the secret key is effectively increased, and the safety of the secret key is improved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
fig. 1 schematically illustrates an exemplary system architecture 100 in which a key generation method may be applied according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a key generation method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a schematic diagram of a key composition structure according to an embodiment of the present disclosure;
fig. 4 schematically shows a block diagram of a key generation apparatus according to an embodiment of the present disclosure;
fig. 5 schematically illustrates a block diagram of an electronic device 500 adapted to implement a key generation method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
With the further popularization of the internet as a global information base and a full-human community and the popularization of mobile terminals such as mobile phones, tablet computers and notebook computers, the ways of obtaining and releasing information from the outside are more various, more convenient and faster. The digitization of various information and the four-way-eight Internet sharing mode bring convenience, rapidness and friendly life production experience to users, and meanwhile, the exposure risk of private information such as personal information, life production tracks and the like of the users is increased. Therefore, in order to resolve the security risk of network information, improvements in encryption technology are needed.
With the advent of the 5G age, the digital image transmission capability has increased, so that the image encryption technology has been more advanced towards high security performance under the current high-computation and high-speed technologies.
In view of the above, the inventor combines the complexity of image encryption and the disorder characteristic of the chaotic system to generate the key, so that the robustness and the encryption of the generated key are more stable and outstanding, and the risk brought by cracking some conventional keys in the market through an algorithm is avoided greatly.
Specifically, embodiments of the present disclosure provide a key generation method, a key generation apparatus, an electronic device, a readable storage medium, and a computer program product. The method comprises the following steps: converting the multi-frame target image to obtain a data matrix corresponding to the multi-frame target image; generating a first sequence based on the data matrix; generating initial parameters of the chaotic system based on the first sequence; inputting the initial parameters into the chaotic system to obtain a second sequence; and combining the first sequence and the second sequence to obtain a key corresponding to the multi-frame target image.
It should be noted that the key generation method and the device provided by the embodiments of the present disclosure may be used in the field of encryption technology or the field of finance, for example, photographs of all certificates submitted when a customer transacts business may be encrypted by using the key generation method provided by the embodiments of the present disclosure, so as to prevent leakage of customer information. In addition, the key generation method and the device provided by the embodiment of the disclosure can be also used in other fields besides the encryption technical field and the financial field, for example, in the public service field, all information needing to be recorded can be encrypted by using the key generation method provided by the embodiment of the disclosure. The application fields of the methods and the devices provided by the embodiments of the present disclosure are not limited.
Fig. 1 schematically illustrates an exemplary system architecture 100 in which a key generation method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include a terminal device 101, which terminal device 101 may be a variety of electronic devices having a display screen and supporting data storage and processing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The key generation method provided by the embodiment of the present disclosure may be performed in the terminal device 101, and accordingly, the key generation apparatus provided by the embodiment of the present disclosure may be provided in the terminal device 101. For the inputted pictures 103, 104, the terminal device 101 may execute a key generation method, compile the pictures 103, 104 into a binary key 105 and output.
The system architecture 100 of the embodiments of the present disclosure may further include a server 102, where the server 102 may be a server or a group of servers that provide data processing services, and where the server 102 and the terminal device 101 may interact with information via a wired or wireless communication link.
The key generation method provided by the embodiment of the present disclosure may also be performed in the server 102, and accordingly, the key generation apparatus provided by the embodiment of the present disclosure may be provided in the server 102. After receiving the pictures 103 and 104 to be encrypted, the terminal device 101 can transmit the pictures 103 and 104 to the server 102 through a communication link, and the server 102 executes a key generation method to generate a key 105; the server 102 may return the key 105 to the terminal device 101 over the communication link, with the key 105 being output by the terminal device 101.
In addition, the key generation method provided by the embodiment of the present disclosure may also be performed in other terminal devices different from the terminal device 101 or other servers or server groups different from the server 102, and accordingly, the key generation apparatus provided by the embodiment of the present disclosure may be provided in other terminal devices different from the terminal device 101 or other servers or server groups different from the server 102.
It should be understood that the number of terminal devices and servers in fig. 1 is merely illustrative. There may be any number of terminal devices and servers, as desired for implementation.
Fig. 2 schematically shows a flowchart of a key generation method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S210 to S250.
In operation S210, a multi-frame target image is converted to obtain a data matrix corresponding to the multi-frame target image.
In operation S220, a first sequence is generated based on the data matrix.
In operation S230, initial parameters of the chaotic system are generated based on the first sequence.
In operation S240, the initial parameters are input into the chaotic system to obtain a second sequence.
In operation S250, the first sequence and the second sequence are combined to obtain a key corresponding to the multi-frame target image.
According to embodiments of the present disclosure, the target image may be a picture of various formats, such as jpg, png, bmp.
According to an embodiment of the present disclosure, the target image may be converted into a data matrix through a matlab or the like program according to an embodiment of the present disclosure. For example, for a picture with a file name of "1.Jpg", each of the pictures may be converted into a matrix a by the statement a=imread ('1. Jpg').
According to the embodiment of the disclosure, before the target images are subjected to matrix transformation, all the target images can be cut into the same size in a cutting mode so as to be subjected to matrix transformation.
According to an embodiment of the present disclosure, the first sequence and the second sequence may be sequences composed of multi-bit binary numbers, the first sequence may have a fixed number of bits, and the number of bits of the second sequence may vary according to the number of iterations of the chaotic system.
According to embodiments of the present disclosure, hash algorithms such as sha-128, sha-256, etc. may be employed to generate a fixed number of bits of a first sequence from different sized data matrices, the number of bits of the generated first sequence being related to the employed algorithm, e.g., a 256-bit first sequence may be generated using the sha-256 algorithm.
According to an embodiment of the present disclosure, the initial parameters of the chaotic system may include an initial value x 0 And the control parameter p is kept unchanged in the iterative process of the chaotic system, and the output sequence of the chaotic system can be obtained after n iterationsColumn x= { X 1 ,x 2 ,...,x n }。
According to an embodiment of the present disclosure, the second sequence may be an output sequence of the chaotic system, or may be a sequence obtained by mathematically transforming the output sequence.
According to the embodiment of the disclosure, a first sequence is generated according to a data matrix obtained through transformation and combination of multi-frame target images, initial parameters of a chaotic system are obtained through calculation according to the first sequence, then the initial parameters are input into the chaotic system, a second sequence is obtained through multiple iterations, and finally the first sequence and the second sequence are combined to obtain a secret key corresponding to the multi-frame target images. By the method, the problem that the secret key can be cracked through a conventional algorithm is at least partially solved, the secret key space of the secret key is effectively increased, and the safety of the secret key is improved.
The method illustrated in fig. 2 is further described below with reference to fig. 3 in conjunction with an exemplary embodiment.
Fig. 3 schematically illustrates a schematic diagram of a key composition structure according to an embodiment of the present disclosure.
As shown in fig. 3, the key 300 is composed of a first sequence 310 with a fixed number of bits and a second sequence 320 with a variable number of bits, wherein the first sequence 310 further includes a first sub-sequence 311 and a second sub-sequence 312.
According to an embodiment of the present disclosure, the first subsequence 311 may be obtained by processing a data matrix using a hash algorithm, inputting the data matrix into the hash algorithm, and outputting a hash value as the first subsequence 311, for example, processing the data matrix using a sha-256 algorithm, to obtain a binary sequence with a length of 256 bits as the first subsequence 311.
According to an embodiment of the present disclosure, the data matrix may be obtained by converting and combining multiple frames of target image data, and specifically obtaining the data matrix may include the following steps:
first, each frame of target image is converted into at least one first data matrix.
According to the embodiment of the disclosure, a different number of first data matrices can be acquired for each frame of target image according to different image conversion modes. For example, by converting the image in RGB color space, YUV color space, etc., each frame of target image may obtain 3 first data matrices; through conversion methods such as gray scale and binarization, only 1 first data matrix can be acquired for each frame of target image.
And secondly, processing all the first data matrixes according to a preset processing mode to obtain a plurality of second data matrixes.
According to embodiments of the present disclosure, the first data matrix may be processed using transposition, inversion, matrix addition, matrix multiplication, etc. to obtain the second data matrix.
And combining the plurality of second data matrixes according to a first preset sequence to obtain a data matrix.
According to an embodiment of the present disclosure, the second subsequence 312 may be obtained by generating a random number through a random number generation algorithm such as a square-taking method, a linear congruence method, or the like, and processing the random number. For example, 256 random numbers between 0 and 9999 can be generated by a square method to obtain a random number sequence; then, for each random number in the random number sequence, in the case where the random number is less than 5000, the value of the random number is taken as 0, and in the case where the random number is greater than or equal to 5000, the value of the random number is taken as 1, thereby obtaining a 256-bit binary sequence, and the binary sequence is taken as the second subsequence 312.
According to an embodiment of the present disclosure, generating initial parameters of the chaotic system based on the first sequence 310 may include: sequencing the first sequence according to a second preset sequence to obtain a sequenced first sequence; dividing the ordered first sequence into a third subsequence and a fourth subsequence according to a preset proportion; performing decimal conversion on the third subsequence and the fourth subsequence respectively to obtain a first characteristic value and a second characteristic value; and inputting the first characteristic value and the second characteristic value into a system parameter generating function, and outputting to obtain the initial parameters of the chaotic system.
For example, the number of bits of the first sequence 310 generated is 512 bits, and the first sequence 310 may be halved in order as v 1 And v 2 Two parts, v 1 And v 2 The number of bits of (2) is 256 bits; thereafter, v can be 1 And v 2 And converting into decimal numbers, and inputting the two decimal numbers into a system parameter generating function to obtain initial parameters.
According to embodiments of the present disclosure, the ordered first sequence may be partitioned into a third sub-sequence and a fourth sub-sequence in any ratio of 1:1, 3:2, 4:5, etc.
According to an embodiment of the present disclosure, the system parameter generation function may be a linear function, for example, may be a linear function as shown in formula (1):
in formula (1), x 0 And p respectively represent initial parameters of function output, v 1 And v 2 Representing the first characteristic value and the second characteristic value, respectively.
According to an embodiment of the present disclosure, the chaotic system may use a double-precision type (double) parameter, and a key space of a key generated by the chaotic system is related to the key generation parameter and a computer precision, for example, a general computer has a computer precision of 10 -15 The key space can be accumulated to 10 if the number of key generation parameters calculated according to the formula (1) is 2 15 ×2=10 30
According to an embodiment of the present disclosure, the chaotic system may be a piecewise linear chaotic mapping system as shown in formula (2):
in formula (2), x n Representing the output value of the system after n iterations.
According to the embodiment of the present disclosure, the formula (1) and the formula (2) are combined to obtainChaotic sequence X= { X output to chaotic system 1 ,x 2 ,...,x n X, where x n ∈(0,1)。
According to an embodiment of the present disclosure, the chaotic sequence may be arranged in a third preset order; then, derivative processing can be performed on the sorted chaotic sequence to obtain a derivative sequence X '= { X' 1 ,x′ 2 ,...,x′ n The sequence after derivation can increase the complexity of the chaotic sequence on the basis of not changing the characteristic of the chaotic sequence; the derivative sequence may then be binary converted to obtain a second sequence 320.
According to an embodiment of the present disclosure, the first preset sequence, the second preset sequence, and the third preset sequence may include a positive sequence, a negative sequence, and the like, and are not limited herein. In addition, the first preset sequence, the second preset sequence or the third preset sequence may be a subscript number sequence of a preset identification arrangement sequence, so that the second data matrix, the binary numbers in the first sequence or the binary numbers in the first chaotic sequence are ordered according to the corresponding subscript number sequence. For example, the first chaotic sequence is X 1 ={x 1 ,x 2 ,x 3 ,x 4 ,x 5 The third preset sequence is a subscript sequence T= {2,3,1,5,4}, and the second chaotic sequence obtained after the arrangement according to the subscript sequence is X 2 ={x 2 ,x 3 ,x 1 ,x 5 ,x 4 }。
According to the embodiment of the disclosure, any rule can be adopted to binary-convert the sequence after derivation. For example, a value of 1 may be obtained for a number greater than a preset threshold in the derived sequence, and a value of 0 for a number less than the preset threshold; each number in the derived sequence may be converted to a 16-bit binary number, where the binary number may include 1 sign bit, 5 integer bits, and 10 decimal places.
According to the embodiment of the present disclosure, by adjusting the value of the iteration number n, the change of the number of bits of the second sequence 320 may be achieved, thereby improving the flexibility of the key.
Fig. 4 schematically shows a block diagram of a key generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 4, the key generation apparatus includes a conversion module 410, a first generation module 420, a second generation module 430, an operation module 440, and a combination module 450.
The conversion module 410 is configured to convert the multiple frame target images to obtain a data matrix corresponding to the multiple frame target images.
A first generation module 420 is configured to generate a first sequence based on the data matrix.
The second generating module 430 is configured to generate initial parameters of the chaotic system based on the first sequence.
The operation module 440 is configured to input the initial parameter into the chaotic system to obtain a second sequence.
And the merging module 450 is configured to merge the first sequence and the second sequence to obtain a key corresponding to the multi-frame target image.
According to the embodiment of the disclosure, a first sequence is generated according to a data matrix obtained through transformation and combination of multi-frame target images, initial parameters of a chaotic system are obtained through calculation according to the first sequence, then the initial parameters are input into the chaotic system, a second sequence is obtained through multiple iterations, and finally the first sequence and the second sequence are combined to obtain a secret key corresponding to the multi-frame target images. By the method, the problem that the secret key can be cracked through a conventional algorithm is at least partially solved, the secret key space of the secret key is effectively increased, and the safety of the secret key is improved.
According to an embodiment of the present disclosure, the conversion module 410 includes a first conversion unit, a second conversion unit, and a third conversion unit.
And the first conversion unit is used for converting each frame of target image into at least one first data matrix.
The second conversion unit is used for processing all the first data matrixes according to a preset processing mode to obtain a plurality of second data matrixes.
And the third conversion unit is used for merging the plurality of second data matrixes according to the first preset sequence to obtain the data matrixes.
According to an embodiment of the present disclosure, the first generation module 420 includes a first generation unit, a second generation unit, and a third generation unit.
A first generation unit for processing the data matrix using a hash algorithm to obtain a first subsequence.
And a second generation unit for generating a second sub-sequence using a random number generation algorithm, wherein the parameter in the second sub-sequence is the same as the parameter in the first sub-sequence.
And the third generating unit is used for combining the first subsequence and the second subsequence to obtain the first sequence.
According to an embodiment of the present disclosure, the second generating module 430 includes a fourth generating unit, a fifth generating unit, a sixth generating unit, and a seventh generating unit.
And the fourth generating unit is used for sequencing the first sequence according to a second preset sequence to obtain a sequenced first sequence.
And the fifth generation unit is used for dividing the ordered first sequence into a third subsequence and a fourth subsequence according to a preset proportion.
And the sixth generation unit is used for performing decimal conversion on the third subsequence and the fourth subsequence respectively to obtain a first characteristic value and a second characteristic value.
And the seventh generating unit is used for inputting the first characteristic value and the second characteristic value into a system parameter generating function and outputting the initial parameter of the chaotic system.
According to an embodiment of the present disclosure, the operation module 440 includes a first operation unit, a second operation unit, a third operation unit, and a fourth operation unit.
The first operation unit is used for iterating the chaotic system for a plurality of times based on the initial parameters so as to obtain a first chaotic sequence.
And the second operation unit is used for arranging the first chaotic sequence according to a third preset sequence to obtain a second chaotic sequence.
And the third operation unit is used for conducting derivation processing on the second chaotic sequence to obtain a third chaotic sequence.
And the fourth operation unit is used for binary conversion of the third chaotic sequence to obtain a second sequence.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the conversion module 410, the first generation module 420, the second generation module 430, the operation module 440, and the combining module 450 may be combined in one module/unit/sub-unit, or any of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the conversion module 410, the first generation module 420, the second generation module 430, the operation module 440, and the merge module 450 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuits, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the conversion module 410, the first generation module 420, the second generation module 430, the operation module 440, and the combination module 450 may be at least partially implemented as a computer program module, which when executed, may perform the corresponding functions.
Note that, in the embodiment of the present disclosure, the key generating device portion corresponds to the key generating method portion in the embodiment of the present disclosure, and the description of the key generating device portion specifically refers to the key generating method portion and is not described herein.
Fig. 5 schematically illustrates a block diagram of an electronic device adapted to implement a key generation method according to an embodiment of the disclosure. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, a computer electronic device 500 according to an embodiment of the present disclosure includes a processor 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 501 may also include on-board memory for caching purposes. The processor 501 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are stored. The processor 501, ROM 502, and RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the program may be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 500 may also include an input/output (I/O) interface 505, the input/output (I/O) interface 505 also being connected to the bus 504. The electronic device 500 may also include one or more of the following components connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 501. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program comprising program code for performing the methods provided by the embodiments of the present disclosure, the program code for causing an electronic device to implement the key generation methods provided by the embodiments of the present disclosure when the computer program product is run on the electronic device.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 501. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or installed from a removable medium 511 via the communication portion 509. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (6)

1. A key generation method, comprising:
converting a multi-frame target image to obtain a data matrix corresponding to the multi-frame target image;
generating a first sequence based on the data matrix;
generating initial parameters of the chaotic system based on the first sequence;
inputting the initial parameters into the chaotic system to obtain a second sequence; and
combining the first sequence and the second sequence to obtain a key corresponding to the multi-frame target image;
the converting the multi-frame target image to obtain a data matrix corresponding to the multi-frame target image includes:
converting each frame of the target image into at least one first data matrix;
processing all the first data matrixes according to a preset processing mode to obtain a plurality of second data matrixes; and
combining the plurality of second data matrixes according to a first preset sequence to obtain the data matrixes;
wherein the generating a first sequence based on the data matrix comprises:
processing the data matrix using a hash algorithm to obtain a first subsequence;
generating a second sub-sequence using a random number generation algorithm, wherein parameters in the second sub-sequence are the same as the binary system of parameters in the first sub-sequence; and
combining the first subsequence and the second subsequence to obtain the first sequence;
wherein, based on the first sequence, generating initial parameters of the chaotic system includes:
sequencing the first sequences according to a second preset sequence to obtain sequenced first sequences;
dividing the ordered first sequence into a third subsequence and a fourth subsequence according to a preset proportion;
performing decimal conversion on the third subsequence and the fourth subsequence respectively to obtain a first characteristic value and a second characteristic value; and
inputting the first characteristic value and the second characteristic value into a system parameter generating function, and outputting to obtain initial parameters of the chaotic system;
the step of inputting the initial parameters into the chaotic system to obtain a second sequence includes:
performing multiple iterations on the chaotic system based on the initial parameters to obtain a first chaotic sequence;
arranging the first chaotic sequences according to a third preset sequence to obtain a second chaotic sequence;
conducting derivation processing on the second chaotic sequence to obtain a third chaotic sequence; and
and performing binary conversion on the third chaotic sequence to obtain the second sequence.
2. The method of claim 1, wherein the system parameter generation function comprises a linear function.
3. The method of claim 1 or 2, wherein the chaotic system comprises a piecewise linear chaotic mapping system.
4. A key generation apparatus comprising:
the conversion module is used for converting the multi-frame target image to obtain a data matrix corresponding to the multi-frame target image;
a first generation module for generating a first sequence based on the data matrix;
the second generation module is used for generating initial parameters of the chaotic system based on the first sequence;
the operation module is used for inputting the initial parameters into the chaotic system to obtain a second sequence; and
the merging module is used for merging the first sequence and the second sequence to obtain a secret key corresponding to the multi-frame target image;
the conversion module is specifically configured to:
converting each frame of the target image into at least one first data matrix;
processing all the first data matrixes according to a preset processing mode to obtain a plurality of second data matrixes; and
combining the plurality of second data matrixes according to a first preset sequence to obtain the data matrixes;
the first generating module is specifically configured to:
processing the data matrix using a hash algorithm to obtain a first subsequence;
generating a second sub-sequence using a random number generation algorithm, wherein parameters in the second sub-sequence are the same as the binary system of parameters in the first sub-sequence; and
combining the first subsequence and the second subsequence to obtain the first sequence;
the second generating module is specifically configured to:
sequencing the first sequences according to a second preset sequence to obtain sequenced first sequences;
dividing the ordered first sequence into a third subsequence and a fourth subsequence according to a preset proportion;
performing decimal conversion on the third subsequence and the fourth subsequence respectively to obtain a first characteristic value and a second characteristic value; and
inputting the first characteristic value and the second characteristic value into a system parameter generating function, and outputting to obtain initial parameters of the chaotic system;
the operation module is specifically configured to:
performing multiple iterations on the chaotic system based on the initial parameters to obtain a first chaotic sequence;
arranging the first chaotic sequences according to a third preset sequence to obtain a second chaotic sequence;
conducting derivation processing on the second chaotic sequence to obtain a third chaotic sequence; and
and performing binary conversion on the third chaotic sequence to obtain the second sequence.
5. An electronic device, comprising:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 3.
6. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 3.
CN202110581253.2A 2021-05-26 2021-05-26 Key generation method, key generation device, electronic device, and storage medium Active CN113190867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110581253.2A CN113190867B (en) 2021-05-26 2021-05-26 Key generation method, key generation device, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110581253.2A CN113190867B (en) 2021-05-26 2021-05-26 Key generation method, key generation device, electronic device, and storage medium

Publications (2)

Publication Number Publication Date
CN113190867A CN113190867A (en) 2021-07-30
CN113190867B true CN113190867B (en) 2024-02-06

Family

ID=76985666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110581253.2A Active CN113190867B (en) 2021-05-26 2021-05-26 Key generation method, key generation device, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN113190867B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111461952A (en) * 2020-03-30 2020-07-28 三维通信股份有限公司 Image encryption method, computer device, and computer-readable storage medium
CN112084517A (en) * 2020-09-15 2020-12-15 郑州轻工业大学 Image encryption method based on chaotic mapping and bit-level permutation
CN112153238A (en) * 2020-09-28 2020-12-29 华侨大学 Image encryption method based on Tent mapping and composite chaotic mapping
CN112272082A (en) * 2020-09-28 2021-01-26 珠海大横琴科技发展有限公司 Image encryption/decryption method and device, electronic equipment and storage medium
CN112422268A (en) * 2020-11-10 2021-02-26 郑州轻工业大学 Image encryption method based on block scrambling and state conversion

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7170997B2 (en) * 2000-12-07 2007-01-30 Cryptico A/S Method of generating pseudo-random numbers in an electronic device, and a method of encrypting and decrypting electronic data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111461952A (en) * 2020-03-30 2020-07-28 三维通信股份有限公司 Image encryption method, computer device, and computer-readable storage medium
CN112084517A (en) * 2020-09-15 2020-12-15 郑州轻工业大学 Image encryption method based on chaotic mapping and bit-level permutation
CN112153238A (en) * 2020-09-28 2020-12-29 华侨大学 Image encryption method based on Tent mapping and composite chaotic mapping
CN112272082A (en) * 2020-09-28 2021-01-26 珠海大横琴科技发展有限公司 Image encryption/decryption method and device, electronic equipment and storage medium
CN112422268A (en) * 2020-11-10 2021-02-26 郑州轻工业大学 Image encryption method based on block scrambling and state conversion

Also Published As

Publication number Publication date
CN113190867A (en) 2021-07-30

Similar Documents

Publication Publication Date Title
US10728018B2 (en) Secure probabilistic analytics using homomorphic encryption
WO2021068444A1 (en) Data processing method and device, computer apparatus, and storage medium
WO2021068445A1 (en) Data processing method and apparatus, computer device, and storage medium
US10153894B2 (en) Homomorphic encryption with optimized encoding
CN108900364B (en) Block chain network management method, block chain network management device, block chain network management medium and electronic equipment
US20180367293A1 (en) Private set intersection encryption techniques
Yuan et al. Quantum image filtering in the spatial domain
Prasetyo et al. Lossless progressive secret sharing for grayscale and color images
US10853917B2 (en) Color image authentication method based on palette compression technique
WO2019047628A1 (en) Massive picture processing method, device, electronic apparatus and storage medium
Yang et al. Implementation of encryption algorithm and wireless image transmission system on FPGA
CN112865973A (en) Method for generating encryption key and digital signature based on lattice
Yeoh et al. A parallelizable chaos-based true random number generator based on mobile device cameras for the Android platform
Raveendran et al. An approximate low-power lifting scheme using reversible logic
Hu et al. A lossless secret image sharing scheme using a larger finite field
US10635786B2 (en) Methods and apparatus for encrypting multimedia information
WO2019178981A1 (en) Password management method and device employing customized rules, terminal apparatus, and storage medium
CN113190867B (en) Key generation method, key generation device, electronic device, and storage medium
CN111130791B (en) Data signature method, electronic device and computer readable storage medium
US20230119749A1 (en) Large-precision homomorphic comparison using bootstrapping
CN114915464B (en) Image encryption method and decryption method based on special matrix operation
CN110751251A (en) Method and device for generating and transforming two-dimensional code image matrix
CN115205089A (en) Image encryption method, network model training method and device and electronic equipment
US20210329027A1 (en) Proof of work based on compressed video
US9734154B2 (en) Method and apparatus for storing a data file

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
GR01 Patent grant
GR01 Patent grant