Commit Graph

15 Commits

Author SHA1 Message Date
a050b8853a
ENC: rm redundant code 2014-05-29 00:20:16 +02:00
72d13839ee
ENC: improve error handling 2014-05-28 20:57:22 +02:00
2a6ad998ce
ENC: cleanup 2014-05-28 19:54:51 +02:00
ecdfbad591
ENC: style fix 2014-05-28 19:44:49 +02:00
f0eefe7885
ENC: fix encryption
In some very rare cases such as the polynom
  1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1
the encryption->decryption cycle caused an incorrect result.
This wasn't reproducible for all polynomials, just for some.

Implementing the algorithm manually instead of using
the shortcut through
  fmpz_poly_add(out, out, tmp_poly_msg);
  fmpz_poly_mod_unsigned(out, ctx->q);
seems to have solved the issue.

Still unknown what happened there.
2014-05-28 19:44:40 +02:00
2ec61bc87e
ALL: improve readability 2014-05-28 01:17:19 +02:00
9f6b7319bb
ASCII->POLY: refactor
Use base64 (via glib) instead of plain char cast.

Remove ascii_to_poly() since it's unreliable (we don't
really know how many polynomials we will need
for a string).
2014-05-28 01:09:52 +02:00
e0b75b98e2
ASCII->POLY: refactor and make more modular
Introduced appropriate function for single polynomials
as well.
2014-05-27 01:08:17 +02:00
4dbfe1e663
FILE: add file subsystem and move string to ntru_string subs. 2014-05-26 21:30:42 +02:00
7a5b899825
ENC/DEC: allow encryption/decryption of strings 2014-05-26 20:59:12 +02:00
e4c5094af9
ALL: improve readability 2014-05-25 23:04:22 +02:00
13b54fa7f5
DOC: add brief/file comments 2014-05-25 02:15:24 +02:00
eb8fa515b4
DOC: fix more doxygen comments 2014-05-25 01:13:34 +02:00
8fd5a6c829
ENC: fix encryption 2014-05-25 00:58:34 +02:00
c075f4a0a3
ALL: Convert codebase to flint
POLY, ENC, DEC all converted. RAND will have to be revised.
2014-05-24 23:16:25 +02:00