Mbed-TLS / mbedtls

An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API. Releases are on a varying cadence, typically around 3 - 6 months between releases.
https://www.trustedfirmware.org/projects/mbed-tls/
Other
5.55k stars 2.61k forks source link

Extra tests for PSA Interruptible ECC Key Agreement #9109

Open paul-elliott-arm opened 6 months ago

paul-elliott-arm commented 6 months ago

Extra Tests following on from #9107 - testing interruptible functionality (similar to interruptible sign/verify hash) and Negative tests.

gilles-peskine-arm commented 3 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.

waleed-elmelegy-arm commented 2 months ago

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