Manuel Pégourié-Gonnard | b902164 | 2021-10-01 13:16:01 +0200 | [diff] [blame] | 1 | This document is temporary; it lists tasks to achieve G2 as described in |
| 2 | `strategy.md` while the strategy is being reviewed - once that's done, |
| 3 | corresponding github issues will be created and this document removed. |
| 4 | |
| 5 | For all of the tasks here, specific testing (integration and unit test depending |
| 6 | on the task) is required, see `testing.md`. |
| 7 | |
| 8 | RSA Signature operations |
| 9 | ======================== |
| 10 | |
| 11 | In PK |
| 12 | ----- |
| 13 | |
| 14 | ### Modify existing `PK_OPAQUE` type to allow for RSA keys |
| 15 | |
| 16 | - the following must work and be tested: `mbedtls_pk_get_type()`, |
| 17 | `mbedtls_pk_get_name()`, `mbedtls_pk_get_bitlen()`, `mbedtls_pk_get_len()`, |
| 18 | `mbedtls_pk_can_do()`. |
| 19 | - most likely adapt `pk_psa_genkey()` in `test_suite_pk.function`. |
| 20 | - all other function (sign, verify, encrypt, decrypt, check pair, debug) will |
| 21 | return `MBEDTLS_ERR_PK_TYPE_MISMATCH` and this will be tested too. |
| 22 | |
| 23 | ### Modify `mbedtls_pk_wrap_as_opaque()` to work with RSA. |
| 24 | |
| 25 | - OK to have policy hardcoded on signing with PKCS1v1.5, or allow more if |
| 26 | available at this time |
| 27 | |
| 28 | ### Modify `mbedtls_pk_write_pubkey_der()` to work with RSA-opaque. |
| 29 | |
| 30 | - OK to just test that a generated key (with `pk_psa_genkey()`) can be |
| 31 | written, without checking for correctness of the result - this will be |
| 32 | tested as part of another task |
| 33 | |
| 34 | ### Make `mbedtls_pk_sign()` work with RSA-opaque. |
| 35 | |
| 36 | - testing may extend `pk_psa_sign()` in `test_suite_pk_function` by adding |
| 37 | selector for ECDSA/RSA. |
| 38 | |
| 39 | In X.509 |
| 40 | -------- |
| 41 | |
| 42 | ### Test using RSA-opaque for CSR generation |
| 43 | |
| 44 | - similar to what's already done with ECDSA-opaque |
| 45 | |
| 46 | ### Test using opaque keys for Certificate generation |
| 47 | |
| 48 | - similar to what's done with testing CSR generation |
| 49 | - should test both RSA and ECDSA as ECDSA is not tested yet |
| 50 | - might require slight code adaptations, even if unlikely |
| 51 | |
| 52 | |
| 53 | In TLS |
| 54 | ------ |
| 55 | |
| 56 | ### Test using RSA-opaque for TLS client auth |
| 57 | |
| 58 | - similar to what's already done with ECDSA-opaque |
| 59 | |
| 60 | ### Test using RSA-opaque for TLS server auth |
| 61 | |
| 62 | - similar to what's already done with ECDSA-opaque |
| 63 | - key exchanges: ECDHE-RSA and DHE-RSA |
| 64 | |
| 65 | RSA decrypt |
| 66 | =========== |
| 67 | |
| 68 | ### Extend `PK_OPAQUE` to allow RSA decryption (PKCS1 v1.5) |
| 69 | |
| 70 | ### Test using that in TLS for RSA and RSA-PSK key exchange. |
| 71 | |
| 72 | Support opaque PSKs for "mixed-PSK" key exchanges |
| 73 | ================================================= |
| 74 | |
| 75 | See `PSA-limitations.md`. |
| 76 | |
| 77 | Possible split: |
| 78 | - one task to extend PSA (see `PSA-limitations.md`) |
| 79 | - then one task per handshake: DHE-PSK, ECDHE-PSK, RSA-PSK (with tests for |
| 80 | each) |