cryptographybouncycastleencryption-asymmetrickey-generator

Defining McEliece parameter tuple (n, k, t) with BouncyCastle's tuple (m, t, poly)


I am using BouncyCastles Java API and want to use McEliece encryption. After browsing through various paper for finding good parameters (e.g. How to choose McEliece's parameters?) I am now having the problem, that I do not see a possibility to set these parameters with the BouncyCastle API.

In all papers, the parameter set is a 3-tuple: (n, k, t). But with BouncyCastle, I can only specify the 3-tuple (m, t, poly) for keypair generation with:

new McElieceCCA2Parameters(m, t, poly)

How do they correspond to the (n, k, t) parameter set?


Solution

  • I believe that m, t and poly define a Goppa code.m represents a degree of a polynomial over GF2 that generates support within the code. n represents number of elements in the support/length of encrypted message in bits. I had a quick look at McElieceParameters and they use full support. It means that n is always equal to 2^m. t, number of errors that the code can correct, must be chosen from interval [2; (n - 1)/m] and k is implicitly equal to n - m*t.