Gilles Peskine
84861a95ca
Merge remote-tracking branch 'psa/psa-wrapper-apis-aead' into feature-psa
2018-09-05 12:41:52 +03:00
mohammad1603
3158564f08
add nonce as argument to the test function of encrypt/decrypt
2018-09-05 12:41:52 +03:00
mohammad1603
8ffd764e23
re-group test vectors and change vectors' names
2018-09-05 12:41:52 +03:00
mohammad1603
f7f72da769
add invalid signature test case
2018-09-05 12:41:52 +03:00
mohammad1603
c1ee32e1f4
add GCM test vectors encrypt/decrypt
2018-09-05 12:41:52 +03:00
mohammad1603
371a6e4067
add decrypt tests for CCM
2018-09-05 12:41:52 +03:00
mohammad1603
ed8dbeb434
add and fix data vectors
2018-09-05 12:41:52 +03:00
mohammad1603
0317945a37
disable uncompleted tests
2018-09-05 12:41:51 +03:00
mohammad1603
f2525ebda7
add encryption only test case
2018-09-05 12:41:51 +03:00
mohammad1603
4b26850a15
fix tests according to the code changes in error value
2018-09-05 12:41:51 +03:00
mohammad1603
f07db2e919
Add more test scenario for GCM and failure cases
2018-09-05 12:38:18 +03:00
mohammad1603
bdd892aef5
Add test scenario
2018-09-05 12:38:18 +03:00
Gilles Peskine
3aa8efb230
Merge remote-tracking branch 'psa/psa-wrapper-apis-march-12' into feature-psa
2018-09-05 12:38:17 +03:00
Gilles Peskine
5809ce7bd6
Add PKCS#7 good decryption test cases
2018-09-05 12:38:17 +03:00
Gilles Peskine
42b8aec792
Correct some bad test data
...
* PKCS#7 padding always adds at least one byte of padding, so test
data with plaintext length = ciphertext length could not have been
correct.
* CTR has plaintext length = ciphertext length, so test data with
differing lengths could not have been correct.
2018-09-05 12:38:17 +03:00
Gilles Peskine
50e586b691
We don't need _test_ in test function names
...
Also fix typo multpart -> multipart
2018-09-05 12:38:17 +03:00
Moran Peker
8172b87a63
add tests cases
2018-09-05 12:38:17 +03:00
Gilles Peskine
17ddaa27b0
Correct and improve cipher test case descriptions
2018-09-05 12:38:17 +03:00
Gilles Peskine
9cf78d301d
Fix some test case dependencies on cipher modes
2018-09-05 12:38:17 +03:00
Gilles Peskine
4ca9c3f9a1
Fix whitespace issues
...
Only whitespace changes.
* Remove tabs.
* Remove trailing whitespace.
* Correct some misindented lines.
* Normalize whitespace around some punctuation.
* Split some lines to avoid going over 80 columns.
2018-09-05 12:38:17 +03:00
Moran Peker
7f87850fc4
fix and add tests case + fix for padding mode
2018-09-05 12:38:17 +03:00
Moran Peker
ded844092e
fix and add tests case + fix for padding mode
2018-09-05 12:38:17 +03:00
Gilles Peskine
5cbb4c8508
Correct some test case descriptions
2018-09-05 12:38:17 +03:00
Gilles Peskine
7268afc29e
Reordered cipher tests to be just after MAC tests
2018-09-05 12:38:15 +03:00
Moran Peker
5eb6e9ed60
PSA_ALG_CBC_BASE -> SA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE
2018-09-05 12:14:29 +03:00
Moran Peker
7691fb7b6b
add new test scenario (cipher_test_encrypt_multipart)
2018-09-05 12:14:29 +03:00
mohammad1603
b152d4d8b6
add test scenarios to decrypt and encrypt input and compare with given output
2018-09-05 12:14:28 +03:00
Moran Peker
3205a6592b
tests fix
2018-09-05 12:14:28 +03:00
Gilles Peskine
d1e8e41737
Adapt older import_export test data to the new function signature
2018-09-05 12:13:23 +03:00
mohammad1603
d7d7ba5749
add positive test scenarios
2018-09-05 12:13:23 +03:00
Gilles Peskine
5100318a92
Merge pull request #18 from ARMmbed/psa-wrapper-apis-export-publickey
...
Export public key implementation (#18 )
2018-09-05 12:13:23 +03:00
Moran Peker
9bc76953ae
export->export-public + move tests case
2018-09-05 12:13:23 +03:00
Moran Peker
ce1b23a68c
PSA_ALG_CBC_BASE -> PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE
...
+ update tests description
2018-09-05 12:13:23 +03:00
Moran Peker
a964a8f9b0
add non-regression tests for export public/non public key
2018-09-05 12:13:23 +03:00
Moran Peker
338a0cf569
fix import_export_public_key test
2018-09-05 12:13:23 +03:00
Moran Peker
4ff99f36a7
change test case descriptions + add newline of test_suite_psa_crypto.function
2018-09-05 12:13:22 +03:00
Moran Peker
b4d0ddd2d3
psa_export_public_key
2018-09-05 12:13:20 +03:00
Moran Peker
dd4ea38d58
export public key
2018-09-05 12:10:47 +03:00
itayzafrir
5c7533923a
ECDSA sign and verify implementation and tests
...
ECDSA sign and verify implementation and tests
2018-09-05 12:10:47 +03:00
Gilles Peskine
a0655c3501
Merge remote-tracking branch 'psa/pr/13' into feature-psa
...
Conflicts:
library/psa_crypto.c
tests/suites/test_suite_psa_crypto.data
tests/suites/test_suite_psa_crypto.function
All the conflicts are concurrent additions where the order doesn't
matter. I put the code from feature-psa (key policy) before the code
from PR #13 (key lifetime).
2018-09-05 12:10:43 +03:00
mohammad1603
5d7ec2033d
fix key lifetime set implementation , tests accordingly
2018-09-05 12:01:37 +03:00
mohammad1603
ba178511f4
Remove unused and duplicated erros, fix documentation and tests
...
Remove unused and duplicated erros, fix documentation and tests
2018-09-05 12:01:37 +03:00
mohammad1603
804cd71bf8
initial key lifetime implementation and tests
2018-09-05 12:01:37 +03:00
Gilles Peskine
c63b6ba754
Merge remote-tracking branch 'psa/pr/14' into feature-psa
...
Conflict resolution:
* `tests/suites/test_suite_psa_crypto.data`: in the new tests from PR #14 ,
rename `PSA_ALG_RSA_PKCS1V15_RAW` to `PSA_ALG_RSA_PKCS1V15_SIGN_RAW` as
was done in PR #15 in the other branch.
2018-09-05 12:01:34 +03:00
mohammad1603
6df908f234
Add static internal MAC finish function
...
add new psa_mac_finish_internal() to be called by psa_mac_finish() and
psa_mac_verify() in order to be able to check key usage separatly.
2018-09-05 11:53:26 +03:00
mohammad1603
4eed757901
add new test scenarios
2018-09-05 11:53:26 +03:00
Gilles Peskine
a59262338a
Rename PKCS1V15 to PKCS1V15_SIGN
...
There's PKCS1V15_CRYPT as well (to be added soon).
2018-09-05 11:53:26 +03:00
mohammad1603
8cc1ceec3e
Key Policy APIs implementation
2018-09-05 11:53:26 +03:00
Gilles Peskine
8c9def3e7f
PSA: Implement MAC functions
...
Implement psa_mac_start, psa_mac_update and psa_mac_final.
Implement HMAC anc CMAC.
Smoke tests.
2018-09-05 11:53:25 +03:00
Gilles Peskine
9ef733faa0
Implement hash functions
...
New header file crypto_struct.h. The main file crypto.sh declares
structures which are implementation-defined. These structures must be
defined in crypto_struct.h, which is included at the end so that the
structures can use types defined in crypto.h.
Implement psa_hash_start, psa_hash_update and psa_hash_final. This
should work for all hash algorithms supported by Mbed TLS, but has
only been smoke-tested for SHA-256, and only in the nominal case.
2018-09-05 11:53:25 +03:00