Open paul-elliott-arm opened 6 months ago
We can adopt a gray-box approach and decide that interruptible key agreement is close enough to psa_key_agreement
that we don't need much separate testing of how it handles attributes, how it constructs a key and the content of the key. So we'll mostly want a couple of positive test cases checking that the key is as expected and a couple of negative test cases checking that some expected validations do take place. The rest of the tests will be specific to interruptible behavior, e.g. querying the number of iops, calling functions in the wrong order, aborting, etc.
Some cases that need to be handled that came up during implementation: https://github.com/Mbed-TLS/mbedtls/pull/9490#discussion_r1759248263 https://github.com/Mbed-TLS/mbedtls/pull/9490#discussion_r1759255733 https://github.com/Mbed-TLS/mbedtls/pull/9490#discussion_r1759266646
Extra Tests following on from #9107 - testing interruptible functionality (similar to interruptible sign/verify hash) and Negative tests.