CN115296799B - Quick face recognition method for micro-service user identity authentication - Google Patents

Quick face recognition method for micro-service user identity authentication Download PDF

Info

Publication number
CN115296799B
CN115296799B CN202210873631.9A CN202210873631A CN115296799B CN 115296799 B CN115296799 B CN 115296799B CN 202210873631 A CN202210873631 A CN 202210873631A CN 115296799 B CN115296799 B CN 115296799B
Authority
CN
China
Prior art keywords
encrypted
base
string
base string
key
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
CN202210873631.9A
Other languages
Chinese (zh)
Other versions
CN115296799A (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.)
Hangzhou Yuema Senchuang Information Technology Co ltd
Original Assignee
Hangzhou Yuema Senchuang Information Technology Co ltd
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 Hangzhou Yuema Senchuang Information Technology Co ltd filed Critical Hangzhou Yuema Senchuang Information Technology Co ltd
Priority to CN202210873631.9A priority Critical patent/CN115296799B/en
Publication of CN115296799A publication Critical patent/CN115296799A/en
Application granted granted Critical
Publication of CN115296799B publication Critical patent/CN115296799B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0866Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • H04L9/3231Biological data, e.g. fingerprint, voice or retina
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32272Encryption or ciphering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems
    • H04N1/448Rendering the image unintelligible, e.g. scrambling
    • H04N1/4486Rendering the image unintelligible, e.g. scrambling using digital data encryption

Abstract

The invention relates to the field of image encryption, in particular to a quick face recognition method for micro-service user identity authentication. Acquiring a face image, and acquiring data to be encrypted of the face image; establishing an encryption dictionary, and acquiring an encoding key and an operation key; acquiring a base string of data to be encrypted as an initial base string; calculating the binary numbers of two adjacent bases in the initial base string to obtain the next base string of the data to be encrypted; operating the next layer of base string to obtain the next layer of base string of the data to be encrypted; sequentially iterating until only one base exists in the current base string; acquiring an encrypted base string and a binary number corresponding to the encrypted base string, and converting the binary number into a decimal system to obtain an encrypted image; and transmitting the encrypted image, and identifying the decrypted image by the face identification unit. The invention ensures the safety of image transmission by carrying out multi-layer iterative operation on the bases and finally selecting the bases in each layer for image encryption.

Description

