# US 2020/0028674 A1 · METHOD AND APPARATUS FOR ASYMMETRIC CRYPTOSYSTEM BASED ON QUASI-CYCLIC MODERATE DENSITY PARITY-CHECK CODES OVER GF(q)

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0028674 A1
- Document ID: US20200028674A1
- Status: Published application
- Kind: A1
- Application number: 16/117,602
- Filed: 2018-08-30
- Published: 2020-01-23
- Earliest claimed: 2017-11-21
- Assignees: Zenith Electronics Corporation
- Applicants: Zenith Electronics LLC
- Inventors: Kyle Xingkai Bao; Nejib Ammar
- Web page: https://patentgrep.com/patent/US20200028674A1

## CPC

- H03M 13/116: {Quasi-cyclic LDPC [QC-LDPC] codes, i.e. the parity-check matrix being composed of permutation or circulant sub-matrices}
- H04L 9/0825: {using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates}
- H03M 13/1148: {Structural properties of the code parity-check or generator matrix}
- H03M 13/1171: {Parity-check or generator matrices with non-binary elements, e.g. for non-binary LDPC codes}
- H03M 13/63: {Joint error correction and other techniques (H03M13/31 and H03M13/33 take precedence)}
- H03M 13/6516: {Support of multiple code parameters, e.g. generalized Reed-Solomon decoder for a variety of generator polynomials or Galois fields}
- H04L 9/0637: {Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]}
- H04L 9/304: {based on error correction codes, e.g. McEliece}
- H04L 9/3093: {involving Lattices or polynomial equations, e.g. NTRU scheme}
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Methods and apparatus for code-based asymmetric cryptosystem using Quasi-Cyclic Moderate-Density Parity-Check (QC-MDPC) error correcting codes. Specifically, the method and apparatus generalizes the framework of (QC-MDPC) Code-Based (CB) cryptography from the binary domain (Galois Field of two elements) to an arbitrary size of Galois Field and provides an apparatus for implementing the cryptosystem with a simplified computational complexity of key generation, encryption, and decryption components of the cryptosystems and reduced sizes of the public and private security keys.

## Claims

### Claim 1

A method of generating keys for encryption, comprising:
generating a random sparse row vector with elements from a Galois Field (GFq) and with a prescribed vector weight;
checking the sparse row vector for rightmost polynomials invertibility;
requesting a new sparse row vector with the same vector weight if the checking determines that the rightmost polynomials are not invertible;
storing the sparse row vector as a first row of a matrix, wherein the matrix is a private key for use in decrypting an encrypted message;
splitting the sparse row vector into a plurality of polynomials including a left polynomial and a plurality of rightmost polynomials;
inverting the rightmost polynomials to provide an inverted rightmost polynomials; and
circulant multiplying the left polynomials and the inverted rightmost polynomials to obtain a generator polynomial, wherein the generator polynomial is a public key for use in encrypting a message to be decrypted by the private key.

### Claim 2 (depends on 1)

A method as claimed in claim 1, further comprising:
receiving a message that has been encrypted using the public key; and
decrypting the encrypted message using the private key to obtain the message.

### Claim 3 (depends on 1)

A method as claimed in claim 1, wherein the generating, checking, requesting, storing, splitting, inverting and circulant multiplying are performed on a device that is configured for receiving an encrypted message that has been encrypted using the public key.

### Claim 4

A method for encrypting a message using a quasi-cyclic moderate density parity check code over a Galois field, comprising:
converting a message to be encrypted into plurality of message components;
transforming the message component of the message to obtain a transformed message component;
transforming a first component of a public key to obtain a first transformed generator component;
multiplying the transformed message component with the first transformed generator component to obtain a first multiplied output;
inverse transforming the first multiplied output to obtain a first codeword component;
transforming a second component of the public key to obtain a second transformed generator component;
multiplying the transformed message component with the second transformed generator component to obtain a second codeword component;
combining the first codeword component and the second codeword component to obtain a codeword; and
multiplying the codeword with an error signal to obtain an encrypted ciphertext.

### Claim 5 (depends on 4)

A method as claimed in claim 4, wherein the transforming steps are performed using number theory transform engines; and
wherein the inverse transforming steps are performed using inverse number theory transform engines.

