0
$\begingroup$

I've been implementing a cryptosystem outlined here, which relies on Mersenne Numbers, as part of my coursework in a Cryptography class.

In this cryptosystem, both encryption and decryption require the selection of an error-correcting code, denoted as $\mathcal{E}: \{0, 1\}^k \to \{0, 1\}^n$. Here, $k$ represents the length of the message, and $n$ corresponds to the prime used to derive the Mersenne prime for the cryptosystem. The authors, in section 8, provide two examples of such error-correcting codes: Reed-Muller Codes and Repetition Codes. My problem comes from the observation that both these example codes generate codewords whose lengths differ from $n$, since the Reed-Muller codes always encode into a codeword of length $2^m$, where $m$ is the number of variables used in the code, and the Repetition Code outputs a codeword of length $k \cdot p$, which is different from $n$ since $n$ is prime. Because of this, I do not know how to proceed with my implementation.

If anyone knows a workaround or approach I might be overlooking help would be very much appreciated.

Here you can take a look at what I have already implemented.

Thanks in advance.

$\endgroup$

1 Answer 1

1
$\begingroup$

If anyone for some reason comes across this problem, you just have to truncate the n-bit string that stems from the other operations to be the size of the encoded message k.

Apply the same reason to the decoding.

Also all of the operations are as they were defined in the introduction.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.