Quick face recognition method for micro-service user identity authentication
Technical Field
The invention relates to the field of image encryption, in particular to a quick face recognition method for micro-service user identity authentication.
Background
With the rapid development of the internet, application programs become more and more complex, and tasks needing to be processed are more and more. In the past, a single application program cannot meet the increasing technical requirements, a micro-service architecture is developed, the micro-service architecture divides the single application program into a group of independent units, the units are coordinated and matched with each other to provide final services for users, more and more services adopt face recognition to perform identity authentication for ensuring the safety of online services, therefore, the micro-service architecture integrates a face image acquisition unit and a face recognition unit, and after the authorization of users, the face image acquisition unit acquires face images and transmits the face images to the face recognition unit to perform identity authentication.
Because the face image belongs to the personal privacy information, in the process of collecting the face image by the face image collecting unit and transmitting the face image to the face recognition unit, if the face image is directly transmitted, the face image can be stolen, so that the privacy of a user is leaked, and the face image in the transmission process needs to be encrypted; the existing encryption methods, such as an AES encryption method and DNA coding, encrypt the same pixel points or image contents into the same result when encrypting, are difficult to break the relevance among pixels, and are easy to be cracked by statistical analysis attack, and the existing encryption method using DNA has low complexity of the obtained key and poorer security protection on the encrypted contents.
Therefore, the invention provides a quick face identification method for identity authentication of micro-service users in order to break the relevance between pixels and increase the complexity of a secret key.
Disclosure of Invention
In order to solve the problem of the confidentiality of a face image in the transmission process of the face image, and simultaneously, an encrypted image can break the relevance between pixels and has a more complex key, the invention provides a quick face identification method for micro-service user identity authentication, which comprises the following steps: acquiring a face image, and acquiring data to be encrypted of the face image; establishing an encryption dictionary, and acquiring an encoding key and an operation key; acquiring a base string of data to be encrypted as an initial base string; calculating the binary numbers of two adjacent bases in the initial base string to obtain a second layer base string of the data to be encrypted; operating the second layer of base string to obtain the next layer of base string of the data to be encrypted; repeating the iteration until only one base exists in the current base string; acquiring an encrypted base string and a binary number of the encrypted base string in an encrypted dictionary, and converting the binary number into a decimal system to obtain an encrypted image; and transmitting the encrypted image, and identifying the decrypted image by the face identification unit.
According to the technical means provided by the invention, an encryption dictionary is established based on a DNA coding rule, and a coding key and an operation key are set according to an image to be encrypted, so that data to be encrypted can be converted into different base strings through a traditional DNA coding mode, the relevance between pixels can be broken, the base strings are subjected to multi-layer iterative operation, the operation result of each layer of base is determined according to different digits of the key, and finally, a plurality of layers of base strings are obtained, and one base in each layer of base string is selected for encryption, so that the randomness and the complexity of encryption are obviously improved, and the safety of the image in the transmission process can be ensured.
The invention adopts the following technical scheme that a method for rapidly identifying a face of a micro-service user for identity authentication comprises the following steps:
the method comprises the steps of obtaining a face image, converting a pixel value of each pixel point in the face image into a binary system, and obtaining data to be encrypted of the face image.
And establishing an encryption dictionary according to the DNA coding rule, respectively obtaining a coding key and an operation key of the data to be encrypted by utilizing chaotic mapping, and obtaining the DNA coding rule corresponding to each digit numerical value of the coding key in the encryption dictionary.
And acquiring an initial base string of the data to be encrypted according to the DNA encoding rule corresponding to the first digit value of the encoding key.
Calculating the binary number corresponding to the adjacent base in the initial base string by using the operation key to obtain the calculated binary number; and acquiring a base string corresponding to the binary number after operation in the DNA coding rule corresponding to the first digit value of the coding key, and taking the base string as a next layer base string of the data to be encrypted.
And acquiring a binary number corresponding to the next digit value of the next layer of base string of the data to be encrypted in the coding key corresponding to the DNA coding rule, and calculating the binary number corresponding to the adjacent base in the next layer of base string by using the operation key.
And acquiring a base string corresponding to the binary number obtained after the operation in a DNA coding rule corresponding to the next numerical value of the coding key, and sequentially iterating until the next layer of base string of the data to be encrypted is a base.
Obtaining an encrypted base string according to each layer of base string of the data to be encrypted, obtaining binary numbers of the encrypted base strings corresponding to the DNA coding rule in the last digit value of the coding key, converting the binary numbers of the encrypted base strings into decimal numbers, obtaining an encrypted pixel value of each pixel point in the face image, and obtaining an encrypted image according to the encrypted pixel value of each pixel point.
And transmitting the encrypted image to a face recognition unit for decryption, and comparing and recognizing the decrypted image.
Further, a method for rapidly identifying a face of a micro-service user for identity authentication, which respectively obtains an encoding key and an operation key of data to be encrypted by using chaotic mapping, comprises the following steps:
obtaining a chaos sequence with a set length of a face image by using chaos mapping, wherein the scope of the chaos sequence is [0,1], multiplying each number in the chaos sequence by 8, rounding up, and taking the obtained sequence as a coding key;
and acquiring a chaotic sequence with a set length of the face image by using chaotic mapping, wherein the range of the chaotic sequence is [0,1], multiplying each number in the chaotic sequence by 4, rounding off and rounding up, and taking the obtained sequence as an operation key.
Further, a method for rapid face recognition of micro-service user identity authentication, the method for establishing an encryption dictionary according to a DNA coding rule, comprises the following steps:
encoding binary 00, 11, 10, 01 into bases A, T, G, C by DNA encoding;
and acquiring the permutation and combination mode of each basic group and the corresponding binary number, and establishing the encryption dictionary according to each permutation and combination mode in sequence.
Further, a method for rapid face recognition of micro-service user identity authentication, which uses an operation key to operate binary numbers corresponding to two adjacent bases in an initial base string, comprises the following steps:
acquiring each digit of the operation key, wherein 1 is represented as an addition operation, 2 is represented as a subtraction operation, 3 is represented as an exclusive-or operation, and 4 is represented as an exclusive-or operation;
and acquiring the number of the corresponding digit in the operation key according to the adjacent two bases in the initial base string, and operating the binary number corresponding to the adjacent two bases in the initial base string according to the operation mode of the corresponding digit in the operation key.
Further, a method for fast face recognition of micro-service user identity authentication, which is a method for repeatedly iterating binary numbers obtained after operation, comprises the following steps:
selecting numbers with corresponding digits in the operation key to operate the initial base string of the data to be encrypted to obtain a second layer of base string;
acquiring binary numbers of a second layer base string of the data to be encrypted under a DNA coding rule corresponding to a second digit value in the coding key; starting from the figure of the figure corresponding to the operation key selected from the previous layer of base string, selecting the figure of the figure corresponding to the operation key of the current layer of base string, and circularly selecting the operation key;
and sequentially operating the next base string of the data to be encrypted by using the operation key until the next base string layer only contains one base.
Further, a method for fast face recognition of micro-service user identity authentication, which obtains an encrypted base string according to each layer of base string of data to be encrypted, comprises the following steps:
acquiring digits of all layer base strings of data to be encrypted corresponding to digits in a coding key, performing modulo-2 operation on the digits to obtain a binary string, and acquiring an inverted binary string of the binary string;
selecting bases in the last base string layer according to each digit of the reverse binary string from the last base string layer of the data to be encrypted;
when the number of the corresponding digit of the reverse binary string is 1, selecting the base on the right side of the upper layer; when the number of the corresponding digit of the reverse binary string is 0, selecting the base on the left side of the upper layer;
and sequentially selecting one base in each layer of base string of the data to be encrypted to obtain an encrypted base string.
Further, a method for rapid face recognition of micro-service user identity authentication, which converts binary number of encrypted base string in an encrypted dictionary into decimal system, and obtains an encrypted image, the method comprises the following steps:
acquiring a binary number corresponding to the encrypted base string in the encrypted dictionary according to a DNA encoding rule corresponding to the last digit value of the encoding key in the encrypted dictionary;
dividing each 8 bits of the binary number of the encrypted base string into a group, converting each group of binary number into a decimal number to obtain an encrypted pixel value of each pixel point, and obtaining an encrypted image according to the encrypted pixel values of all the pixel points.
The invention has the beneficial effects that: according to the technical means provided by the invention, an encryption dictionary is established based on a DNA coding rule, and a coding key and an operation key are set according to an image to be encrypted, so that data to be encrypted can be converted into different base strings through a traditional DNA coding mode, the relevance between pixels can be broken, the base strings are subjected to multi-layer iterative operation, the operation result of each layer of base is determined according to different digits of the key, and finally, a plurality of layers of base strings are obtained, and one base in each layer of base string is selected for encryption, so that the randomness and the complexity of encryption are obviously improved, and the safety of the image in the transmission process can be ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a method for rapid face recognition for identity authentication of a microservice user according to an embodiment of the present invention;
FIG. 2 is a diagram of an encryption dictionary in accordance with an embodiment of the present invention;
FIG. 3 is a diagram illustrating a repetitive iteration process in an embodiment of the present invention;
fig. 4 is a schematic diagram of an encrypted base string obtaining method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The specific scenes aimed by the invention are as follows: in the process of face identification and authentication, in order to ensure the confidentiality in the process of face image transmission, the face image needs to be encrypted, so that the privacy of a user is prevented from being disclosed and an attacker can be prevented from replaying and attacking the face image.
As shown in fig. 1, a schematic structural diagram of a method for fast face recognition for micro-service user identity authentication according to an embodiment of the present invention is provided, including:
101. the face image is collected through the face collecting unit, the pixel value of each pixel point in the face image is converted into a binary system, and data to be encrypted of the face image are obtained.
After the authorization approval of the user, the face image acquisition unit calls a camera to shoot a face image of the user, the image is a plaintext image to be encrypted and transmitted, the size of the image is MxN, the range of pixel values of each pixel point in the image is [0-255], the pixel values are converted into an eight-bit binary system to be represented, the pixel values of each pixel point are converted into the eight-bit binary system, and the eight-bit binary system is expanded into 1 line of data.
At this point, a face image is acquired and converted into binary data.
102. And establishing an encryption dictionary according to the DNA coding rule, and respectively obtaining a coding key and an operation key of the face image by utilizing chaotic mapping.
The method for establishing the encryption dictionary of the face image according to the DNA coding rule comprises the following steps:
encoding binary 00, 11, 10, 01 into bases A, T, G, C by DNA encoding;
and acquiring the permutation and combination mode of each basic group and the corresponding binary number, and establishing the encryption dictionary according to each permutation and combination mode in sequence.
In biology, DNA is composed of bases a (adenine), T (thymine), G (guanine), and C (cytosine), A, T is a pair of base pairs, G, C is a pair of base pairs, and DNA codes for base A, T, G, C in binary 00, 11, 10, and 01. There are a total of 8 possible encoding rules as shown in fig. 2.
And 8 possible coding rules are pre-stored in the face image acquisition unit and the face recognition unit to serve as a face image encryption dictionary.
The method for respectively acquiring the coding key and the operation key of the face image by utilizing the chaotic mapping comprises the following steps:
obtaining a chaos sequence with a set length of a face image by using chaos mapping, wherein the scope of the chaos sequence is [0,1], multiplying each number in the chaos sequence by 8, rounding up, and taking the obtained sequence as a coding key;
and acquiring a chaos sequence with a set length of the face image by using chaos mapping, wherein the scope of the chaos sequence is [0,1], multiplying each number in the chaos sequence by 4, rounding up, and taking the obtained sequence as an operation key.
The invention needs to carry out multilayer encryption operation on DNA codes, utilizes different DNA coding rules for each layer, and therefore needs to obtain a coding key so as to determine the DNA coding rule of each layer by combining the coding key, and obtains a chaotic sequence with the length of K1 by adopting a chaotic mapping method through a safety key agreed in advance by a face image acquisition unit and a face recognition unit, wherein the chaotic sequence range is [0,1]]Will beMultiplying each number in the chaotic sequence by 8 and rounding off, and taking the sequence as a coding key, the possible combination of the coding key is 8 K1 And (4) seed preparation.
Similarly, the scheme needs to perform multilayer encryption operation on the DNA codes, different operation modes are adopted between every two basic groups, so an operation key needs to be obtained, the operation mode between every two basic groups is determined by combining the operation key, 1 represents addition operation, 2 represents subtraction operation, 3 represents exclusive-or operation, 4 represents exclusive-or operation, a chaotic mapping method is adopted by using a safety key agreed in advance by the face image acquisition unit and the face recognition unit to obtain a chaotic sequence with the length of K2, and the chaotic sequence range is [0,1]Multiplying each number in the chaotic series by 4, rounding and rounding, and taking the sequence as an operation key, wherein the possible combination of the operation key is 4 K2 And (4) seed preparation.
It should be noted that, when the user performs face recognition each time, the face image acquisition unit and the face recognition unit update the encoding key and the operation key together.
1031. And acquiring a DNA coding rule corresponding to the first digit of the coding key in the encryption dictionary, and acquiring a base string corresponding to the data to be encrypted in the encryption dictionary according to the coding rule to serve as an initial base string of the data to be encrypted.
The existing DNA coding encryption method adopts one DNA coding rule to code a binary number, simultaneously utilizes different DNA coding rules to decode a coding result, and converts the binary number into another binary number to realize data encryption, and the two DNA coding rules adopted by the encryption method have 8 multiplied by 7=56 combination modes, so that the data encryption method is difficult to resist brute force attack.
The base can be subjected to addition, subtraction, exclusive-or and exclusive-or operation, the operation mode is the same as the binary operation rule, and the operation results of the base in the same operation mode are different under different coding rules.
Firstly, the 1 st bit of the coding key is used for carrying out DNA coding on the obtained binary data to be encrypted, the 1 st bit of the coding key corresponds to the coding rule of the corresponding serial number in the figure 2, and the binary data is coded into a base string according to the coding rule.
For example, the encoding key 281, the binary data to be encrypted 00101110 (corresponding to 46 decimal), and the encoding rule corresponding to the first digit 2 of the encoding key is a =00, t =11, g =01, c =10, and the binary data is encoded according to the rule to obtain the initial base string ACTC.
1032. Calculating binary numbers corresponding to two adjacent bases in the initial base string by using the operation key to obtain the calculated binary numbers; and acquiring a base string corresponding to the computed binary number in the encryption dictionary as a second layer base string of the data to be encrypted.
The method for calculating the binary numbers corresponding to two adjacent bases in the initial base string by using the operation key comprises the following steps:
acquiring each digit of the operation key, wherein 1 is represented as an addition operation, 2 is represented as a subtraction operation, 3 is represented as an exclusive-or operation, and 4 is represented as an exclusive-or operation;
and acquiring the number of the corresponding digit in the operation key according to the adjacent two bases in the initial base string, and operating the binary number corresponding to the adjacent two bases in the initial base string according to the operation mode of the corresponding digit in the operation key.
Carrying out multilayer iterative encryption operation on a DNA string obtained by carrying out DNA coding on a binary system, and firstly carrying out first-layer operation: and calculating every two adjacent bases in the base string according to the calculation key based on the coding rule of the layer, and obtaining a calculation result as the base string of the second layer.
For example, when the operation key is 13134 and the dna sequence is ACTC, for ACTC, 2 (subtraction), 3 (exclusive or), and 1 (addition) are performed for each two bases AC, CT, and TC under the coding rule 2 (a =00, t =11, g =01, c = 10):
A-C=00-10=10=C
Figure BDA0003761530950000071
T+C=11+10=01=G
wherein
Figure BDA0003761530950000072
Is an XOR operator;
Figure BDA0003761530950000073
and obtaining the base string of the second layer as CGG by the same or operator.
1033. And acquiring a binary number of a second layer base string of the data to be encrypted in the encryption dictionary according to the second digit of the coding key, operating binary numbers corresponding to every two adjacent bases in the second layer base string by using the operation key, and acquiring a next layer base string of the data to be encrypted according to the operated binary number.
And repeating iteration is carried out on the base string of the data to be encrypted by utilizing the coding key and the operation key until only one base exists in the base string of the current layer of the data to be encrypted.
The method for repeatedly iterating the base string of the data to be encrypted by utilizing the coding key and the operation key comprises the following steps of:
selecting numbers with corresponding digits in the operation key to operate the initial base string of the data to be encrypted to obtain a second layer of base string;
acquiring a binary number of a second layer base string of the data to be encrypted in the encryption dictionary according to a second digit in the encoding key; selecting the number of the corresponding digit of the operation key selected from the base string of the previous layer from the number of the corresponding digit of the operation key selected from the base string of the previous layer, and circularly selecting the operation key;
and sequentially operating each layer of base string of the data to be encrypted by using the operation key until the current layer of base string only contains one base.
For example, the encoding key is 281, the operation key is 23134, and the second-layer base string is CGG. The encoding rule of this layer is the encoding rule corresponding to the number 8 in the encoding key, that is, (G =00, c =11, t =01, a = 10), the previous layer uses the operation key until the 3 rd bit, and this layer performs 3 (exclusive or) and 4 (exclusive or) operations on every two adjacent bases CG and GG of the CGG from the number 3 of the 4 th bit of the operation key under the encoding rule 8:
Figure BDA0003761530950000081
Figure BDA0003761530950000082
the nucleotide sequence of the third layer is CC.
The operation is repeated until the current layer has only one base, for example, the encoding key is 281, the operation key is 23134, and the iterative process of the base string with binary data 00101110 to be encrypted is shown in fig. 3.
104. And acquiring an encrypted base string according to each layer of base string of the data to be encrypted, acquiring binary number of the encrypted base string in the encrypted dictionary according to the last digit of the encoding key, and converting the binary number of the encrypted base string in the encrypted dictionary into a decimal number to obtain an encrypted image.
The method for acquiring the encrypted base string according to each layer of base string of the data to be encrypted comprises the following steps:
acquiring digits of all layer base strings of data to be encrypted corresponding to digits in a coding key, performing modulo-2 operation on the digits to obtain a binary string, and acquiring an inverted binary string of the binary string;
selecting bases in the last base string layer according to each digit of the reverse binary string from the last base string layer of the data to be encrypted;
when the number of the corresponding digit of the reverse binary string is 1, selecting the base on the right side of the upper layer; when the number of the corresponding digit of the reverse binary string is 0, selecting the base on the left side of the upper layer;
and sequentially selecting one base in each layer of base string of the data to be encrypted to obtain an encrypted base string.
For each layer, only one base needs to be saved as a ciphertext, so the invention combines the coding key to obtain the saved bit string, carries out modulo-2 operation on the selected number in the coding key to obtain a binary string, carries out reverse order operation on the binary string, and combines the reverse order binary string to select the base needed to be saved in each layer.
The process of multilayer iterative operation can be regarded as an inverted binary tree, the last layer of the tree only has one base, and the base is not required to be selected and stored; the penultimate layer of the tree has two bases, the stored base is selected according to the binary value of the 1 st bit of the reverse binary string, and if the value is 0, the left base is stored; if the value is 1, the right base is saved; for the upper layer of the tree, according to the value of the corresponding position of the binary string, the stored base is selected from two bases connected with the base selected in the next layer, if the value is 0, the left base is stored, and if the value is 1, the right base is stored. And synthesizing the base of each layer into a base string to obtain an encrypted base string until one base is stored in each layer.
For example, the encoding key is 281, the operation key is 23134, and the process of obtaining the encrypted base string with binary data 00101110 to be encrypted is shown in fig. 4.
Performing modulo-2 operation on the coding key 281 selected by the data to be encrypted to obtain a binary string 001, performing reverse order operation on the binary string to obtain a reverse order binary string 100, and storing a base A for the 4 th layer (the last layer) of multi-layer iterative operation; for layer 3 (second to last layer), the right base C is saved according to the 1 st numerical value 1 of the reverse binary string; for layer 2, saving the base G on the left of the second layer connected with the selected base C of layer 3 according to the 2 nd digit value 0 of the reverse binary string; and for the layer 1, storing the base C on the left side of the second layer connected with the selected base G of the layer 2 according to the 3 rd bit numerical value 0 of the reverse binary string, and finally obtaining the encrypted base string of the data to be encrypted as CGCA.
The method for converting the binary number of the encrypted base string in the encrypted dictionary into the decimal number to obtain the encrypted image comprises the following steps:
acquiring a binary number corresponding to the encrypted base string in the encrypted dictionary according to a DNA encoding rule corresponding to the last digit of the encoding key in the encrypted dictionary;
dividing each 8 bits of the binary number of the encrypted base string into a group, converting each group of binary number into a decimal number to obtain an encrypted pixel value of each pixel point, and obtaining an encrypted image according to the encrypted pixel values of all the pixel points.
The binary number of the encrypted base string CGCA is obtained by using the corresponding coding rule (a =00, t =11, c =01, g = 10) of the last digit value 1 in the coding key 281 in the encrypted dictionary, and the encrypted binary string 01100100 is obtained. The conversion to decimal 100 achieves that the pixel value 46 is encrypted to 100.
105. The face acquisition unit transmits the encrypted image, and the face recognition unit decrypts the encrypted image according to the coding key and the operation key and recognizes the decrypted image.
Therefore, the encryption of the face image is realized, and the key complexity of the encryption method is 8 K1 ×4 K2 The larger the K1 and the K2 are, the larger the key complexity is, compared with the existing method of 56 the DNA coding encryption key complexity, the key complexity is greatly improved, brute force attack can be resisted, meanwhile, the scheme encryption method selectively stores one base in each layer of a multilayer iterative operation inverted binary tree, the relation between image pixel points is broken, the image security is further improved, and when face recognition authentication is carried out each time, the face image acquisition unit and the face recognition unit update the coding key and the operation key in the encryption process, an attacker can be prevented from intercepting a ciphertext image to replay the attack.
The face recognition unit receives the ciphertext image and then decrypts the ciphertext image according to the coding key and the operation key:
firstly, a ciphertext image is converted into binary data, the binary data is encoded by using an encoding rule corresponding to the last digit value of an encoding key, the binary data is converted into a base string, the encoding rule of each layer is obtained according to the encoding key, an inverted binary string is obtained by modulo 2 of the encoding rule serial number of each layer, and the position of each base in the base string in the corresponding layer in the iterative operation inverted binary tree is determined according to the inverted binary string.
And combining the operation key to obtain the operation mode of each layer of adjacent positions in the binary tree, and obtaining the base of each layer from the last layer in an inverted manner according to the operation mode of the adjacent positions until all the bases of the first layer are obtained.
And decoding the basic groups of the first layer by using a coding rule corresponding to the first digit numerical value of the coding key to obtain a binary string, dividing every 8 digits of the binary string into a group, converting the binary string into a decimal number, and converting the decimal number into an M multiplied by N image.
And finally, the face recognition unit performs user identity authentication by comparing the decrypted face image with the face images in the database, wherein the face images in the database are face images of all users registered with the application degree.
According to the technical means provided by the invention, an encryption dictionary is established based on a DNA coding rule, and a coding key and an operation key are set according to an image to be encrypted, so that data to be encrypted can be converted into different base strings through a traditional DNA coding mode, the relevance between pixels can be broken, the base strings are subjected to multi-layer iterative operation, the operation result of each layer of base is determined according to different digits of the key, and finally, a plurality of layers of base strings are obtained, and one base in each layer of base string is selected for encryption, so that the randomness and the complexity of encryption are obviously improved, and the safety of the image in the transmission process can be ensured.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (4)

