Sampling method for high-precision variance distribution of lattice-based password

By combining the central binomial distribution and random uniform distribution, the sampling of high-precision variance distribution is generated, and the shortcomings of the existing grid-based cryptographic algorithm in terms of variance accuracy and physical attacks are solved, and a wider parameter design and efficient physical attack resistance are achieved. .

WO2024234523A1PCT designated stage expired Publication Date: 2024-11-21NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/120916
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-12
Filing Date
2023-09-25
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

The existing grid-based cryptographic algorithms are difficult to achieve efficient generation, broad variance freedom and resistance to physical attacks at the same time. In particular, the variance accuracy selection of the central binomial distribution is limited, and the high-precision variance folding distribution is susceptible to physical attacks.

Method used

By combining the central binomial distribution and random uniform distribution, sampling units are generated and sampling of high-precision variance distributions is achieved by specifying expansion coefficients or unbiased sampling, allowing for a trade-off between sampling time and variance accuracy, expanding the range of parameter design and enhancing Resistance to physical attacks.

Benefits of technology

The sampling of high-precision variance distribution is realized, the scope of grid-based cryptographic parameter design is expanded, the resistance to physical attacks is improved, and efficient spatial and temporal performance is maintained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023120916_21112024_PF_FP_ABST
    Figure CN2023120916_21112024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention provides a sampling method for high-precision variance distribution of a lattice-based password. The sampling method implements sampling of high-precision variance distribution by generating a sampling unit, a selection unit or an expansion coefficient and the like. The present invention can provide a variance meeting high precision requirements, keep a constant sampling time, expand the parameter design range of a lattice-based password, and resist corresponding physical attacks. The present invention has the following advantages: 1, output sampling distribution in the present invention can meet the required variance precision, so that a wider range and degree of freedom are provided for parameter selection of a lattice-based password; 2, the implementation mode of the present invention can take central binomial distribution as a basic module, and the space efficiency and the time efficiency of sampling implementation are relatively high; 3, the present invention can implement sampling in constant time after the variance is fixed, and can well resist physical attacks; and 4, the present invention allows trade-off strategy selection to be performed between the sampling variance precision and the sampling time of the lattice-based password.
Need to check novelty before this filing date? Find Prior Art

Description

A sampling method for high-precision variance distribution of lattice-based ciphers Technical Field

[0001] The present invention relates to the technical field of lattice-based cryptography, and in particular to a sampling method for high-precision variance distribution of lattice-based cryptography. Background Art

[0002] Quantum computing is a strategic high ground for future information technology and has already posed a fatal threat to traditional public key cryptography, such as RSA, DSA, and ECC. Research on post-quantum cryptography is underway in both domestic and international cryptography circles. The U.S. National Institute of Standards and Technology (NIST) has officially launched a call for standards for post-quantum cryptography algorithms and has completed the selection of four standard algorithms. [1] In post-quantum cryptography, Lattice cryptography occupies a dominant position due to its theoretically provable security and comprehensive performance advantages in space and time resources. Three of the four standard algorithms selected by NIST belong to Lattice cryptography. [1] .

[0003] In the existing grid code [2][3] In cryptography, generating a suitable probability distribution as a secret private key or error vector is a very important basic operation and is widely used in most influential lattice cryptographic algorithms. [4] Newhope [5] 、CRYSTALS-Kyber [6] 、Saber [7] Algorithms such as the central binomial distribution are widely used, FrodoKEM [8] Using an approximate folded Gaussian distribution, SCloud [9] The convolution of a centered binomial distribution and a uniform distribution is used. The centered binomial distribution offers high generation efficiency, while the folded Gaussian distribution provides a distribution with a more continuous standard deviation. However, finding a sampling method that simultaneously meets the requirements of high generation efficiency, wide variance freedom, and resistance to physical attacks is not easy. For example, the centered binomial distribution used in existing lattice-based cryptographic algorithms limits the accuracy of the distribution variance, while the folded Gaussian distribution, which can achieve high variance accuracy, is susceptible to physical attacks.

[0004] References:

[0005] [1]NIST: Post-quantum cryptography pqc, selected algorithms 2022.

