6a1e7e5f4c
Adapt pk_wrap.c to new RSA interface
...
This commit replaces direct manipulation of RSA context structure fields by
calls to the extended RSA interface in pk_wrap.c.
2017-08-23 15:07:40 +01:00
aaa9814879
Uniformize ifdefs to ECDSA_C+ECP_RESTARTABLE
...
Some parts were already implicitly using this as the two ifdefs were nested,
and some others didn't, which resulted in compile errors in some configs. This
fixes those errors and saves a bit of code+RAM that was previously wasted when
ECP_RESTARTABLE was defined but ECDSA_C wasn't
2017-08-18 17:30:37 +02:00
fe6877034d
Keep PK layer context in the PK layer
...
Previously we kept the ecdsa context created by the PK layer for ECDSA
operations on ECKEY in the ecdsa_restart_ctx structure, which was wrong, and
caused by the fact that we didn't have a proper handling of restart
sub-contexts in the PK layer.
2017-08-18 17:04:07 +02:00
0bbc66cc76
Dynamically allocate/free restart subcontext in PK
2017-08-18 16:22:06 +02:00
31f0ef7b19
Fix style issues introduced earlier
2017-08-09 11:44:53 +02:00
1f596064bc
Make PK EC sign/verify actually restartable
2017-08-09 11:44:53 +02:00
7c02c503ea
Change PK module preprocessor check on word size
...
There were preprocessor directives in pk.c and pk_wrap.c that cheked
whether the bit length of size_t was greater than that of unsigned int.
However, the check relied on the MBEDTLS_HAVE_INT64 macro being defined
which is not directly related to size_t. This might result in errors in
some platforms. This change modifies the check to use the macros
SIZE_MAX and UINT_MAX instead making the code more robust.
2017-08-04 13:32:15 +01:00
72849877d0
Fix data loss in unsigned int cast in PK
...
This patch introduces some additional checks in the PK module for 64-bit
systems only. The problem is that the API functions in the PK
abstraction accept a size_t value for the hashlen, while the RSA module
accepts an unsigned int for the hashlen. Instead of silently casting
size_t to unsigned int, this change checks whether the hashlen overflows
an unsigned int and returns an error.
2017-05-11 21:55:17 +01:00
37ff14062e
Change main license to Apache 2.0
2015-09-04 14:21:07 +02:00
6fb8187279
Update date in copyright line
2015-07-28 17:11:58 +02:00
39a48f4934
Internal renamings in PK
...
+ an unrelated comment in SSL
2015-06-18 16:06:55 +02:00
7551cb9ee9
Replace malloc with calloc
...
- platform layer currently broken (not adapted yet)
- memmory_buffer_alloc too
2015-05-26 16:04:06 +02:00
50518f4195
Rename _wrap headers to _internal
...
Makes it clearer that the user is not supposed to include them
2015-05-26 11:06:12 +02:00
2cf5a7c98e
The Great Renaming
...
A simple execution of tmp/invoke-rename.pl
2015-04-08 13:25:31 +02:00
348bcb3694
Make RSA_ALT support optionnal
2015-03-31 14:01:33 +02:00
dfdcac9d51
Merge ecdsa_write_signature{,_det}() together
2015-03-31 11:41:42 +02:00
7f8099773e
Rename include directory to mbedtls
2015-03-10 11:23:56 +00:00
fe44643b0e
Rename website and repository
2015-03-06 13:17:10 +00:00
00ab47026b
cleanup library and some basic tests. Includes, add guards to includes
2015-02-10 11:28:46 +00:00
860b51642d
Fix url again
2015-01-28 17:12:07 +00:00
085ab040aa
Fix website url to use https.
2015-01-23 11:06:27 +00:00
9698f5852c
Remove maintainer line.
2015-01-23 10:59:00 +00:00
19f6b5dfaa
Remove redundant "all rights reserved"
2015-01-23 10:54:00 +00:00
a658a4051b
Update copyright
2015-01-23 09:55:24 +00:00
967a2a5f8c
Change name to mbed TLS in the copyright notice
2015-01-22 14:28:16 +00:00
7c13d69cb5
Fix dependency issues
2014-11-12 00:01:34 +01:00
a1efcb084f
Implement pk_check_pair() for RSA-alt
2014-11-08 18:00:22 +01:00
70bdadf54b
Add pk_check_pair()
2014-11-06 18:25:51 +01:00
d8bb82665e
Fix code styling for return statements
2014-06-17 14:06:49 +02:00
3461772559
Introduce polarssl_zeroize() instead of memset() for zeroization
2014-06-14 16:46:03 +02:00
20422e9a3a
Add pk_verify_ext()
2014-06-05 14:02:05 +02:00
9af723cee7
Fix formatting: remove trailing spaces, #endif with comments (> 10 lines)
2014-05-01 13:03:14 +02:00
cef4ad2509
Adapt sources to configurable config.h name
2014-04-30 16:40:20 +02:00
2abed84225
Specific return code for PK sig length mismatch
2014-04-09 15:50:00 +02:00
75342a65e4
Fixed typos in code
2014-04-09 15:49:57 +02:00
0148875cfc
Add tests and fix bugs for RSA-alt contexts
2014-04-04 17:46:46 +02:00
7dc4c44267
Library files moved to use platform layer
2014-02-06 13:20:16 +01:00
65ad3e4daf
Use deterministic ECDSA in the PK layer
2014-01-07 16:19:28 +01:00
8fc30b178c
Various const fixes
2013-11-25 13:29:43 +01:00
b9cfaa0c7f
Explicit conversions and minor changes to prevent MSVC compiler warnings
2013-10-14 15:50:40 +02:00
548957dd49
Refactored RSA to have random generator in every RSA operation
...
Primarily so that rsa_private() receives an RNG for blinding purposes.
2013-08-30 10:30:02 +02:00
e511ffca50
Allow compiling without RSA or DH
...
Only library and programs now, need to check test suites later.
2013-08-27 22:21:21 +02:00
c40b4c3708
Add configuration item for the PK module
2013-08-27 22:21:20 +02:00
12c1ff0ecb
Add RSA-alt to the PK layer
2013-08-27 22:21:20 +02:00
a2d3f22007
Add and use pk_encrypt(), pk_decrypt()
2013-08-27 22:21:20 +02:00
8df2769178
Introduce pk_sign() and use it in ssl
2013-08-27 22:21:20 +02:00
583b608401
Fix some return values
2013-08-27 22:21:20 +02:00
fff80f8879
PK: use NULL for unimplemented operations
2013-08-20 20:46:05 +02:00
f73da02962
PK: change pk_verify arguments (md_info "optional")
2013-08-20 20:46:04 +02:00
ac4cd36297
PK rsa_verify: check signature length
2013-08-20 20:46:04 +02:00