1. A quick face recognition method for micro-service user identity authentication is characterized by comprising the following steps:
acquiring a face image, and converting the pixel value of each pixel point in the face image into a binary system to obtain data to be encrypted of the face image;
establishing an encryption dictionary according to the DNA coding rule, respectively obtaining a coding key and an operation key of data to be encrypted by utilizing chaotic mapping, and obtaining the corresponding DNA coding rule of each digit numerical value of the coding key in the encryption dictionary; the method for respectively acquiring the coding key and the operation key of the data to be encrypted by utilizing the chaotic mapping comprises the following steps:
obtaining a chaos sequence with a set length of the face image by utilizing chaos mapping, wherein the scope of the chaos sequence is [0,1], multiplying each number in the chaos sequence by 8, rounding off and rounding up, and taking the obtained sequence as a coding key;
obtaining a chaos sequence with a set length of a face image by using chaos mapping, wherein the scope of the chaos sequence is [0,1], multiplying each number in the chaos sequence by 4, rounding up, and taking the obtained sequence as an operation key;
the method for establishing the encryption dictionary according to the DNA coding rule comprises the following steps:
encoding binary 00, 11, 10, 01 into bases A, T, G, C by DNA encoding;
acquiring a permutation and combination mode of each basic group and the corresponding binary number, and establishing an encryption dictionary according to each permutation and combination mode in sequence;
acquiring an initial base string of data to be encrypted according to a DNA encoding rule corresponding to a first digit value of an encoding key;
calculating the binary number corresponding to the adjacent base in the initial base string by using the operation key to obtain the calculated binary number; acquiring a base string corresponding to the binary number after operation in a DNA coding rule corresponding to a first digit value of a coding key, and taking the base string as a next layer base string of the data to be encrypted;
acquiring a binary number corresponding to the DNA coding rule of the next-layer base string of the data to be encrypted at the next numerical value of the coding key, and operating the binary number corresponding to the adjacent base in the next-layer base string by using the operation key;
obtaining a base string corresponding to the binary number obtained after operation in a DNA coding rule corresponding to a next numerical value of the coding key, and sequentially iterating until a next layer of base string of the data to be encrypted is a base; the method for repeatedly iterating the binary number obtained after operation comprises the following steps:
selecting numbers with corresponding digits in the operation key to operate the initial base string of the data to be encrypted to obtain a second layer of base string;
acquiring binary numbers of a second layer base string of the data to be encrypted under a DNA coding rule corresponding to a second digit value in the coding key; selecting the number of the corresponding digit of the operation key selected from the base string of the previous layer from the number of the corresponding digit of the operation key selected from the base string of the previous layer, and circularly selecting the operation key;
sequentially operating the next layer of base string of the data to be encrypted by using the operation key until the next layer of base string only contains one base;
acquiring an encrypted base string according to each layer of base string of data to be encrypted, acquiring binary number of the encrypted base string corresponding to a DNA (deoxyribonucleic acid) encoding rule at the last digit value of an encoding key, converting the binary number of the encrypted base string into decimal number, acquiring an encrypted pixel value of each pixel point in a face image, and acquiring an encrypted image according to the encrypted pixel value of each pixel point;
and transmitting the encrypted image to a face recognition unit for decryption, and comparing and recognizing the decrypted image.
2. The method for rapid face recognition of micro-service user identity authentication according to claim 1, wherein the method for computing the binary numbers corresponding to two adjacent bases in the initial base string by using the computing key comprises:
acquiring each digit of the operation key, wherein 1 is represented as an addition operation, 2 is represented as a subtraction operation, 3 is represented as an exclusive-or operation, and 4 is represented as an exclusive-or operation;
and acquiring the number of the corresponding digit in the operation key according to the adjacent two bases in the initial base string, and operating the binary numbers corresponding to the adjacent two bases in the initial base string according to the operation mode of the corresponding number in the operation key.
3. The method for rapid face recognition of micro-service user identity authentication according to claim 1, wherein the method for obtaining the encrypted base string according to each layer of base string of the data to be encrypted comprises:
acquiring digits of all layer base strings of data to be encrypted corresponding to digits in a coding key, performing modulo-2 operation on the digits to obtain a binary string, and acquiring an inverted binary string of the binary string;
selecting bases in the last base string layer according to each digit of the reverse binary string from the last base string layer of the data to be encrypted;
when the number of the corresponding digit of the reverse binary string is 1, selecting the right base of the upper layer; when the number of the corresponding digit of the reverse binary string is 0, selecting the base on the left side of the upper layer;
and sequentially selecting one base in each layer of base string of the data to be encrypted to obtain an encrypted base string.
4. The method for rapid face recognition of micro-service user identity authentication according to claim 1, wherein the method for obtaining the encrypted image by converting the binary number of the encrypted base string in the encryption dictionary into decimal system comprises:
acquiring a binary number corresponding to the encrypted base string in the encrypted dictionary according to a DNA encoding rule corresponding to the last digit value of the encoding key in the encrypted dictionary;
dividing each 8 bits of the binary number of the encrypted base string into a group, converting each group of binary number into a decimal number to obtain an encrypted pixel value of each pixel point, and obtaining an encrypted image according to the encrypted pixel values of all the pixel points.
CN202210873631.9A 2022-07-21 2022-07-21 Quick face recognition method for micro-service user identity authentication Active CN115296799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210873631.9A CN115296799B (en) 2022-07-21 2022-07-21 Quick face recognition method for micro-service user identity authentication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210873631.9A CN115296799B (en) 2022-07-21 2022-07-21 Quick face recognition method for micro-service user identity authentication