### Claim 6

A method for encrypting a message using a quasi-cyclic moderate density parity check code over a Galois field, comprising:
mapping a component of a plaintext message into a Galois field using a complex mapper to obtain a mapped message component;
transforming the mapped message component using a fast Fourier transform module to obtain a transformed message component;
mapping a generator polynomial into a Galois field using a complex mapper to obtain a mapped generator component;
transforming the mapped generator component using a fast Fourier transform module to obtain a transformed generator component;
multiplying the transformed message component with the transformed generator component to obtain a mixed output;
inverse transforming the mixed output to obtain an inverse signal;
mapping the inverse signal into a complex to Galois field mapper to obtain a component of a codeword;
repeating the above elements for each component of the plaintext message;
combining the components of the codeword into a codeword; and
adding an error signal to the codeword to obtain an encrypted message.

### Claim 7 (depends on 6)

A method as claimed in claim 6, wherein the transforming of the mapped message includes transforming the mapped message component in a fast Fourier transform module having a size M equal to a prime number, the fast Fourier transform module of size M including a fast Fourier transform module of size N and an inverse fast Fourier transform module of size N, where N is larger than M, the output of the fast Fourier transform module of size N being mixed with a predetermined signal prior to being provided to the input of the inverse fast Fourier transform module of size N.

### Claim 8 (depends on 6)

A method as claimed in claim 6, wherein the inverse transforming of the mixed output includes inverse transforming using an inverse fast Fourier transform module of size M including a fast Fourier transform module of size N and an inverse fast Fourier transform module of size N, where N is larger than M, the output of the fast Fourier transform module of size N being mixed with a predetermined signal prior to being provided to the input of the inverse fast Fourier transform module of size N.

### Claim 9 (depends on 8)

A method as claimed in claim 8, further comprising:
Im scaling the mixed output provided to the inverse fast Fourier transform module of size M to obtain a scaled signal for input to the a fast Fourier transform module of size N; and
Im descaling an output of the inverse fast Fourier transform module of size N to obtain an output of the inverse fast Fourier transform module of size M.

### Claim 10

A method for decrypting a ciphertext that has been encrypted using a quasi-cyclic moderate density parity check code over a Galois field, comprising:
calculating a syndrome of the ciphertext using a parity check polynomial to obtain an initial syndrome;
scheduling a vote on an estimation for a checked ciphertext;
voting for an estimation of the checked ciphertext when scheduled to obtain an integer matrix;
multiplying the ciphertext by a weight value to obtain an integer vector;
deciding on a ciphertext symbol based on the integer matrix and the integer vector to obtain a flipped ciphertext;
updating the syndrome if needed based on the flipped ciphertext; and
outputting a deciphered plaintext if no updates are needed, otherwise voting on a next iteration of the syndrome of the ciphertext.

### Claim 11 (depends on 10)

A method as claimed in claim 10, further comprising:
checking for symbol changes in a predetermined number of iterations by detecting an error; and
changing a value of the weight value if an error is detected in a predetermined number of iterations.

### Claim 12

An apparatus for generating a private key and a public key, comprising:
a random sparse vector generator having an output;
a rightmost polynomials invertibility detector connected to the output of the random sparse vector generator and configured to determine if a lifting matrix of a rightmost polynomial of a vector received from the random sparse vector generator is singular, the rightmost polynomials invertibility detector being operable to request a new vector from the random sparse vector generator if a vector received from the random sparse vector generator is singular;
a sparse vector compressor connected to receive the output of the rightmost polynomials invertibility detector and configured to output the private key to a private key storage;
a polynomials splitter having an input connected to the output of the rightmost polynomials invertibility detector and having first and second outputs, the polynomials splitter having a first output and a second output;
a polynomials inverter connected to the second output of the polynomials splitter and having an inverted output; and
a multiplier connected to the first input of the polynomials splitter and to the inverted output of the polynomials inverter, the multiplier having an output on which the public key is output.

### Claim 13 (depends on 12)

An apparatus as claimed in claim 12, wherein the multiplier is a polynomials multiplier.

### Claim 14

