Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a Merkle-Hellman cryptosystem, plaintext message units are of length $3$ over the alphabet

$$ \begin{array}{cccc} &A&B&C&D&E&F&G&H&I&J&K&L&M&N&O \\ &0 &1 &2 &3 &4 &5 &6 &7 &8&9&10&11&12&13&14\\ \end{array} $$ $$ \begin{array}{cccc} &P&Q&R&S&T&U&V&W&X&Y&Z&\fbox{}&?&!&.&'&$&\\ &15&16&17&18&19&20&21&22&23&24&25&26&27&28&29&30&31\\ \end{array} $$

The following sequence of ciphertext message units is received.

$$ \begin{array}{cccc} &152472, 116116, 68546, 165420, 168261 \end{array} $$

The public key is

$$ \begin{array}{cccc} &24038, 29756, 34172,34286,38334,1824,18255,19723,143,17146\\ &35366, 11204, 32395, 12958, 6479 \end{array} $$

and the secret key is $b=30966$, $m=47107$. Decrypt the message.

Myself and a classmate are struggling to do this exam question so we would really appreciate some help! :) Step-by-step if possible as we don't have any similar examples in our class notes. Thanks in advance.

share|cite|improve this question
Are you asking for someone to write up an exam question? Does your instructor allow this? Also, the typical parameters use $q$ and $r$ for what you call $b$ and $m$, so I cannot tell them apart. Can you add the equations for encryption and decryption to be sure? Regards – Amzoti May 2 '13 at 3:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.