Publications (2)

Publication Number Publication Date
CN115296799A CN115296799A (en) 2022-11-04
CN115296799B true CN115296799B (en) 2023-03-14

Family

ID=83823428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210873631.9A Active CN115296799B (en) 2022-07-21 2022-07-21 Quick face recognition method for micro-service user identity authentication

Country Status (1)

Country Link
CN (1) CN115296799B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590842A (en) * 2017-09-05 2018-01-16 山东师范大学 Intersect the image encryption method and device of dynamic chaos password based on pixel and DNA
CN107798708A (en) * 2017-11-16 2018-03-13 深圳大学 A kind of out of order codings of DNA and the image encryption and decryption method of chaotic maps
CN109756322A (en) * 2018-11-28 2019-05-14 郑州轻工业学院 Digital image encryption method based on DES structure and DNA encoding
CN112329580A (en) * 2020-10-29 2021-02-05 珠海市大悦科技有限公司 Identity authentication method and device based on face recognition
CN113660079A (en) * 2021-08-13 2021-11-16 辽宁工程技术大学 Image encryption method based on self diffusion and DNA coding
CN114254748A (en) * 2021-09-27 2022-03-29 清华大学 Extended coding method, system and related device for storage channel

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102013980A (en) * 2009-05-06 2011-04-13 刘海云 Random encryption method for decrypting by adopting exhaustion method
CN105046636B (en) * 2015-07-13 2017-05-03 郑州轻工业学院 Digital image encryption method based on chaotic system and nucleotide sequence database
CN108366181B (en) * 2018-01-23 2019-10-01 西南财经大学 A kind of image encryption method based on hyperchaotic system and multistage scramble
US20200287704A1 (en) * 2020-05-22 2020-09-10 Qiang Zhang Color Image Encryption Method Based on DNA Strand Displacement Analog Circuit
CN113297606B (en) * 2021-06-25 2022-07-19 燕山大学 Color quantum image encryption and decryption method based on multiple chaos and DNA operation
CN114549266A (en) * 2021-12-30 2022-05-27 河南大学 Image encryption method based on DNA replacement rule and chaotic system
CN114726497A (en) * 2022-03-16 2022-07-08 大连大学 Fractal sequencing and DNA chaotic image encryption method based on multi-target mayflies optimization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590842A (en) * 2017-09-05 2018-01-16 山东师范大学 Intersect the image encryption method and device of dynamic chaos password based on pixel and DNA
CN107798708A (en) * 2017-11-16 2018-03-13 深圳大学 A kind of out of order codings of DNA and the image encryption and decryption method of chaotic maps
CN109756322A (en) * 2018-11-28 2019-05-14 郑州轻工业学院 Digital image encryption method based on DES structure and DNA encoding
CN112329580A (en) * 2020-10-29 2021-02-05 珠海市大悦科技有限公司 Identity authentication method and device based on face recognition
CN113660079A (en) * 2021-08-13 2021-11-16 辽宁工程技术大学 Image encryption method based on self diffusion and DNA coding
CN114254748A (en) * 2021-09-27 2022-03-29 清华大学 Extended coding method, system and related device for storage channel

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Image Encryption System Based On Chaotic System And DNA Computing;Yunyi Li ect.;《2021 2nd International Conference on Computer Engineering and Intelligent Control (ICCEIC)》;20220202;全文 *
信息安全中的DNA编码技术;尹孟嘉等;《电脑与电信》;20071210(第12期);全文 *
基于DNA编码的安全高效的图像加密算法;李孝东等;《计算机应用与软件》;20180115(第01期);全文 *
基于双混沌系统和DNA编码的图像加密算法;杨宇光,裴帅康;《安徽大学学报(自然科学版)》;20220606;全文 *
结合混沌映射与DNA计算的自适应图像加密算法;黄林荃等;《小型微型计算机系统》;20200904(第09期);全文 *