An apparatus for encrypting a message, comprising:
a first number theory transform module having an input connected to receive a component of the message to be encoded and configured to perform a number theory transform on the component of the message;
a second number theory transform module having an input connected to receive a first component of a private key and configured to perform a number theory transform on the first component of the private key;
a first multiplier connected to an output of the first number theory transform module and to an output of the second number theory transform module and configured to mix the transformed message component and the transformed first private key component;
a first inverse number theory transform module having an input connected to the first multiplier and configured to inverse transform the mixed first transformed components;
a third number theory transform module having an input connected to receive a second component of the private key and configured to perform a number theory transform on the second component of the provide key;
a second multiplier connected to the first number theory transform module and to the third number theory transform module and configured to mix the transformed message component and the transformed second private key component;
a second inverse number theory transform module having an input connected to the second multiplier and configured to inverse transform the mixed second transformed components;
a combiner connected to the first and second inverse number theory transform modules and configured to combine the first and second inverse transformed components; and
a multiplier connected to an output of the combiner and configured to mix an error signal with the combiner output to provide an encrypted signal.

### Claim 15 (depends on 14)

An apparatus as claimed in claim 14, wherein the first and second private key components are generator polynomial components of length M.

### Claim 16

An apparatus for encrypting a message, comprising:
a first Galois field to complex mapper having an input configured to receive a plaintext component of the message and configured to map the plaintext component into a complex message signal;
a first fast Fourier transform module connected to receive the output of the first Galois field to complex mapper and configured to transform the complex message signal into frequency domain;
a second Galois field to complex mapper having an input configured to receive a generator polynomial of a private key and configured to map the generator polynomial into a complex key signal;
a second fast Fourier transform module connected to receive the output of the second Galois field to complex mapper and configured to transform the complex key signal into frequency domain;
a first multiplier connected to outputs of the first and second fast Fourier transform modules and configured to mix the frequency domain signals from the first and second fast Fourier transform modules;
an inverse fast Fourier transform module connected to receive the mixed signals from the first multiplier and configured to inverse transform the mixed signals;
a complex to Galois field mapper connected to map the inverse transformed mixed signals into a Galois field domain to obtain a parity symbol component of an encrypted code word; and
an adder connected to an output of the complex to Galois field mapper and configured to mix an error signal into parity symbol of the encrypted code word.

### Claim 17 (depends on 16)

An apparatus as claimed in claim 16, further comprising:
a combiner having a plurality of inputs, one of the plurality of inputs connected to an output of the complex to Galois field mapper, the combiner being operable to combine information received at the plurality of inputs, the combiner having an output connected to an input of the adder.

### Claim 18 (depends on 16)

An apparatus as claimed in claim 16, wherein the first fast Fourier transform module is of size M and includes a first fast Fourier transform module of size N, a first multiplier to mix a predetermined signal with the output of the first fast Fourier transform module of size N, and a first inverse fast Fourier transform module of size N, where N is larger than M; and
wherein the inverse fast Fourier transform module is of size M and includes an Im scaler connected to receive the output of the first multiplier, a second fast Fourier transform of size N connected to receive the output of the Im scaler, a second multiplier connected to mix a predetermined signal with the output of the second fast Fourier transform of size N, a second inverse fast Fourier transform module of size N connected to receive the output of the second multiplier, and an Im descalar connected to receive the output of the second inverse fast Fourier transform module of size N.

### Claim 19 (depends on 18)

An apparatus as claimed in claim 18, wherein the M is a prime number and N is a non-prime number that is larger than M.

### Claim 20

An apparatus for decoding an encrypted ciphertext, comprising:
a syndrome calculator configured to receive the encrypted ciphertext;
a parity check symbol voter connected to receive an output of the syndrome calculator;
a symbol flipper connected to an output of the parity check symbol voter;
a syndrome updater connected to an output of the symbol flipper to output a deciphered plaintext if no changes are made in the symbol in a predetermined number of iterations, otherwise if changes are made in the symbol then to implement another iteration; and
an error floor detector connected to an output of the symbol flipper to detect changes in a symbol in a predetermined number of iterations and to change a weight value if changes are made in the predetermined number of iterations.
