Commit Graph

  • a1cac84e83 Move AEAD tests just after cipher Gilles Peskine 2018-06-11 19:33:02 +02:00
  • 4f594eca40 remove check for key pair (public key should be enough for verification) Nir Sonnenschein 2018-05-29 16:09:13 +03:00
  • d6125ca63b Merge remote-tracking branch 'psa/pr/24' into feature-psa Gilles Peskine 2018-06-08 20:12:36 +02:00
  • 7f5a31915b code fixes for internal code review: Nir Sonnenschein 2018-05-06 22:26:54 +03:00
  • 0f3bdbddee change RSA encryption tests compensate for random component in encryption. Nir Sonnenschein 2018-05-02 23:56:12 +03:00
  • 39e59144f6 added support for PKCSv1.5 signature verification and encryption/decryption and very basic tests. Nir Sonnenschein 2018-05-02 23:16:26 +03:00
  • bb1072f642 Fix use of mbedtls_cipher_info_from_psa Gilles Peskine 2018-06-08 18:46:05 +02:00
  • 3585596aec Document a few more macros Gilles Peskine 2018-04-19 08:39:16 +02:00
  • 84861a95ca Merge remote-tracking branch 'psa/psa-wrapper-apis-aead' into feature-psa Gilles Peskine 2018-06-08 18:42:25 +02:00
  • 154bd95131 psa_destroy_key: return SUCCESS on an empty slot Gilles Peskine 2018-04-19 08:38:16 +02:00
  • 5e39dc96e0 New macro PSA_AEAD_TAG_SIZE, use it for PSA_AEAD_xxx_OUTPUT_SIZE Gilles Peskine 2018-06-08 11:41:57 +02:00
  • 71bb7b77f0 Switch PSA_HASH_FINAL_SIZE to PSA_HASH_SIZE Gilles Peskine 2018-04-19 08:29:59 +02:00
  • 212e4d8f7c Improve documentation of PSA_AEAD_xxx_OUTPUT_SIZE Gilles Peskine 2018-06-08 11:36:37 +02:00
  • 65eb8588fe Expand the description of error codes Gilles Peskine 2018-04-19 08:28:58 +02:00
  • 3158564f08 add nonce as argument to the test function of encrypt/decrypt mohammad1603 2018-06-07 11:45:03 +03:00
  • fc614b1e0e fix parentheses mohammad1603 2018-06-07 01:43:52 +03:00
  • 1347a73fbe fix macros documentation style. mohammad1603 2018-06-07 01:38:45 +03:00
  • e109f21638 remove unnecessary check for block size mohammad1603 2018-06-07 01:38:14 +03:00
  • a1d9801683 add slot validation mohammad1603 2018-06-06 13:45:55 +03:00
  • e3cb8a8d8b return PSA_ERROR_BUFFER_TOO_SMALL intead of PSA_ERROR_INVALID_ARGUMENT mohammad1603 2018-06-06 13:45:03 +03:00
  • fb5b9cbb8d add missing documentations mohammad1603 2018-06-06 13:44:27 +03:00
  • 8ffd764e23 re-group test vectors and change vectors' names mohammad1603 2018-06-06 13:37:29 +03:00
  • 6b4d98cf78 remove trailing spaces mohammad1603 2018-06-06 13:19:51 +03:00
  • 5ed0621dd4 aligned with coding standards - line length mohammad1603 2018-06-06 13:09:34 +03:00
  • f7f72da769 add invalid signature test case mohammad1603 2018-06-04 16:32:11 +03:00
  • c1ee32e1f4 add GCM test vectors encrypt/decrypt mohammad1603 2018-06-04 16:21:56 +03:00
  • 371a6e4067 add decrypt tests for CCM mohammad1603 2018-06-04 15:11:08 +03:00
  • ed8dbeb434 add and fix data vectors mohammad1603 2018-06-04 15:00:52 +03:00
  • f14394b25f add policy checks mohammad1603 2018-06-04 14:33:19 +03:00
  • 96910d807e fix block size depending on algorithm mohammad1603 2018-06-04 14:33:00 +03:00
  • 0317945a37 disable uncompleted tests mohammad1603 2018-06-04 12:06:29 +03:00
  • f2525ebda7 add encryption only test case mohammad1603 2018-06-03 19:13:34 +03:00
  • 4b26850a15 fix tests according to the code changes in error value mohammad1603 2018-06-03 19:01:25 +03:00
  • 60a64d079a remove unnecessary argument to the psa_aead_unpadded_locate_tag function mohammad1603 2018-06-03 17:20:42 +03:00
  • 15223a8b89 write the tag directly on the ciphertext buffer. mohammad1603 2018-06-03 17:19:55 +03:00
  • 4fc744f8af change the check of block size for all supported algorithms mohammad1603 2018-06-03 15:10:47 +03:00
  • 0f21465175 use mbedtls_cipher_info_from_psa to get cipher ID mohammad1603 2018-06-03 15:10:06 +03:00
  • f58aa6ade6 use memset instead of mbedtils_zeroize mohammad1603 2018-06-03 15:08:32 +03:00
  • 554faad260 return NOT_SUPPORTED instead of INVLID_ARGUMENT mohammad1603 2018-06-03 15:07:38 +03:00
  • 95893f834d remove usless cast mohammad1603 2018-06-03 15:06:17 +03:00
  • f08a550e68 set output length to zero to cover output length in error case mohammad1603 2018-06-03 15:05:47 +03:00
  • f4f0d612ba change mbedtls_cipher_info_from_psa to provide cipher_id also mohammad1603 2018-06-03 15:04:51 +03:00
  • 22898ba0bd remove duplicated definition mohammad1603 2018-06-03 15:03:52 +03:00
  • 9375f8403a fix code offsets after rebase mohammad1603 2018-06-03 14:28:24 +03:00
  • ee652a344c Fix psa_aead_decrypt to read the tag at the end of the ciphertext Gilles Peskine 2018-06-01 19:23:52 +02:00
  • 36a74b71a0 Fix Doxygen comments to pass clang -Wdocumentation Gilles Peskine 2018-06-01 16:30:32 +02:00
  • 1e7d8f1b09 Document AEAD functions Gilles Peskine 2018-06-01 16:29:38 +02:00
  • a40d77477d Whitespace fixes Gilles Peskine 2018-06-01 16:28:30 +02:00
  • 20399393a5 add psa_crypto to test suites mohammad1603 2018-06-01 04:41:27 -07:00
  • e797945ea9 initialize length variables and process decrypt only when encrypts passes mohammad1603 2018-06-01 04:41:03 -07:00
  • 39574652ae add else for not supported algorithm mohammad1603 2018-06-01 04:39:53 -07:00
  • 9b07132591 remove compilation warnings mohammad1603 2018-05-31 03:18:45 -07:00
  • f07db2e919 Add more test scenario for GCM and failure cases mohammad1603 2018-05-09 05:41:08 -07:00
  • 5c8845f563 return invalid argument for unsupported algorithms mohammad1603 2018-05-09 05:40:09 -07:00
  • d973472a37 Fix loop index and output size parameter value mohammad1603 2018-05-09 04:59:26 -07:00
  • e58e68458e fix condition over key type mohammad1603 2018-05-09 04:58:32 -07:00
  • 17638efc46 remove unused variable mohammad1603 2018-05-09 04:58:00 -07:00
  • bdd892aef5 Add test scenario mohammad1603 2018-05-09 02:26:51 -07:00
  • dad36fa855 add Key and Algorithm validation mohammad1603 2018-05-09 02:24:42 -07:00
  • a7e6df76ea Validation fixes for key_type mohammad1603 2018-04-30 17:25:45 +03:00
  • 091e73b22b Fix usage of TEST_ASSERT mohammad1603 2018-04-30 17:24:39 +03:00
  • 4f5eb7cb54 Fill the the output buffer with zero data in case of failure mohammad1603 2018-04-30 17:23:47 +03:00
  • 6bbd8c75dc Remove unnecessary cast mohammad1603 2018-04-30 17:22:52 +03:00
  • db6247315f Parameters validation fixes mohammad1603 2018-04-30 17:21:50 +03:00
  • 9112693930 aead test scenario mohammad1603 2018-04-30 11:10:16 +03:00
  • 579d359007 remove psa_aead_encrypt_setup from header file mohammad1603 2018-04-30 08:51:35 +03:00
  • ce5cba9a6a unify the concatenation of the tag and update output length mohammad1603 2018-04-26 12:08:21 +03:00
  • 9e5a515aa8 Fix parameter validation mohammad1603 2018-04-26 12:07:35 +03:00
  • 47ddf3d544 Concatenate the tag to the output buffer mohammad1603 2018-04-26 01:11:21 +03:00
  • 5955c98779 Initial implementation of the AEAD decrypt/encrypt APIs mohammad1603 2018-04-26 00:53:03 +03:00
  • 3aa8efb230 Merge remote-tracking branch 'psa/psa-wrapper-apis-march-12' into feature-psa Gilles Peskine 2018-06-08 18:40:39 +02:00
  • 39ee871d3f Change AEAD APIs to integrated AEAD APIs. mohammad1603 2018-04-26 00:51:02 +03:00
  • 5809ce7bd6 Add PKCS#7 good decryption test cases Gilles Peskine 2018-06-08 14:42:50 +02:00
  • 42b8aec792 Correct some bad test data Gilles Peskine 2018-06-08 14:41:49 +02:00
  • a7ec95f1ea Cipher tests: calculate and verify the actual output size Gilles Peskine 2018-06-08 14:40:59 +02:00
  • 50e586b691 We don't need _test_ in test function names Gilles Peskine 2018-06-08 14:28:46 +02:00
  • 048b7f0802 Rename some variables to make the code easier to read Gilles Peskine 2018-06-08 14:20:49 +02:00
  • 8172b87a63 add tests cases Moran Peker 2018-06-07 18:09:18 +03:00
  • a9c3a658be tests fix + max_output_size Moran Peker 2018-06-07 18:08:58 +03:00
  • 9e3aa62c13 change variable naming Moran Peker 2018-06-07 12:08:47 +03:00
  • 17ddaa27b0 Correct and improve cipher test case descriptions Gilles Peskine 2018-06-06 18:57:49 +02:00
  • 9cf78d301d Fix some test case dependencies on cipher modes Gilles Peskine 2018-06-06 18:57:11 +02:00
  • 4ca9c3f9a1 Fix whitespace issues Gilles Peskine 2018-06-06 18:44:09 +02:00
  • 7f87850fc4 fix and add tests case + fix for padding mode Moran Peker 2018-06-06 17:09:40 +03:00
  • ded844092e fix and add tests case + fix for padding mode Moran Peker 2018-06-06 16:36:50 +03:00
  • 5cbb4c8508 Correct some test case descriptions Gilles Peskine 2018-06-06 15:21:31 +02:00
  • 7268afc29e Reordered cipher tests to be just after MAC tests Gilles Peskine 2018-06-06 15:19:24 +02:00
  • 691dfb3e3a Whitespce normalization Gilles Peskine 2018-06-06 15:18:02 +02:00
  • 2c5219a06d Whitespace normalization Gilles Peskine 2018-06-06 15:12:32 +02:00
  • 5351420b3e Use block local variable for padding_mode for readability Gilles Peskine 2018-06-06 15:11:46 +02:00
  • 7cb22b8327 abort operation before return + fix error checks Moran Peker 2018-06-05 11:40:02 +03:00
  • 5eb6e9ed60 PSA_ALG_CBC_BASE -> SA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE Moran Peker 2018-06-05 11:38:39 +03:00
  • 89d789c9bc Refactor some argument checks for readability Gilles Peskine 2018-06-04 17:17:16 +02:00
  • 7e9288520f Wrap lines to 80 columns Gilles Peskine 2018-06-04 16:23:10 +02:00
  • e553c65cc3 Fix indentation and horizontal whitespace Gilles Peskine 2018-06-04 16:22:46 +02:00
  • d8100245d8 Remove cipher_test_positive, duplicated as cipher_test_encrypt Gilles Peskine 2018-06-04 16:18:38 +02:00
  • 7691fb7b6b add new test scenario (cipher_test_encrypt_multipart) Moran Peker 2018-05-31 16:15:31 +03:00
  • 3520c2c4f7 unset iv_required to 0 (psa_encrypt_set_iv)and block_size (psa_cipher_setup) Moran Peker 2018-05-31 14:51:58 +03:00
  • 395db875e6 adjust indentation per Mbed TLS standards Moran Peker 2018-05-31 14:07:14 +03:00
  • ae382791fb add missing psa_cipher_abort( operation ) Moran Peker 2018-05-31 14:06:17 +03:00