Also Published As

Publication number Publication date
CN115296799A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN112202984B (en) Ciphertext domain reversible information hiding method based on error correction redundancy
CN1357182A (en) Method for encrypting information and device for realization of method
CN111464296B (en) Sequence cipher generation method, data encryption method and data decryption method
CN116032474B (en) Safety protection system based on big data computer network
CN110795762B (en) Reserved format encryption method based on stream cipher
CN113194213B (en) PNG image information hiding and recovering method based on secret sharing and chaotic mapping
CN110535624B (en) Medical image privacy protection method applied to DICOM format
CN113129196B (en) Image encryption method based on DNA sequence and memristor chaos
US20070189518A1 (en) 3-D quaternion quantum fractal encryption
Gupta et al. A new image encryption algorithm based on DNA approach
CN116155620B (en) Transaction data secure transmission method for card reader
CN107437266A (en) Image encryption method based on chaos system Yu DNA chain displacement model
CN114549266A (en) Image encryption method based on DNA replacement rule and chaotic system
CN115865431A (en) Network security sharing method for private data
CN115150818A (en) Communication transmission encryption method based on artificial intelligence
CN104598801B (en) A kind of Dynamic Two-dimensional code generating method based on algorithm reconstruct
CN115695675A (en) Video encryption method for network data secure exchange
CN113691362B (en) Bit plane image compression encryption method based on hyperchaotic system and DNA coding
CN112769545B (en) Image encryption method based on adjacent pixel Joseph transformation and Mealy state machine
CN115296799B (en) Quick face recognition method for micro-service user identity authentication
Gasimov et al. Image encryption algorithm using DNA pseudo-symbols and chaotic map
CN115103080A (en) Image encryption method and system based on DNA triploid variation
CN115134471A (en) Image encryption and decryption method and related equipment
CN116647327B (en) Programmable edge controller communication method based on image encryption
Sadia et al. Information Hiding Through a Novel DNA Steganography Technique to Secure Text Communication

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