[0006] [2]O.Regev.On lattices,learning with errors,random linear codes,and cryptography.Journal of the ACM,56(6):34,2009.Preliminary version in STOC 2005。

[0007] [3]Lindner,R.,Peikert,C.:Better key sizes(and attacks)for lwe-based encryption.In:Kiayias,A.(ed.)Topics in Cryptology–CT-RSA 2011.pp.319–339.Springer Berlin Heidelberg,Berlin,Heidelberg(2011)。

[0008] [4]NIST:Nist,post-quantum cryptography pqc round 3submissions。

[0009] [5]Alkim,E.,Ducas,L., T.,Schwabe,P.:Post-quantum key Exchange—A new hope.In:25th USENIX Security Symposium(USENIX Security 16).pp.327–343.USENIX Association,Austin,TX(Aug 2016)。

[0010] [6]Schwabe et al.,P.:Github-pq-crystals / kyber。

[0011] [7]D’Anvers et al.,J.P.:Saber mlwr-based kem。

[0012] [8]Alkim et al.,E.:Frodokem,practical quantum-secure key encapsulation from generic lattices。

[0013] [9] Z. Zheng, A. Wang, H. Fan, C. Zhao, C. Liu, X. Zhang, Scloud: Public key encryption and key encapsulation mechanism based on learning with errors, Cryptology ePrint Archive, Paper 2020 / 095.

[0014] Summary of the Invention

[0015] The present invention aims to provide a high-precision variance distribution sampling method for lattice-based ciphers, which can provide variances required for high precision and maintain a constant sampling time, expand the parameter design range of lattice-based ciphers and resist corresponding physical attacks.

[0016] The present invention provides a sampling method for high-precision variance distribution of a lattice-based cipher, comprising step A, which includes the following sub-steps:

[0017] Step A1: Generate sampling unit t through central binomial distribution i ;

[0018] Step A2: Generate selection unit a through random uniform distribution i ;

[0019] Step A3: Select unit a i The value of the output sample Or sampling

[0020] The present invention also provides a sampling method for high-precision variance distribution of a lattice-based cipher, further comprising step B, which includes the following sub-steps:

[0021] Step B1: Run steps A1 to A3 k times to obtain samples

[0022] Step B2: Sampling Sum and get the sample

[0023] Step B3: Output sample s B .

[0024] The present invention also provides a sampling method for high-precision variance distribution of a lattice-based cipher, comprising step C, which includes the following sub-steps:

[0025] Step C1: Generate sampling unit t through central binomial distribution i ;

[0026] Step C2: Specify the expansion coefficient c i ;

[0027] Step C3: Calculate and output samples

[0028] The present invention also provides a sampling method for high-precision variance distribution of a lattice-based cipher, further comprising step D, which includes the following sub-steps:

[0029] Step D1: Run steps C1 to C3 k times to obtain samples

[0030] Step D2: Sampling Sum and get the sample

[0031] Step D3: Output sample s D .

[0032] The present invention also provides a sampling method for high-precision variance distribution of a lattice-based cipher, comprising step E, which includes the following sub-steps:

[0033] Step E1: Generate small variance samples through step A Or generate small variance samples s through step B m =s B ;

[0034] Step E2: Generate large variance samples through step C Or generate large variance samples S through step D M =s D ;

[0035] Step E3: Calculate the sum s of small variance sampling and large variance sampling E =s m +S M , output s E ;

[0036] Step A includes the following sub-steps:

[0037] Step A1: Generate sampling unit t through central binomial distribution i ;

[0038] Step A2: Generate selection unit a through random uniform distribution i ;

[0039] Step A3: Select unit a i The value of the output sample Or sampling

[0040] Step B includes the following sub-steps:

[0041] Step B1: Run steps A1 to A3 k times to obtain samples

[0042] Step B2: Sampling Sum and get the sample

[0043] Step B3: Output sample s B ;

[0044] Step C includes the following sub-steps:

[0045] Step C1: Generate sampling unit t through central binomial distribution i ;

[0046] Step C2: Specify the expansion coefficient c i ;

[0047] Step C3: Calculate and output samples

