Commit Graph

385 Commits

Author SHA1 Message Date
hasufell 7f23aa2a35
ALL: fix memory leaks 2014-05-30 19:54:50 +02:00
hasufell 8871b496c2
KEYGEN: support import/export of keys 2014-05-30 19:23:45 +02:00
hasufell a42b65505a
KEYGEN: we need the pubkey unshifted 2014-05-30 19:11:57 +02:00
hasufell d6cbb73865
ASCII->POLY: fix binary support, rm obsolete logic, minor fixes 2014-05-30 18:54:51 +02:00
hasufell f7b3462dc6
POLY: consistent var naming 2014-05-30 18:42:09 +02:00
hasufell c125d48209
BUILD: update clean target 2014-05-30 18:40:42 +02:00
hasufell 82ae4a7a52
ASCII->POLY: rm redundant counter 2014-05-30 01:37:03 +02:00
hasufell 0f2f2aec06
ASCII->POLY: update doxygen comment 2014-05-29 22:16:50 +02:00
hasufell 27b20f97b7
ASCII->POLY: avoid trailing junk data 2014-05-29 22:11:05 +02:00
hasufell bdc3aad651
ENC: fix encryption
It was actually broken, since we did overwrite the
out-coefficients instead of adding to them. Fixing this
again causes the same problems as described in the
inline comment, no matter which implementation we use.
2014-05-29 16:46:35 +02:00
hasufell a050b8853a
ENC: rm redundant code 2014-05-29 00:20:16 +02:00
hasufell bb0207ba03
KEYGEN: improve error handling 2014-05-28 23:11:52 +02:00
hasufell 67ec5615c7
POLY: readability 2014-05-28 23:11:13 +02:00
hasufell 9039e47eb4
Fix README 2014-05-28 21:31:12 +02:00
hasufell 0a4270341c
Add README.md 2014-05-28 21:25:52 +02:00
hasufell 7759bff8f7
RAND: rm obsolete implementation 2014-05-28 21:19:57 +02:00
hasufell 6142381abb
BUILD: cleanup 2014-05-28 21:18:33 +02:00
hasufell 74bf318d29
Remove bundled FLINT 2014-05-28 21:18:11 +02:00
hasufell 4def114c5c
POLY: style/readability 2014-05-28 20:57:55 +02:00
hasufell 67a4557487
ASCII->POLY: also allow binary data 2014-05-28 20:57:40 +02:00
hasufell 72d13839ee
ENC: improve error handling 2014-05-28 20:57:22 +02:00
hasufell 52c1abe8ee
DEC: style fix 2014-05-28 20:56:57 +02:00
hasufell c48dad818e
DEC: improve error handling 2014-05-28 20:56:43 +02:00
hasufell 2a6ad998ce
ENC: cleanup 2014-05-28 19:54:51 +02:00
hasufell ecdfbad591
ENC: style fix 2014-05-28 19:44:49 +02:00
hasufell 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
hasufell f17b3fd6d0
ASCII->POLY: use malloc instead of calloc 2014-05-28 19:42:08 +02:00
hasufell 0c9e53b5fb
ASCII->POLY: cosmetic cleanup 2014-05-28 19:41:51 +02:00
hasufell 4440322d29
ASCII->POLY: fix broken loop 2014-05-28 19:40:39 +02:00
hasufell 593c24ff90 ASCII->POLY: fix some valgrind warnings
Especially uninitalized memory warnings.
2014-05-28 11:20:28 +02:00
hasufell bf192a0498
ASCII->POLY: use double base64 encoding for more entropy 2014-05-28 02:04:45 +02:00
hasufell 51c6537777
BUILD: refactor Makefiles 2014-05-28 01:38:55 +02:00
hasufell 2ec61bc87e
ALL: improve readability 2014-05-28 01:17:19 +02:00
hasufell d8f95240c0
Update .gitignore 2014-05-28 01:12:01 +02:00
hasufell 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
hasufell 8b9134628c
STRING: improve doxygen comment 2014-05-27 01:08:52 +02:00
hasufell fd9ac4ecb8
STRING: add prints() for printing 2014-05-27 01:08:42 +02:00
hasufell e0b75b98e2
ASCII->POLY: refactor and make more modular
Introduced appropriate function for single polynomials
as well.
2014-05-27 01:08:17 +02:00
hasufell 03d935d088
ASCII->POLY: improve doxygen comments 2014-05-26 21:59:29 +02:00
hasufell 7e7ee38404
FILE: add missing include 2014-05-26 21:41:19 +02:00
hasufell c862c83f1f
FILE: fix/add doxygen comments 2014-05-26 21:39:10 +02:00
hasufell b27170d150
FILE: rename parameter 2014-05-26 21:38:54 +02:00
hasufell ff3967f932
STRING: provide function for deleting strings 2014-05-26 21:38:39 +02:00
hasufell 4dbfe1e663
FILE: add file subsystem and move string to ntru_string subs. 2014-05-26 21:30:42 +02:00
hasufell 7a5b899825
ENC/DEC: allow encryption/decryption of strings 2014-05-26 20:59:12 +02:00
hasufell fcb07e6d54 ASCII->POLY: readability 2014-05-26 10:56:42 +02:00
hasufell 96a36515ab ASCII->POLY: fix possible junk data at end of string 2014-05-26 10:56:31 +02:00
hasufell a1bd81b2f2 Merge branch 'master' of ssh://gitlab.hasufell.de:22022/hasufell/quantumcrypto 2014-05-26 01:59:57 +02:00
hasufell e4c5094af9
ALL: improve readability 2014-05-25 23:04:22 +02:00
hasufell 6aebea2cde
ASCII->POLY: improve readability 2014-05-25 22:50:39 +02:00