Image block encryption method based on elliptic curve
By using an image block encryption method based on elliptic curves and hash functions, the problems of low encryption efficiency and weak security in existing technologies are solved, achieving a highly efficient and secure image encryption effect, suitable for network transmission and storage of images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-01
- Publication Date
- 2026-03-31
Smart Images

Figure CN121770748A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image encryption, and more specifically to an image block encryption method based on elliptic curves. Background Technology
[0002] In recent years, the security of networks and information systems has gradually attracted people's attention. Images, with their intuitive, vivid, graphic, and information-rich characteristics, have become an important information carrier in people's work and life, and are widely used in fields such as communications, military, and medicine. However, due to the openness of the Internet, information is easily intercepted or leaked during network transmission, making the research of efficient and secure image encryption methods of great significance.
[0003] With the dramatic increase in image data volume and the improvement of computer performance and hacker attack capabilities, various image encryption methods have been proposed. However, current image encryption methods often suffer from weak robustness, low encryption efficiency, or weak security, making them unsatisfactory. To improve the security of image encryption methods and ensure the secure transmission of digital images, an image block encryption method based on elliptic curves is designed using elliptic curves and hash functions. Summary of the Invention
[0004] The purpose of this invention is to address the problems of low encryption efficiency and weak security in current image encryption methods by proposing an image group encryption method based on elliptic curves.
[0005] The technical solution of this invention: To achieve the above-mentioned objective, an image group encryption method based on elliptic curves is designed, the steps of which are detailed below: Step 1: Randomly select an elliptic curve: based on a finite field F p = {0, 1, ... , p The equation of the elliptic curve on {-1} is: y 2 ≡ ( x 3 + ax + b ) mod p , (1) in, p For prime numbers greater than 3, the coefficient is... a , b Satisfy 4 a 3 +27 b 2 ≠0 mod p All solutions to formula (1) x , y )∈ Fp × F p Along with the point at infinity O Together constitute F p The point group of an upper elliptic curve is denoted as E p ( a , b Random selection a , b and p The value of is used to determine the equation of the elliptic curve; Step 2: Randomly select a base point: E p ( a , b Randomly select points on ) N ( x 1, y 1) As a base point, its period is T ; Step 3: Image pixel grouping: Let the original image be a single image of size [size missing]. m × n grayscale image I, According to the pixel order from top to bottom and from left to right, I Convert into a length of mn vector V According to group length d Bit, will V Decomposed into a grouped dataset G ={ g i}, i =1, 2, ... , r , g i For a length of d Bit-block data; if g r Insufficient length d When dealing with bits, the length requirement can be met by padding with zeros at the end; Step 4: Randomly select the dot product coefficient sequence: in the interval [0, ... T Randomly select from [−1] r A sequence of integers forming a dot product coefficient sequence K ={ k i}, i =1, 2, ... , r ; Step 5: Calculate the point sequence: using K Using formula (2), calculate the point sequence. Q ={q i}, q i = k i *N , i =1, 2, ... , r , (2) in, * For the dot product operation of elliptic curves, that is... k i base points N When adding, the specific rules for dot product are as follows: k i *N = N ⊕ N ⊕...⊕ N ; (3) Where ⊕ represents the point addition operation on the elliptic curve, let W ( x 2, y 2)= N ⊕ N, The specific rules for dot addition are as follows: x 2=( λ 2 -2 x 1) mod p , (4) y 2=[ λ (x1- x 2)- y 1] mod p , (5) in, λ =(3 x 1 2 + a ) / 2 y 1; Step 6: Dotted Sequence Hash Operation: Using SHA- d Hash function d Group length , right q i ∈ Q Perform hash operations. i =1, 2, ... , r The hash value sequence can be obtained. H ={ h i}, h i=SHA- d ( q i ), i =1, 2, ... , r , (6) Among them, SHA- d (●) represents a hash function; Step 7: Image group encryption: using H And formula (7), for G By performing block encryption, an encrypted block dataset can be obtained. P ={ p i}, p i =XOR( h i , g i ), i =1, 2, ... , r , (7) Where XOR(●) is the XOR operation function; Step 8: Generate an encrypted image: Following the order of elements from left to right, ... P Convert to a size of m × n matrix U This refers to an encrypted image.
[0006] Beneficial effects: This invention addresses the problems of low encryption efficiency and weak security in current image encryption methods by proposing an image block encryption method based on elliptic curves. The main contributions are: (1) a random number generation method is designed using elliptic curves and hash functions; (2) an image block encryption method based on elliptic curves is proposed using the designed random number generation method; (3) experimental results and method analysis show that the new method has good encryption effect, strong security and high efficiency, and can realize the network transmission and storage security of image content. Attached Figure Description
[0007] Figure 1 Flowchart of image group encryption based on elliptic curves; Figure 2 Original image; Figure 3 Encrypted image. Implementation
[0008] The implementation process of the present invention will be further described in detail below with reference to specific accompanying drawings and examples.
[0009] Figure 1This is a flowchart of an image grouping encryption method based on elliptic curves.
[0010] The programming software used is Matlab R2024a. Figure 2 The 512×512 Pepper grayscale image shown is used as the experimental subject.
[0011] The image group encryption method based on elliptic curves is described in detail below: Step 1: Select the elliptic curve: Select p =6277101735386680763835789423207666416083908700390324961279, a =-3, b =2455155546008943817740293915197451784769108058161191238065, determine the equation of the elliptic curve; Step 2: Select the base point: Let x 1=602046282375688656758213480587526111916698976636884684818, y 1 = 174050332293622031404857552280219410364023488927386650641, select point N ( x 1, y 1) As a base point, its period is T =6277101735386680763835789423176059013767194773182842284081; Step 3: Image pixel grouping: Let the original image be a 512×512 Pepper grayscale image. I, According to the pixel order from top to bottom and from left to right, I Transform it into a vector of length 262144. V According to group length d =512 bits, V Decomposed into a grouped dataset G ={ g i}, i =1, 2, ... , 4096 g i This is a data block of 512 bits in length; Step 4: Select the dot product coefficient sequence: in the interval [0, ...T From [−1], 4096 integers are randomly selected to form a sequence of dot product coefficients. K ={ k i}, i =1, 2, ... , 4096; Step 5: Calculate the point sequence: using K Using formula (2), calculate the point sequence. Q ={ q i}, i =1, 2, ... , 4096; Step 6: Dotted Sequence Hash Operation: Using the SHA-512 hash function, perform the following operations: q i ∈ Q Perform hash operations. i Given the hash values = 1, 2, ..., 4096, we can obtain the hash value sequence. H ={ h i}, i =1, 2, ... , 4096; Step 7: Image group encryption: using H And formula (7), for G By performing block encryption, an encrypted block dataset can be obtained. P ={ p i}, i =1, 2, ... , 4096; Step 8: Generate an encrypted image: Following the order of elements from left to right, ... P Transform into a matrix of size 512×512. U This refers to encrypted images, such as... Figure 3 As shown.
Claims
1. An image grouping encryption method based on elliptic curves, characterized in that, The encryption process includes the following steps: Step 1: Randomly select an elliptic curve: based on a finite field F p = {0, 1, ... , p The equation of the elliptic curve on {-1} is: y 2 ≡ ( x 3 + ax + b ) against p , (1) in, p For prime numbers greater than 3, the coefficient is... a , b Satisfy 4 a 3 +27 b 2 ≠0 mod p All solutions to formula (1) x , y )∈ F p × F p Along with the point at infinity O Together constitute F p The point group of an upper elliptic curve is denoted as E p ( a , b Random selection a , b and p The value of is used to determine the equation of the elliptic curve; Step 2: Randomly select a base point: E p ( a , b Randomly select points on ) N ( x 1, y 1) As a base point, its period is T ; Step 3: Image pixel grouping: Let the original image be a single image of size [size missing]. m × n grayscale image I, According to the pixel order from top to bottom and from left to right, I Convert into a length of mn vector V According to group length d Bit, will V Decomposed into a grouped dataset G ={ g i }, i =1, 2, ... , r , g i For a length of d Bit-block data; if g r Insufficient length d When dealing with bits, the length requirement can be met by padding with zeros at the end; Step 4: Randomly select the dot product coefficient sequence: in the interval [0, ... T Randomly select from [−1] r A sequence of integers forms a dot product coefficient sequence. K ={ k i }, i =1, 2, ... , r ; Step 5: Calculate the point sequence: using K Using formula (2), calculate the point sequence. Q ={ q i }, q i = k i *N , i =1, 2, ... , r , (2) in, * For the dot product operation of elliptic curves, that is... k i base points N The specific rules for addition and dot product are as follows: k i *N = N ⊕ N ⊕...⊕ N ; (3) Where ⊕ represents the point addition operation on the elliptic curve, let W ( x 2, y 2)= N ⊕ N, The specific rules for dot addition are as follows: x 2=( λ 2 -2 x 1) against p , (4) y 2=[ λ (x1- x 2)- y 1] against p , (5) in, λ =(3 x 1 2 + a ) / 2 y 1; Step 6: Dotted Sequence Hash Operation: Using SHA- d Hash function d Group length , right q i ∈ Q Perform hash operations. i =1, 2, ... , r The hash value sequence can be obtained. H ={ h i }, h i =SHA- d ( q i ), i =1, 2, ... , r , (6) Among them, SHA- d (●) represents a hash function; Step 7: Image group encryption: using H And formula (7), for G By performing block encryption, an encrypted block dataset can be obtained. P ={ p i }, p i =FREE( h i , g i ), i =1, 2, ... , r (7) Where XOR(●) is the XOR operation function; Step 8: Generate an encrypted image: Following the order of elements from left to right, ... P Convert to a size of m × n matrix U This refers to an encrypted image.