[0048] Step D includes the following sub-steps:

[0049] Step D1: Run steps C1 to C3 k times to obtain samples

[0050] Step D2: Sampling Sum and get the sample

[0051] Step D3: Output sample s D .

[0052] The present invention also provides a sampling method for high-precision variance distribution of a lattice-based cipher, comprising step F, which includes the following sub-steps:

[0053] Step F1: Generate unbiased sample r:

[0054] Generate unbiased samples through step A or

[0055] Generate unbiased sampling r=s through step B B ,or

[0056] Generate unbiased samples through step C or

[0057] Generate unbiased sampling r=s through step D D ,or

[0058] Generate unbiased sampling r=s through step E E ;

[0059] Step F2: Specify the deviation m, calculate the sample R = r + m, and output the sample R;

[0060] Step A includes the following sub-steps:

[0061] Step A1: Generate sampling unit t through central binomial distribution i ;

[0062] Step A2: Generate selection unit a through random uniform distribution i ;

[0063] Step A3: Select unit a i The value of the output sample Or sampling

[0064] Step B includes the following sub-steps:

[0065] Step B1: Run steps A1 to A3 k times to obtain samples

[0066] Step B2: Sampling Sum and get the sample

[0067] Step B3: Output sample s B ;

[0068] Step C includes the following sub-steps:

[0069] Step C1: Generate sampling unit t through central binomial distribution i ;

[0070] Step C2: Specify the expansion coefficient c i ;

[0071] Step C3: Calculate and output samples

[0072] Step D includes the following sub-steps:

[0073] Step D1: Run steps C1 to C3 k times to obtain samples

[0074] Step D2: Sampling Sum and get the sample

[0075] Step D3: Output sample s D ;

[0076] Step E includes the following sub-steps:

[0077] Step E1: Generate small variance samples through step A Or generate small variance samples s through step B m =s B ;

[0078] Step E2: Generate large variance samples through step C Or generate large variance samples S through step D M =s D ;

[0079] Step E3: Calculate the sum s of small variance sampling and large variance sampling E =s m +S M , output s E .

[0080] The present invention also provides a sampling method for high-precision variance distribution of a lattice-based cipher, comprising the following steps:

[0081] Step 1: Input the mean m, variance σ of the distribution, and the accuracy requirement ∈ for generating the sampling variance;

[0082] Step 2: Determine the sampling unit and select the unit list;

[0083] Step 3: Sample each group of sampling units and selection units in the sampling unit and selection unit list, and output unit sampling s i ;

[0084] Step 4: Unit sampling i The sum is obtained to obtain the sampling data t;

[0085] Step 5: Add the sample data t to the mean m to obtain the sample s;

[0086] Step 6: Output sample s.

[0087] Furthermore, the method for determining the sampling unit and the selection unit list in step 2 specifically includes:

[0088] Where v represents a rational number that approximates the variance σ according to the specified accuracy requirement ∈, v1 is a positive integer, and v i (2≤i≤k) is 0 or 1, so that |v-σ|<∈; k represents the number of decimal places in the binary expansion of v plus 1;

[0089] List L = [(v i ,i-1):v i ≠0,1≤i≤k] is a list of sampling units and selection units, indicating that for 1≤i≤k, if v i ≠0, then (v i ,i-1) in vi is a sampling unit and i-1 is a selection unit.

[0090] Furthermore, step 3 includes the following sub-steps:

[0091] Step 3.1: Input a set of sampling units and selection units (v i ,i-1);

[0092] Step 3.2: From the variance v i Sampling the distribution of t / 2 i ;

[0093] Step 3.3: Select i-1 uniformly randomly distributed bits. If these i-1 bits form a specific i-1 constant, then the output unit sample s i =t i , otherwise the output unit samples s i =0.

[0094] Furthermore, step 3.2 includes the following sub-steps:

[0095] Step 3.2.1: Get the expression Among them, u j (1≤j≤l) are all positive integers;

[0096] Step 3.2.2: For each u j (1≤j≤l), select two uniformly randomly distributed bits a0, a1, and calculate the integer w j =a0-a1;

[0097] Step 3.2.3: Output sampling

