Commit Graph

66 Commits

Author SHA1 Message Date
Aurelien Jarno
43009f39e8 polarssl: use a bigger sliding window when possible 2017-10-17 15:01:17 +09:00
Aurelien Jarno
3bb5097031 polarssl: add ARM DSP optimized mpi_montsqr 2017-10-17 15:01:09 +09:00
Aurelien Jarno
8319f4a14b polarssl: replace BIGNUM_C_IMPLEMENTATION check
Replace the BIGNUM_C_IMPLEMENTATION check by a check on POLARSSL_HAVE_ASM
and __arm__. This way it's possible to use this code on non arm, but
also to run the GNU/Linux emulation on an arm machine, which is useful
for debugging and profiling.
2017-10-17 15:01:06 +09:00
Aurelien Jarno
f7cf0a3461 polarssl: add ARM DSP optimized MULADDC code
The Cortex M4, M7 MCUs and the Cortex A CPUs support the ARM DSP
instructions, and especially the umaal instruction which greatly
speed up MULADDC code.
2017-10-17 15:01:03 +09:00
Aurelien Jarno
5ac52d3f2f polarssl: rename MULADDC_HUIT into MULADDC_HUIT_DEAD
As the comment above said, it's dead code. Renaming it make sure it's
not used by mistake, for example when testing/debugging code.
2017-10-17 15:01:00 +09:00
Aurelien Jarno
209d459d09 polarssl: fix build without POLARSSL_HAVE_ASM
This fixes building polarssl for architectures without assembly code or
when POLARSSL_HAVE_ASM is not defined.

This has been done in upstream commit a755ca1bbe, but somehow the
generic version has been missed in gnuk's version.
2017-10-17 15:00:55 +09:00
NIIBE Yutaka
7bae61f300 Fix bignum for 64-bit machine. 2017-10-05 13:45:24 +09:00
NIIBE Yutaka
30fde2a0f0 Fix bignum for 64-bit machine. 2017-10-04 17:08:42 +09:00
NIIBE Yutaka
eff0c7077d Don't provide stdlib.h, but provide gnuk-malloc.h. 2017-10-03 16:04:43 +09:00
NIIBE Yutaka
0b4099d6d1 mpi_montsqr fix for GNU/Linux. 2017-10-02 15:27:27 +09:00
NIIBE Yutaka
81b18f2db4 More for GNU/Linux emulation. 2017-09-28 16:44:54 +09:00
NIIBE Yutaka
ae76d66d53 Fix accessing garbage on error path.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Reported-by: Anthony Romano <anthony.romano@coreos.com>
2017-07-19 10:48:16 +09:00
NIIBE Yutaka
38d164360c Update to Chopstx 0.12 2016-05-31 18:16:51 +09:00
NIIBE Yutaka
522ec3299e Bignum fixes 2016-02-09 14:13:13 +09:00
NIIBE Yutaka
edf1a0cdd7 always enable keygen 2015-07-18 13:55:28 +09:00
NIIBE Yutaka
8d56a4bff5 Change required by RSA-4096 support 2014-12-12 14:06:16 +09:00
NIIBE Yutaka
62863d52b2 more minor change for bignum 2013-12-25 10:04:10 +09:00
NIIBE Yutaka
26db39b1b7 don't use r10 2013-12-24 21:21:44 +09:00
NIIBE Yutaka
1774563184 use r12 and more tweak 2013-12-24 20:50:21 +09:00
NIIBE Yutaka
a89ae40e89 improve a bit 2013-12-24 15:21:07 +09:00
NIIBE Yutaka
4427227284 more tweak 2013-12-24 13:46:22 +09:00
NIIBE Yutaka
141d345cfe more improvement of mpi_montsqr and multiply. 2013-12-24 12:22:54 +09:00
NIIBE Yutaka
34fe062548 more tweak of API 2013-12-23 17:51:04 +09:00
NIIBE Yutaka
e8896ecb4d mpi_exp_mod: Use stack instead of malloc 2013-12-23 16:17:20 +09:00
NIIBE Yutaka
cce282b3d7 more constant-time computation 2013-12-23 10:13:04 +09:00
NIIBE Yutaka
b15d5a2444 more a bit tweek 2013-12-20 12:53:13 +09:00
NIIBE Yutaka
d3f4713360 a bit improvement on bignum multiply 2013-12-20 11:55:46 +09:00
NIIBE Yutaka
ade0ea65eb minor improvement 2013-12-19 14:50:58 +09:00
NIIBE Yutaka
8f145f8adf improve montsqr 2013-12-19 11:28:51 +09:00
NIIBE Yutaka
a534a847fe adopt montsqr 2013-12-18 21:45:38 +09:00
NIIBE Yutaka
78c2609a9b test montsqr 2013-12-18 20:09:32 +09:00
NIIBE Yutaka
4ef82f0a49 more minor improvement 2013-12-16 16:47:25 +09:00
NIIBE Yutaka
af3fc992b9 minor improvement of bignum 2013-12-16 14:38:13 +09:00
NIIBE Yutaka
a0438913b7 montmul improvement to lesser copies 2013-12-16 10:40:15 +09:00
NIIBE Yutaka
78289257cf tune bignum.c 2013-12-13 15:26:25 +09:00
NIIBE Yutaka
76207e7e8d minimize memory usage of mpi_exp_mod 2013-12-13 14:11:58 +09:00
NIIBE Yutaka
e0d7045239 Bug fix for mpi_exp_mod 2013-10-10 12:07:07 +09:00
NIIBE Yutaka
62e00a321e Update from PolarSSL 2013-10-08 10:43:50 +09:00
NIIBE Yutaka
e2ec98225f more mitigation against timing attack 2013-10-07 13:30:10 +09:00
NIIBE Yutaka
061c991e26 more fix bignum 2013-10-07 09:30:30 +09:00
NIIBE Yutaka
84c25e5767 another way to mitigate timing attack 2013-10-06 09:28:58 +09:00
NIIBE Yutaka
533ac62846 PolarSSL update to 1.2.9 (RSA blinding) 2013-10-05 12:30:55 +09:00
NIIBE Yutaka
3d8e73defc changelog 2013-10-03 13:29:25 +09:00
NIIBE Yutaka
06abf9b494 select better M and MAX_A 2013-10-01 13:46:25 +09:00
NIIBE Yutaka
093917927b Use pseudo random generator for primality test 2013-10-01 11:53:00 +09:00
NIIBE Yutaka
c8a6146d02 fix prime number generation 2013-09-30 16:10:51 +09:00
NIIBE Yutaka
f207c4ec49 improve key generation 2013-09-27 17:31:26 +09:00
NIIBE Yutaka
ee7d72743e port to chopstx 2013-06-20 16:19:49 +09:00
NIIBE Yutaka
91a5ea3ac0 minimum change for PolarSSL 2013-03-19 15:59:00 +09:00
NIIBE Yutaka
dae09f62ce fix for rsa_rsassa_pkcs1_v15_sign 2013-03-19 15:47:56 +09:00