Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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

How to make a message into a polynomial on NTRU encryption? for example how we can conver 'hello world' to polynomial... i have read the converting operation on IEEE Std 1363.1- 2008, but i can't understand the process without example, can anyone show for the small example?

share|improve this question

According to Wikipedia:

Alice, who wants to send a secret message to Bob, puts her message in the form of a polynomial m with coefficients {-1,0,1}. In modern applications of the encryption, the message polynomial can be translated in a binary or ternary representation.

So, lets say you have a message encoded in base 2 as 101101, you'd set the polynomial to $1+0x+1x^2+1x^3+0x^4+1x^5=1+x^2+x^3+x^5$. That then is your message to encrypt. Technically you could encode a message in ternary and do the same thing. Then you'd have coefficients in $\{-1,0,1\}$. There is no reduction in security by encoding in binary, however, and only having coefficients in $\{0,1\}$.

Now, moving that to your string. First encode your string in base 2 (you can do this how you want), then construct your polynomial. If you have more bits than the degree of the NTRU polynomial, you'll have to split up the message into blocks. I'm sure you know about the standard warnings with using public key encryption for large messages. Unless you have a really, really good reason you shouldn't do it. Encrypt a random key with the public key cipher and encrypt the plaintext with the random key.

share|improve this answer

To encrypt the message "hello world", using the ASCII conversion table ( you get the hexadecimal representation as 68 65 6C 6C 6F 77 6F 72 6C 64 and corresponding binary representation. Then convert to polynomial by adding powers of X

h 01101000 X^3+X^5+X^6
e 01100101 1+X^2+X^5+X^6
l 01101100 X^2+X^3+X^5+X^6
l 01101100 X^2+X^3+X^5+X^6
o 01101111 1+X+X^2+X^3+X^5+X^6
w 01110111 1+X+X^2+X^4+X^5+X^6
o 01101111 1+X+X^2+X^3+X^5+X^6
r 01110010 X+X^4+X^5+X^6
l 01101100 X^2+X^3+X^5+X^6
d 01100100 X^2+X^5+X^6

Then you can input this as your message in NTRU

share|improve this answer

Your Answer


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

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