Encryption method, device, system and storage medium for user eye biometrics
By encrypting and decrypting the polar coordinate equation of the user's eye biometric image, combined with the improved RSA algorithm, the problem in the existing technology that the encrypted information is easy to crack after the key is obtained is solved, and the security of the user account is improved.
Patent Information
- Application Number
- CN202210556367.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-05-20
AI Technical Summary
After the encryption key, decryption key, public key parameter and private key parameter in the existing RSA algorithm are obtained by the attacker, the encrypted information is easily cracked, threatening the security of the user's eye biometrics.
By obtaining the iris or pupil image when the user logs in, the corresponding polar coordinate equation is determined, and encryption and decryption are performed based on the polar coordinate equation. The decryption key k in the improved RSA algorithm is used to meet specific conditions to ensure that the decrypted data is consistent with the Preset data matching increases the difficulty of attack.
Through improved private key parameter selection and key pair method, the encryption effect of iris or pupil images is enhanced, the attacker's decryption methods are limited, and the security of user accounts is improved.
Smart Images

Figure CN115037469B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network security, and in particular to an encryption method for user eye biometrics. Background Art
[0002] The existing technology can determine people's identities through the user's eye biometrics. The eye biometrics include iris images and pupil images. Encrypting and decrypting iris images and / or pupil images to ensure the security of user accounts has become a common means of protecting account security login. In this process, the RSA algorithm is often used for encryption and decryption to ensure data security.
[0003] The RSA encryption algorithm is an asymmetric encryption algorithm. The existing RSA algorithm has the following problems: Since the encryption formula and decryption formula in the RSA algorithm are: C≡M e mod(n) and M≡C k mod(n). This allows the attacker to obtain the e value in the RSA encryption formula and the k value in the decryption formula; or, if the user leaks the p value and q value, the attacker can try to obtain the e value and k value through database collision, brute force cracking, etc., thereby obtaining the original data that the user wants to protect through encryption.
[0004] To this end, an encryption method, device, system and storage medium for user eye biometrics are provided to solve the technical problem that encrypted information can be easily cracked after the encryption key, decryption key, public key parameters and private key parameters in the RSA algorithm are obtained by the attacker. This is a technical problem that urgently needs to be solved. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method, device, system and storage medium for encrypting user eye biometrics. The present invention can obtain the iris image and pupil image when the user logs in, and determine the polar coordinate equation corresponding to the aforementioned iris image or pupil image; encrypt the aforementioned iris image based on the polar coordinate equation, and after obtaining the encrypted iris data, decrypt the aforementioned encrypted iris data to obtain decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; or, encrypt the aforementioned pupil image based on the polar coordinate equation, and after obtaining the encrypted pupil data, decrypt the aforementioned encrypted pupil data to obtain decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account.
[0006] In order to solve the existing technical problems, the present invention provides the following technical solutions:
[0007] A method for encrypting a user's eye biometrics, comprising the steps of:
[0008] Obtaining the iris image and pupil image of the user when logging in, and determining the polar coordinate equation corresponding to the aforementioned iris image or pupil image;
[0009] The iris image is encrypted based on the polar coordinate equation to obtain encrypted iris data, and then the encrypted iris data is decrypted to obtain decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; or, the pupil image is encrypted based on the polar coordinate equation to obtain encrypted pupil data, and then the encrypted pupil data is decrypted to obtain decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account; wherein the encryption and decryption both adopt the RSA algorithm, so that the decryption key k in the RSA algorithm satisfies e*k≡1mod[(p-1)*(q-1)] and (a*e)*(a*k)≡1mod[(p-1)*(q-1)] at the same time, e is the encryption key, p and q are both prime numbers, a is the factor variable in the RSA algorithm, and the modular operation mod represents the remainder, which represents the remainder of the value of .
[0010] Further, the encrypted iris data includes the aforementioned iris image and the corresponding encrypted iris information; the encrypted pupil data includes the aforementioned pupil image and the corresponding encrypted pupil information; the decrypted iris data includes the aforementioned iris image and the corresponding decrypted iris information; the decrypted pupil data includes the aforementioned pupil image and the corresponding decrypted pupil information.
[0011] Furthermore, the acquired iris image or pupil image is subjected to image processing; the image processing includes at least one of image positioning, image normalization and image enhancement; after the image processing, the iris image or pupil image is cropped to obtain a square picture inscribed with the iris image or pupil image.
[0012] Furthermore, the polar coordinate equation is ρ1=b1(1-f1 2 ) / (1-f1cosθ1), wherein f1 is the eccentricity, f1=c1 / b1, b1 is the major axis of the ellipse, c1 is the focal length, and θ1 is the angle, 0≤θ1≤2π.
[0013] Further, the selection of p and q includes the steps of: retrieving the digital password set by the user, splitting the digital password, selecting any set of the split digital passwords as M1, the area information S1 of the iris image or the area information S2 of the pupil image, and the factor variable a in the RSA algorithm; multiplying the foregoing M1, S1, and a, or multiplying the foregoing M1, S2, and a, to obtain a value D1 or D2, obtaining all factor pairs of the foregoing D1 or all factor pairs of D2, and taking the largest factor among them as p; selecting another set of the split digital passwords as M2; multiplying the foregoing M2, S1, and a, or multiplying the foregoing M2, S2, and a, to obtain a value D3 or D4, obtaining all factor pairs of the foregoing D3 or all factor pairs of D4, and taking the largest factor among them as q.
[0014] Further, the value range of the encryption key e is 1 < e < (p - 1) * (q - 1), and e is relatively prime to (p - 1) * (q - 1); the RSA algorithm further includes a public key parameter n1 and a private key parameter n2, and n1 = n2; the encryption formula of the RSA algorithm is C ≡ M J mod n1, where J = a * e, M is the plaintext, and the decryption formula of the RSA algorithm is M ≡ C L mod n2, where L = a * k, C is the ciphertext, and the modulo operation mod represents taking the remainder of the value of n1 or n2, and both n1 and n2 are the products of the foregoing p and q.
[0015] Further, the value of a is obtained by encrypting the character string preset by the user through the Hash algorithm.
[0016] An encryption device for a user's eye biometric feature includes the following structure:
[0017] An information acquisition unit for acquiring the iris image or pupil image of the user during login and determining the polar coordinate equation corresponding to the iris image or pupil image;
[0018] An information encryption unit for encrypting the iris image based on the polar coordinate equation to obtain encrypted iris data, or encrypting the pupil image based on the polar coordinate equation to obtain encrypted pupil data;
[0019] An information decryption unit for decrypting the encrypted iris data to obtain decrypted iris data so that the iris image in the decrypted iris data matches the iris image preset in the user account; or decrypting the encrypted pupil data to obtain decrypted pupil data so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account.
[0020] An encryption system for a user's eye biometric feature includes an image processing module and a system server:
[0021] An image acquisition module, used to acquire an iris image or a pupil image of a user when the user logs in, and determine a polar coordinate equation corresponding to the iris image or the pupil image;
[0022] The system server is configured to: encrypt the aforementioned iris image based on the polar coordinate equation, and after obtaining the encrypted iris data, decrypt the aforementioned encrypted iris data to obtain the decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; or, encrypt the aforementioned pupil image based on the polar coordinate equation, and after obtaining the encrypted pupil data, decrypt the aforementioned encrypted pupil data to obtain the decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the implementation steps of any of the above-mentioned methods for encrypting user eye biometrics.
[0024] Based on the above advantages and positive effects, the advantages of the present invention are: improving the selection conditions of private key parameters and the selection method of key pairs in the RSA algorithm, strengthening the encryption effect of the key pair, thereby protecting the iris image or pupil image and limiting the attacker's decryption means. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A flowchart provided for an embodiment of the present invention.
[0026] Figure 2 A schematic diagram of the structure of a device provided in an embodiment of the present invention.
[0027] Figure 3 A schematic diagram of the structure of a system provided in an embodiment of the present invention.
[0028] Description of reference numerals:
[0029] Device 200, information acquisition unit 201, information encryption unit 202, information decryption unit 203;
[0030] System 300 , image acquisition module 301 , system server 302 . DETAILED DESCRIPTION
[0031] The following is a further detailed description of a method, device, system and storage medium for encrypting user eye biometrics disclosed in the present invention in conjunction with the accompanying drawings and specific embodiments. It should be noted that the technical features or combinations of technical features described in the following embodiments should not be considered isolated, and they can be combined with each other to achieve better technical effects. In the drawings of the following embodiments, the same reference numerals appearing in each drawing represent the same features or components, which can be applied to different embodiments. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0032] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the invention. Any modification of the structure, change of the proportion relationship or adjustment of the size should fall within the scope of the technical content disclosed by the invention without affecting the effects and purposes that can be achieved by the invention. The scope of the preferred embodiments of the present invention includes other implementations, in which the functions can be performed in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by those skilled in the art of the technical field to which the embodiments of the present invention belong.
[0033] Techniques, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and devices should be considered part of the authorization specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0034] Example
[0035] See also Figure 1 FIG. 1 is a flow chart of the present invention. The implementation step S100 of the method is as follows:
[0036] S101, obtaining an iris image and a pupil image of a user when logging in, and determining a polar coordinate equation corresponding to the iris image or the pupil image.
[0037] In a preferred implementation of this embodiment, the outline of the iris image or the outline of the pupil image can be approximately a circle or an ellipse.
[0038] Taking an ellipse as an example, the polar coordinate equation corresponding to the iris image or pupil image can be expressed as ρ1=b1(1-f1 2) / (1-f1cosθ1), wherein f1 is the eccentricity, f1=c1 / b1, b1 is the major axis of the ellipse, c1 is the focal length, and θ1 is the angle, 0≤θ1≤2π.
[0039] Taking the ellipse formed by the outer contour of the iris image as an example, the major axis is b1 = 0.006m, the minor axis is 0.005m, and the focal length is The eccentricity The polar coordinate equation of the iris outer contour is
[0040] S102, encrypting the aforementioned iris image based on the polar coordinate equation, and after obtaining the encrypted iris data, decrypting the aforementioned encrypted iris data to obtain the decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; or, encrypting the aforementioned pupil image based on the polar coordinate equation, and after obtaining the encrypted pupil data, decrypting the aforementioned encrypted pupil data to obtain the decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account.
[0041] Wherein, the encryption and decryption both adopt the RSA algorithm, so that the decryption key k in the aforementioned RSA algorithm satisfies e*k≡1mod[(p-1)*(q-1)] and (a*e)*(a*k)≡1mod[(p-1)*(q-1)], wherein e is the encryption key, p and q are both prime numbers, a is the factor variable in the aforementioned RSA algorithm, the modular operation mod represents the remainder, and mod[(p-1)*(q-1)] represents the remainder of the value of (p-1)*(q-1).
[0042] It should be noted that the encrypted iris data includes the aforementioned iris image and the corresponding encrypted iris information; the encrypted pupil data includes the aforementioned pupil image and the corresponding encrypted pupil information; the decrypted iris data includes the aforementioned iris image and the corresponding decrypted iris information; the decrypted pupil data includes the aforementioned pupil image and the corresponding decrypted pupil information.
[0043] Furthermore, since the user account is preset with stored user basic information, such as user name, user nickname and user code, etc., it also includes user vital signs information, such as user iris image information, pupil image information, user fingerprint information and user lip print information, etc., among which iris image and pupil image are user eye biometrics.
[0044] Taking the iris image as an example, when a user logs in to an account based on the iris image, the iris image at the time of the user logging in to the account is obtained, and this iris image is compared with the iris image preset in the user account to ensure that the biometric features in the two images are consistent, which is the behavior of the same user logging in to the account. The biometric features here can be represented by a polar coordinate equation, and the biometric features of each user are unique, so the obtained polar coordinate equation is unique.
[0045] In this process, to prevent attackers from stealing the iris image at the time of user login, it is uploaded in an encrypted form and the iris image at the time of user login is restored through a decryption operation.
[0046] As a preferred implementation manner of this embodiment, in the RSA algorithm, it includes a public key pair (public key parameter n1, encryption key e) and a private key pair (private key parameter n2, decryption key k), n1 = n2. Among them, the value range of the encryption key e is 1 < e < (p - 1) * (q - 1), and e is relatively prime to (p - 1) * (q - 1); the encryption formula of the RSA algorithm is C ≡ M J mod n1, where J = a * e, and M is the plaintext. The modulo operation mod means taking the remainder of the value of n1, and the n1 is the product of the aforementioned p and q.
[0047] In addition, the decryption key k must simultaneously satisfy e * k ≡ 1 mod [(p - 1) * (q - 1)] and (a * e) * (a * k) ≡ 1 mod [(p - 1) * (q - 1)]. The p and q are both prime numbers, the a is the factor variable in the aforementioned RSA algorithm, and the decryption formula of the RSA algorithm is M ≡ C L mod n2, where L = a * k, C is the ciphertext, and the modulo operation mod means taking the remainder of the value of n2, and the n2 is the product of the aforementioned p and q.
[0048] An example is given for the case where the decryption key k must simultaneously satisfy e * k ≡ 1 mod [(p - 1) * (q - 1)] and (a * e) * (a * k) ≡ 1 mod [(p - 1) * (q - 1)]. For example, p is 23, q is 59, and a is 175. At this time, (p - 1) * (q - 1) = 22 * 58 = 1276, then the value of e is 1 < e < 1276. Taking an integer e that is relatively prime to 1276, e is 41. From e * k ≡ 1 mod [(p - 1) * (q - 1)] and (a * e) * (a * k) ≡ 1 mod [(p - 1) * (q - 1)], the value of k is multi - solution. For example, the obtained k can be 249, 1525, and 2801, so any one of them is selected as the decryption key k.
[0049] It should also be noted that conventional cracking methods can be to illegally obtain p and q, and the illegal acquisition methods can be brute force cracking, stealing, and reverse deduction after obtaining parameters n1 and n2, etc. However, due to the existence of a in the RSA of this embodiment, the attacker needs to obtain a, p and q at the same time before obtaining the user's iris image or pupil image to crack the RSA algorithm. At the same time, the value of a can be disassembled into the product of multiple prime numbers, which increases the difficulty of cracking for the attacker.
[0050] Preferably, the encrypted iris data includes the aforementioned iris image and the corresponding encrypted iris information; the encrypted pupil data includes the aforementioned pupil image and the corresponding encrypted pupil information; the decrypted iris data includes the aforementioned iris image and the corresponding decrypted iris information; the decrypted pupil data includes the aforementioned pupil image and the corresponding decrypted pupil information.
[0051] Preferably, the acquired iris image or pupil image is subjected to image processing; the image processing includes at least one of image positioning, image normalization and image enhancement; after the image processing, the iris image or pupil image is cropped to obtain a square picture inscribed with the iris image or pupil image.
[0052] Preferably, the polar coordinate equation is ρ=b1(1-f1 2 ) / (1-f1cosθ1), wherein f1 is the eccentricity, f1=c1 / b1, b1 is the major axis of the ellipse, c1 is the focal length, and θ1 is the angle, 0≤θ1≤2π.
[0053] Optionally, the polar coordinate equation is ρ2=b2(1-f2 2 ) / (1-f2cosθ2), wherein f2 is the eccentricity, f2=c2 / b2, b2 is the major axis of the ellipse, c2 is the focal length, and θ2 is the angle, 0≤θ2≤2π.
[0054] Preferably, the selection of p and q includes step S110:
[0055] S111, retrieve the digital password set by the user, split the digital password, select any group of the split digital passwords and set them as M1, the area information S1 of the iris image or the area information S2 of the pupil image, and the factor variable a in the RSA algorithm.
[0056] As another preferred implementation of this embodiment, the digital password can be composed of multiple digits. For example, the digital password is composed of N digits (N is an integer greater than or equal to 2), and M digits (M is an integer greater than or equal to 1 and less than or equal to N) are arbitrarily selected from this group of numbers to form M1.
[0057] For example, the user enters a 12-digit numeric password, and then 1-6 digits are intercepted in order from left to right, and M1 is 000023.
[0058] Taking the case where the iris image contour or the pupil image contour is an ellipse as an example, the area formula of the pupil image is S 瞳孔 =πb 瞳孔长轴 d 瞳孔短轴 The area of the iris image is the area enclosed by the outer contour of the iris minus the area of the pupil image.
[0059] As an example but not limitation, assuming that the major axis of the pupil is 0.00009 m, the minor axis of the pupil is 0.00007 m, and the eccentricity f of the ellipse formed by the outline of the pupil image is 瞳孔轮廓 for The polar coordinate equation of the pupil is The area of the pupil image is S 瞳孔 =π*0.0009*0.0007=0.00000197m 2 Let b be the major axis of the ellipse enclosed by the outer contour of the iris. 虹膜轮廓 =0.006m, its minor axis is d 虹膜轮廓 =0.005m, focal length The eccentricity f of the ellipse enclosed by the outer contour of the iris is 虹膜轮廓 for Then the polar coordinate system equation of the iris outer contour is Then the area of the iris image is S 虹膜图像 =π*0.006*0.005-π*0.0009*0.0007=0.00009227m 2 .
[0060] The value of a is obtained by encrypting a character string preset by a user using a hash algorithm.
[0061] S112, multiply the aforementioned M1, S1 and a, or multiply the aforementioned M1, S2 and a, to obtain a value D1 or D2, obtain all factor pairs of the aforementioned D1 or all factor pairs of D2, and take the largest factor therein as p.
[0062] To reduce the amount of calculation, taking the pupil image as an example, M1 is 000023, S2 is 19, and a is 175, so D2=23*19*175 is obtained. Then all factor pairs of D2 are found and p=23 is determined.
[0063] S113. Select another set of split digital passwords and set them as M2; multiply the aforementioned M2, S1, and a, or multiply the aforementioned M2, S2, and a, to obtain the value D3 or D4. Obtain all factor pairs of the aforementioned D3 or all factor pairs of D4, and use the largest factor among them as q.
[0064] Similarly, to reduce the computational amount, taking the pupil image as an example, M2 is 000059, S2 is 19, and a is 175, so as to obtain D4 = 59 * 19 * 175. Then find all factor pairs of D4 and determine q = 59.
[0065] Preferably, the value range of the encryption key e is 1 < e < (p - 1) * (q - 1), and e is relatively prime to (p - 1) * (q - 1); the RSA algorithm also includes a public key parameter n1 and a private key parameter n2, and n1 = n2; the encryption formula of the RSA algorithm is C ≡ M J mod n1, where J = a * e, M is the plaintext, and the decryption formula of the RSA algorithm is M ≡ C L mod n2, where L = a * k, C is the ciphertext, and the modulo operation mod represents taking the remainder of the value of n1 or n2, and both n1 and n2 are the products of the aforementioned p and q.
[0066] Preferably, the value of a is obtained by encrypting a character string preset by the user through the Hash algorithm.
[0067] As a preferred implementation manner of this embodiment, a factor variable a is introduced, so that the entire encryption and decryption method must know p, q, and a to be implemented. However, the value of a is the Hash value generated by encrypting a character string preset by the user through the Hash algorithm. Since a cannot be obtained through reverse operation, the entire encryption and decryption program cannot be cracked; if the attacker wants to crack it, he must first perform reverse operations on C ≡ M a*e mod(n) and M ≡ C a*k mod(n), but only the numerical information of a * e, a * k, and n1 can be obtained, and the information of a, k, and e cannot be obtained. By way of example and not limitation, there is a limit on a at this time, and the anti - cracking effect of a * e and a * k is that a number can be split into multiple factors. For example: a = 6 = 1 * 6 = 2 * 3.
[0068] In a preferred embodiment, assuming that the character string preset by the user is "Hello", the SHA-512 algorithm in the Hash algorithm is used to calculate the value of a: "5232181bc0d9888f5c9746e410b4740eb461706ba5dacfbc93587cecfc8d068bac7737e92870d6745b11a25e9cd78b55f4ffc706f73cfcae5345f1b53fb8f6b5", and each bit in this Hash value is The numbers are added together to get the value of a, which is 555. For another example, the input character string is "apple", and the SHA-512 algorithm in the Hash algorithm is used to get the Hash value "844d8779103b94c18f4aa4cc0c3b4474058580a991fba85d3ca698a0bc9e52c5940feb7a65a3a290e17e6b23ee943ecc4f73e7490327245b4fe5d5efb590feb2", and its value of a is 538.
[0069] For other technical features, please refer to the previous embodiments and will not be described in detail here.
[0070] See also Figure 2 As shown, the present invention also provides an embodiment, which provides an encryption device 200 for user eye biometrics, and the device 200 includes a structure:
[0071] The information acquisition unit 201 is used to acquire the iris image or pupil image of the user when logging in, and determine the polar coordinate equation corresponding to the iris image or pupil image.
[0072] The information encryption unit 202 is used to encrypt the aforementioned iris image based on the polar coordinate equation to obtain encrypted iris data, or to encrypt the aforementioned pupil image based on the polar coordinate equation to obtain encrypted pupil data.
[0073] The information decryption unit 203 is used to decrypt the aforementioned encrypted iris data to obtain decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; or, to decrypt the aforementioned encrypted pupil data to obtain decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account.
[0074] In addition, see Figure 3 As shown, the present invention also provides an embodiment, which provides an encryption system 300 for user eye biometrics, and the system 300 includes an image processing module 301 and a system server 302.
[0075] The image acquisition module 301 is used to acquire the iris image or pupil image of the user when logging in, and determine the polar coordinate equation corresponding to the iris image or pupil image.
[0076] The system server 302 is configured to: encrypt the aforementioned iris image based on the polar coordinate equation, and after obtaining the encrypted iris data, decrypt the aforementioned encrypted iris data to obtain the decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; or, encrypt the aforementioned pupil image based on the polar coordinate equation, and after obtaining the encrypted pupil data, decrypt the aforementioned encrypted pupil data to obtain the decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account.
[0077] For other technical features, please refer to the previous embodiments and will not be repeated here.
[0078] In addition, an embodiment of the present invention also provides a computer-readable storage medium on which a program is stored, which is used in the aforementioned device for encrypting user eye biometrics. When the program is executed by a processor, it can implement the steps of any of the aforementioned methods for encrypting user eye biometrics.
[0079] For other technical features, please refer to the previous embodiments and will not be repeated here.
[0080] In the above description, within the scope of the target protection of the present disclosure, the components can be selectively and operatively combined in any number. In addition, terms such as "including", "comprising" and "having" should be interpreted as inclusive or open by default, rather than exclusive or closed, unless they are explicitly defined to the contrary. All technical, scientific or other terms have the meaning understood by those skilled in the art unless they are defined to the contrary. Common terms found in dictionaries should not be interpreted too idealistically or too impractically in the context of relevant technical documents, unless the present disclosure explicitly defines them as such.
[0081] Although the exemplary aspects of the present disclosure have been described for illustrative purposes, those skilled in the art should appreciate that the above description is only a description of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. The scope of the preferred embodiments of the present invention includes other implementations in which functions may not be performed in the order in which they appear or are discussed. Any changes or modifications made by those skilled in the art based on the above disclosure are within the scope of the claims.
Claims
1. A method for encrypting user eye biometrics, characterized in that: Includes steps: Obtain the iris image or pupil image of the user when logging in, and determine the polar coordinate equation corresponding to the iris image or pupil image; the polar coordinate equation is ρ 1= b 1 (1- f 1 2 ) / (1- f 1cos θ 1), wherein the f 1 is the eccentricity, f 1= c 1 / b1, b 1 is the major axis of the ellipse, c 1 is the focal length, θ 1 is the angle, 0≤ θ 1≤2π; The iris image is encrypted based on the polar coordinate equation to obtain encrypted iris data, and then the encrypted iris data is decrypted to obtain decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; or, the pupil image is encrypted based on the polar coordinate equation to obtain encrypted pupil data, and then the encrypted pupil data is decrypted to obtain decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account; wherein, The RSA algorithm is used for both encryption and decryption, so that the decryption key k in the aforementioned RSA algorithm satisfies both e*k≡1mod[(p-1)*(q-1)] and (a*e)*(a*k)≡1mod[(p-1)*(q-1)], wherein e is the encryption key, p and q are both prime numbers, a is the factor variable in the aforementioned RSA algorithm, the modular operation mod represents the remainder, and mod[(p-1)*(q-1)] represents the remainder of the value of (p-1)*(q-1); wherein, The selection of p and q comprises the steps of: Retrieve the digital password set by the user, split the digital password, select any one group of split digital passwords and set it as M1, and obtain the area information S1 of the iris image and the factor variable a in the RSA algorithm; multiply the aforementioned M1, S1 and a to obtain the value D1, obtain all the factor pairs of the aforementioned D1, and use the largest factor as p; select another group of split digital passwords and set it as M2; multiply the aforementioned M2, S1 and a to obtain the value D3, obtain all the factor pairs of the aforementioned D3, and use the largest factor as q; Alternatively, retrieve the digital password set by the user, split the digital password, select any one of the split digital passwords and set it as M1, and obtain the area information S2 of the pupil image and the factor variable a in the RSA algorithm; multiply the aforementioned M1, S2 and a to obtain the value D2, obtain all the factor pairs of the aforementioned D2, and use the largest factor as p; select another group of split digital passwords and set it as M2; multiply the aforementioned M2, S2 and a to obtain the value D4, obtain all the factor pairs of the aforementioned D4, and use the largest factor as q; The value range of the encryption key e is 1 < e < (p - 1) * (q - 1), and e is relatively prime to (p - 1) * (q - 1); the RSA algorithm also includes a public key parameter n1 and a private key parameter n2, and n1 = n2; the encryption formula of the RSA algorithm is C ≡ M J mod n 1, where J = a * e, M is the plaintext, and the decryption formula of the RSA algorithm is M ≡ C L mod n 2, where L = a * k , C is the ciphertext, and the modulo operation mod means taking the remainder of the value of n1 or n2, and both n1 and n2 are the products of the aforementioned p and q.
2. The method according to claim 1, characterized in that The encrypted iris data includes the aforementioned iris image and the corresponding encrypted iris information; the encrypted pupil data includes the aforementioned pupil image and the corresponding encrypted pupil information; The decrypted iris data includes the aforementioned iris image and the corresponding decrypted iris information; The decrypted pupil data includes the aforementioned pupil image and corresponding decrypted pupil information.
3. The method according to claim 1, characterized in that The acquired iris image or pupil image is subjected to image processing; the image processing includes at least one of image positioning, image normalization and image enhancement; after the image processing, the iris image or pupil image is cropped to obtain a square picture inscribed with the iris image or pupil image.
4. The method according to claim 1, characterized in that: The value of a is obtained by encrypting a character string preset by a user using a hash algorithm.
5. A device for encrypting user's eye biometrics, comprising the method according to any one of claims 1 to 4, characterized in that: Includes structure: An information acquisition unit, used to acquire an iris image or a pupil image of a user when logging in, and determine a polar coordinate equation corresponding to the iris image or the pupil image; An information encryption unit, used to encrypt the iris image based on the polar coordinate equation to obtain encrypted iris data, or to encrypt the pupil image based on the polar coordinate equation to obtain encrypted pupil data; An information decryption unit, used to decrypt the aforementioned encrypted iris data to obtain decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; Alternatively, the aforementioned encrypted pupil data is decrypted to obtain decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account.
6. A user eye biometric encryption system, comprising the method according to any one of claims 1 to 4, characterized in that: Including image processing module and system server: An image acquisition module, used to acquire an iris image or a pupil image of a user when the user logs in, and determine a polar coordinate equation corresponding to the iris image or the pupil image; The system server is configured to: encrypt the aforementioned iris image based on the polar coordinate equation to obtain encrypted iris data, and then decrypt the aforementioned encrypted iris data to obtain decrypted iris data, so that the iris image in the decrypted iris data matches the iris image preset in the user account; Alternatively, the pupil image is encrypted based on the polar coordinate equation to obtain encrypted pupil data, and then the encrypted pupil data is decrypted to obtain decrypted pupil data, so that the pupil image in the decrypted pupil data matches the pupil image preset in the user account.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Data encryption and decryption methods, devices and electronic equipment
CN107248972A
Method and system for generating RSA secret key and cooperating with RSA signature and decryption
CN112769539A
An encryption / decryption method
WO2009100679A1