[0098] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0099] 1. The sampling distribution output in the present invention can meet the required accuracy of variance, thereby giving the lattice cryptographic parameters a wider range and degrees of freedom;

[0100] 2. The implementation method of the present invention can use the central binomial distribution as the basic module, and the space efficiency and time efficiency of sampling are high;

[0101] 3. After fixing the variance, the present invention can achieve sampling in a constant time and can better resist physical attacks;

[0102] 4. The present invention allows the lattice-based cipher to select a compromise strategy between the accuracy of sampling variance and sampling time. BRIEF DESCRIPTION OF THE DRAWINGS

[0103] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings in the embodiments will be briefly introduced below. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0104] FIG1 is a flow chart of a sampling method for high-precision variance distribution of a lattice-based cipher in Example 1 of the present invention.

[0105] FIG2 is a flow chart of a sampling method for high-precision variance distribution of a lattice-based cipher in Example 2 of the present invention.

[0106] FIG3 is a flow chart of a sampling method for high-precision variance distribution of a lattice-based cipher in Example 3 of the present invention.

[0107] FIG4 is a flow chart of a sampling method for high-precision variance distribution of a lattice-based cipher in Example 4 of the present invention.

[0108] FIG5 is a flow chart of a sampling method for high-precision variance distribution of a lattice-based cipher in Example 5 of the present invention.

[0109] FIG6 is a flow chart of a sampling method for high-precision variance distribution of a lattice-based cipher in Example 6 of the present invention.

[0110] FIG7 is a flow chart of a sampling method for high-precision variance distribution of a lattice-based cipher in Example 7 of the present invention.

[0111] FIG8 is a flow chart of sampling according to the sampling unit and the selection unit in embodiment 7 of the present invention. DETAILED DESCRIPTION

[0112] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0113] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.

[0114] Example 1

[0115] As shown in FIG1 , this embodiment proposes a high-precision variance distribution sampling method for a lattice-based cipher, including step A. Step A includes the following sub-steps:

[0116] Step A1: Generate sampling unit t through central binomial distribution i ; Among them, the sampling unit t is generated i The method can be: select 2 uniformly randomly distributed bits x i ,y i , calculate the sampling unit t i =x i -y i .

[0117] Step A2: Generate selection unit a through random uniform distribution i ; Among them, generate generation selection unit a i The method can be: by selecting the number of bits l that are randomly distributed i Composition selection unit a i .

[0118] Step A3: Select unit a i The value of the output sample Or sampling For example: When selecting unit a i If it is a specified number or belongs to some specified numbers, the output sample Otherwise, output sampling

[0119] Example 2

[0120] As shown in FIG2 , based on Example 1, this embodiment proposes a high-precision variance distribution sampling method for a lattice-based cipher, including step B. Step B includes the following sub-steps:

[0121] Step B1: Run steps A1 to A3 k times to obtain samples Among them, running steps A1, A2, and A3 allows each selection unit a i The number of bits l i different.

[0122] Step B2: Sampling Sum and get the sample

[0123] Step B3: Output sample s B .

[0124] It should be noted that the number of bits used in step A2 is l i Allowing zero, that is, the selection unit step does not require a random number and corresponds to step A3 constant output

[0125] Example 3

[0126] As shown in FIG3 , this embodiment proposes a high-precision variance distribution sampling method for a lattice-based cipher, including step C. Step C includes the following sub-steps:

[0127] Step C1: Generate sampling unit t through central binomial distribution i ; Among them, the sampling unit t is generated i The method can be: select 2 uniformly randomly distributed bits x i ,y i , calculate the sampling unit t i =x i -y i .

[0128] Step C2: Specify the expansion coefficient c i ;

[0129] Step C3: Calculate and output samples

[0130] Example 4

[0131] As shown in FIG4 , based on Example 3, this embodiment proposes a high-precision variance distribution sampling method for a lattice-based cipher, including step D. Step D includes the following sub-steps:

[0132] Step D1: Run steps C1 to C3 k times to obtain samples Among them, running steps C1, C2, and C3 allows the expansion coefficient c to be i different.

[0133] Step D2: Sampling Sum and get the sample

