This page uses content from Wikipedia and is licensed under CC BY-SA.

In cryptography, the **Niederreiter cryptosystem** is a variation of the McEliece cryptosystem developed in 1986 by Harald Niederreiter.^{[1]} It applies the same idea to the parity check matrix, **H**, of a linear code. Niederreiter is equivalent to McEliece from a security point of view. It uses a syndrome as ciphertext and the message is an error pattern. The encryption of Niederreiter is about ten times faster than the encryption of McEliece. Niederreiter can be used to construct a digital signature scheme.

A special case of Niederreiter's original proposal was broken^{[2]} but the system is secure when used with a Binary Goppa code.

- Alice selects a binary (
*n*,*k*)-linear Goppa code,*G*, capable of correcting*t*errors. This code possesses an efficient decoding algorithm. - Alice generates a (
*n*−*k*) ×*n*parity check matrix,*H*, for the code,*G*. - Alice selects a random (
*n*−*k*) × (*n*−*k*) binary non-singular matrix,*S*. - Alice selects a random
*n*×*n*permutation matrix,*P*. - Alice computes the (
*n*−*k*) ×*n*matrix,*H*^{pub}=*SHP*. - Alice’s public key is (
*H*^{pub},*t*); her private key is (*S*,*H*,*P*).

Suppose Bob wishes to send a message, *m*, to Alice whose public key is (*H*^{pub}, *t*):

- Bob encodes the message,
*m*, as a binary string e^{m'}of length*n*and weight at most*t*. - Bob computes the ciphertext as
*c*=*H*^{pub}*m*^{T}.

Upon receipt of *c* = *H*^{pub}*m*^{T} from Bob, Alice does the following to retrieve the message, *m*.

- Alice computes
*S*^{−1}*c*=*HPm*^{T}. - Alice applies a syndrome decoding algorithm for
*G*to recover*Pm*^{T}. - Alice computes the message,
*m*, via*m*^{T}=*P*^{−1}*Pm*^{T}.

Courtois, Finiasz and Sendrier showed how the Niederreiter cryptosystem can be used to derive a signature scheme
.^{[3]}

- Hash the document,
**d**, to be signed (with a public hash algorithm). - Decrypt this hash value as if it were an instance of ciphertext.
- Append the decrypted message to the document as a signature.

Verification then applies the public encryption function to the signature and checks whether or not this equals the hash value of the document. When using Niederreiter, or in fact any cryptosystem based on error correcting codes, the second step in the signature scheme almost always fails. This is because a random syndrome usually corresponds to an error pattern of weight greater than *t*. The system then specifies a deterministic way of tweaking **d** until one is found which can be decrypted.

The choice of the code parameters is related to the probability that a random syndrome is decodable. Courtois, Finiaz, and Sendrier suggest the parameter values *n* = 2^{16} and *t* = 9. Then the probability to decode a random syndrome is . Therefore, a decodable syndrome is found after an expected number of 9! attempts. Add a counter, *i*, to the original document **d**, to produce a slightly altered document, **d**_{i}. Hashing **d**_{i} gives a syndrome that depends on *i*. Let *i* run from 0 to *i*_{0}, with *i*_{0} the first value of *i* for which **d**_{i} is decodable. In this case the decrypted message is a word, *z*, of length *n* and weight 9, such that *Hz*^{T} equals the hash value of **d**_{i0}. The signature will be *z* combined with the value *i*_{0} for verification. This signature is attached to the original document, **d**.

- Henk C. A. van Tilborg. Fundamentals of Cryptology, 11.4.

**^**H. Niederreiter (1986). "Knapsack-type cryptosystems and algebraic coding theory".*Problems of Control and Information Theory. Problemy Upravlenija i Teorii Informacii*.**15**: 159–166.**^**V. M. Sidel'nikov & S. O. Shestakov (1992). "On the insecurity of cryptosystems based on generalized Reed-Solomon codes".*Discrete Mathematics and Applications*.**2**(4): 439–444. doi:10.1515/dma.1992.2.4.439.**^**N. Courtois; M. Finiaz; N. Sendrier (2001). "How to achieve a McEliece-based Digital Signature Scheme".*Advances in cryptology—ASIACRYPT 2001*. LNCS 2248: 157–174.

- Attacking and defending the McEliece cryptosystem Daniel J. Bernstein and Tanja Lange and Christiane Peters