[0134] Step D3: Output sample s D .

[0135] Example 5

[0136] As shown in FIG5 , based on Examples 1 to 4, this embodiment proposes a high-precision variance distribution sampling method for a lattice-based cipher, including step E. Step E includes the following sub-steps:

[0137] Step E1: Generate small variance samples through step A Or generate small variance samples s through step B m =s B ;

[0138] Step E2: Generate large variance samples through step C Or generate large variance samples S through step D M =s D ;

[0139] Step E3: Calculate the sum s of small variance sampling and large variance sampling E =s m +S M , output s E .

[0140] Among them, step A, step B, step C, and step D refer to embodiment 1 to embodiment 4, and are not repeated here. It should be noted that the number of bits used in step A2 is l i Allowing zero, that is, the selection unit step does not require a random number and corresponds to step A3 constant output

[0141] Example 6

[0142] As shown in FIG6 , based on Examples 1 to 5, this embodiment proposes a high-precision variance distribution sampling method for a lattice-based cipher, including step F. Step F includes the following sub-steps:

[0143] Step F1: Generate unbiased sample r:

[0144] Generate unbiased samples through step A or

[0145] Generate unbiased sampling r=s through step B B ,or

[0146] Generate unbiased samples through step C or

[0147] Generate unbiased sampling r=s through step D D ,or

[0148] Generate unbiased sampling r=s through step E E ;

[0149] Step F2: Specify the deviation r, calculate the sample R=r+m, and output the sample R.

[0150] Among them, step A, step B, step C, step D, and step E refer to embodiment 1 to embodiment 5, and are not repeated here. It should be noted that the number of bits used in step A2 is l i Allowing zero, that is, the selection unit step does not require a random number and corresponds to step A3 constant output

[0151] Example 7

[0152] As shown in FIG7 , this embodiment proposes a high-precision variance distribution sampling method for a lattice-based cipher, comprising the following steps:

[0153] Step 1: Input the mean m, variance σ of the distribution, and the accuracy requirement ∈ for generating the sampling variance;

[0154] Step 2: Determine the sampling unit and select the unit list, specifically:

[0155] Where v represents a rational number that approximates the variance σ according to the specified accuracy requirement ∈, v1 is a positive integer, and v i (2≤i≤k) is 0 or 1, so that |v-σ|<∈; k represents the number of decimal places in the binary expansion of v plus 1;

[0156] List L = [(v i ,i-1):v i ≠0,1≤i≤k] is a list of sampling units and selection units; to be exact, for 1≤i≤k, if v i ≠0, then (v i ,i-1) in v i is a sampling unit, i-1 is a selection unit;

[0157] Step 3: Sample each group of sampling units and selection units in the sampling unit and selection unit list, and output unit sampling s i , as shown in FIG8 , specifically includes the following sub-steps:

[0158] Step 3.1: Input a set of sampling units and selection units (v i ,i-1);

[0159] Step 3.2: From the variance v i Sampling the distribution of t / 2 i ;

[0160] Step 3.3: Select i-1 uniformly randomly distributed bits. If these i-1 bits form a specific i-1 constant (e.g. 2 i-1 -1, that is, i-1 bits are all 1), then the output unit sample s i =t i , otherwise the output unit samples s i =0.

[0161] Step 3.2 may include the following sub-steps:

[0162] Step 3.2.1: Get the expression Among them, u j (1≤j≤l) are all positive integers;

[0163] Step 3.2.2: For each u j (1≤j≤l), select two uniformly randomly distributed bits a0, a1, and calculate the integer w j =a0-a1;

[0164] Step 3.2.3: Output sampling

[0165] As some preferred implementation schemes, step 3.2 may (partially) use parallel computing and may (partially) exchange the order, and the technical solution of the present invention is still applicable.

[0166] Step 4: Unit sampling i The sum is obtained by sampling data t, that is:

[0167] Step 5: Add the sample data t to the mean m to obtain the sample s, that is: s = t + m

[0168] Step 6: Output sample s.

[0169] Application examples:

[0170] Let χ be the probability distribution corresponding to the sampling of the high-precision variance distribution of the above-mentioned lattice-based cipher, and the following is a lattice-based encryption system using this distribution. The lattice-based encryption system is divided into three parts: key generation, encryption, and decryption.

[0171] The key generation phase consists of the following steps:

[0172] Step G1: Uniformly select the remaining class rings A matrix A of size k×l.

[0173] Step G2: According to the sampling method (or part of the steps) of the high-precision variance distribution of the lattice-based cipher, independently perform l samplings to obtain The upper l-dimensional vector s1.

[0174] Step G3: Perform k independent samplings according to the high-precision variance distribution sampling method for a lattice-based cipher described in any one of Examples 1 to 6 (or part of its steps) to obtain a k-dimensional vector e1.

[0175] Step G4: Calculate b=As1+e1, output public key pk=(A,e1), private key sk=s1.

[0176] Enter the plaintext pt and public key pk. The encryption phase includes the following steps:

[0177] Step H1: Perform k independent samplings according to the above-mentioned high-precision variance distribution sampling method for a lattice-based cipher (or part of its steps) to obtain a k-dimensional vector s2.

[0178] Step H2: According to the sampling method (or part of the steps) of the high-precision variance distribution of the lattice-based cipher, independently perform l samplings to obtain The upper l-dimensional vector e2.

[0179] Step H3: Sampling is performed according to the above-mentioned high-precision variance distribution sampling method of the lattice-based cipher (or part of its steps) to obtain e3.

[0180] Step H4: Calculate c1 = A T s2+e2,c2=b T s2 + e3 + Encode(pt), where Encode(pt) represents the encoding or placement of the plaintext. Output ciphertext ct = (c1, c2).

[0181] Input ciphertext ct and private key sk, the decryption phase includes the following steps:

[0182] Step L1: Calculate and output Decode(c2-s T c1), where Decode is the decoding or inversion mode corresponding to Encode.

[0183] The above-mentioned lattice encryption system is an application example of the present invention. Variants of the lattice encryption system and other cryptographic systems can still use the sampling method proposed by the present invention.

[0184] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A sampling method for high-precision variance distribution of lattice-based ciphers, characterized in that: The method comprises step A, wherein step A comprises the following sub-steps: Step A1: Generate sampling unit t through central binomial distribution i ; Step A2: Generate selection unit a through random uniform distribution i ; Step A3: Select unit a i The value of the output sample Or sampling 2. The sampling method for high-precision variance distribution of lattice cipher according to claim 1, characterized in that: The step B includes the following sub-steps: Step B1: Run steps A1 to A3 k times to obtain samples Step B2: Sampling Sum and get the sample Step B3: Output sample s B .

3. A sampling method for high-precision variance distribution of lattice-based ciphers, characterized in that: The method comprises step C, wherein step C comprises the following sub-steps: Step C1: Generate sampling unit t through central binomial distribution i ; Step C2: Specify the expansion coefficient c i ; Step C3: Calculate and output samples 4. The sampling method for high-precision variance distribution of lattice cipher according to claim 3, characterized in that: The step D also includes the following sub-steps: Step D1: Run steps C1 to C3 k times to obtain samples Step D2: Sampling Sum and get the sample Step D3: Output sample s D .

5. A sampling method for high-precision variance distribution of lattice-based ciphers, characterized in that: The method comprises step E, wherein step E comprises the following sub-steps: Step E1: Generate small variance samples through step A Or generate small variance samples s through step B m =s B ; Step E2: Generate large variance sampling through step C Or generate a large variance sample S through step D M =s D ; Step E3: Calculate the sum s of small variance sampling and large variance sampling E =s m +S M , output s E ; Step A includes the following sub-steps: Step A1: Generate sampling unit t through central binomial distribution i ; Step A2: Generate selection unit a through random uniform distribution i ; Step A3: Select unit a i The value of the output sample Or sampling Step B includes the following sub-steps: Step B1: Run steps A1 to A3 k times to obtain samples Step B2: Sampling Sum and get the sample Step B3: Output sample s B ; Step C includes the following sub-steps: Step C1: Generate sampling unit t through central binomial distribution i ; Step C2: Specify the expansion coefficient c i ; Step C3: Calculate and output samples Step D includes the following sub-steps: Step D1: Run steps C1 to C3 k times to obtain samples Step D2: Sampling Sum and get the sample Step D3: Output sample s D .

6. A sampling method for high-precision variance distribution of lattice-based ciphers, characterized in that: The method comprises step F, wherein step F comprises the following sub-steps: Step F1: Generate unbiased sample r: Generate unbiased sampling through step A or Generate unbiased sampling r=s through step B B ,or Generate unbiased samples through step C or Generate unbiased sampling r=s through step D D ,or Generate unbiased sampling r=s through step E E ; Step F2: specify the deviation m, calculate the sample R=r+m, and output the sample R; Step A includes the following sub-steps: Step A1: Generate sampling unit t through central binomial distribution i ; Step A2: Generate selection unit a through random uniform distribution i ; Step A3: Select unit a i The value of the output sample Or sampling Step B includes the following sub-steps: Step B1: Run steps A1 to A3 k times to obtain samples Step B2: Sampling Sum and get the sample Step B3: Output sample s B ; Step C includes the following sub-steps: Step C1: Generate sampling unit t through central binomial distribution i ; Step C2: Specify the expansion coefficient c i ; Step C3: Calculate and output samples Step D includes the following sub-steps: Step D1: Run steps C1 to C3 k times to obtain samples Step D2: Sampling Sum and get the sample Step D3: Output sample s D ; Step E includes the following sub-steps: Step E1: Generate small variance samples through step A Or generate small variance samples s through step B m =s B ; Step E2: Generate large variance sampling through step C Or generate a large variance sample S through step D M =s D ; Step E3: Calculate the sum s of small variance sampling and large variance sampling E =s m +S M , output s E .

7. A sampling method for high-precision variance distribution of lattice-based ciphers, characterized in that: The steps include: Step 1: Input the mean m, variance σ of the distribution, and the accuracy requirement ∈ for generating the sampling variance; Step 2: Determine the sampling unit and select the unit list; Step 3: Sample each group of sampling units and selection units in the sampling unit and selection unit list, and output unit sampling s i ; Step 4: Unit sampling i The sum is obtained to obtain the sampling data t; Step 5: Add the sample data t to the mean m to obtain the sample s; Step 6: Output sample s.

8. The high-precision variance distribution sampling method of the lattice cipher according to claim 7, characterized in that: The method for determining the sampling unit and the selection unit list in step 2 specifically includes: Where v represents a rational number that approximates the variance σ according to the specified accuracy requirement ∈, v1 is a positive integer, and v i (2≤i≤k) is 0 or 1, so that |v-σ|<∈; k represents the number of decimal places in the binary expansion of v plus 1; List L = [(v i ,i-1):v i ≠0,1≤i≤k] is a list of sampling units and selection units, indicating that for 1≤i≤k, if v i ≠0, then (v i ,i-1) in v i is a sampling unit and i-1 is a selection unit.

9. The high-precision variance distribution sampling method of the lattice cipher according to claim 8, characterized in that: Step 3 includes the following sub-steps: Step 3.1: Input a set of sampling units and selection units (v i ,i-1); Step 3.2: From the variance v i / 2 distribution sampling t i ; Step 3.3: Select i-1 uniformly randomly distributed bits. If these i-1 bits form a specific i-1 constant, then the output unit sample s i =t i , otherwise the output unit samples s i =0.

10. The high-precision variance distribution sampling method of the lattice cipher according to claim 9, characterized in that: Step 3.2 includes the following sub-steps: Step 3.2.1: Get the expression Among them, u j (1≤j≤l) are all positive integers; Step 3.2.2: For each u j (1≤j≤l), select 2 uniformly randomly distributed bits a0, a1, and calculate the integer w j =a0-a1; Step 3.2.3: Output sampling

Citation Information

Patent Citations

  • Error sampling method for lattice public key password

    CN109889321A

  • Method and processing device for performing lattice-based cryptographic operation

    CN110363030A

  • Sampling method for high-precision variance distribution of lattice-based password

    CN116582268A

  • Generating a lattice basis for lattice-based cryptography

    US10097351B1