Documented use of context parameters in PAKE operations#214
Conversation
|
Feedback appreciated from @silabs-Kusumit, @silabs-hannes, @oberon-sk, and @yanesca. |
|
|
||
| J-PAKE does not use a context. | ||
| A call to `psa_pake_set_context()` for a J-PAKE operation will fail with :code:`PSA_ERROR_INVALID_ARGUMENT`. | ||
|
|
There was a problem hiding this comment.
I would prefer PSA_ERROR_BAD_STATE in this case. This is analog to psa_cipher_set_iv(), where PSA_ERROR_BAD_STATE shall be returned if the cipher algorithm does not use an IV.
There was a problem hiding this comment.
I think I agree. We should also change the text for psa_pake_set_context() - which currently describes PSA_ERROR_INVALID_ARGUMENT as being returned if the protocol does not support a context.
I do not think that the incompatibility (changing the specific error code) is an issue in practice here.
** Updated:** Re-reading what I wrote in the spec again - psa_pake_set_context() already specifies PSA_ERROR_BAD_STATE for algorithms that do not accept a context. I misread the description for returning PSA_ERROR_INVALID_ARGUMENT when creating this PR.
3c23093 to
d72289f
Compare
Following option 3 in #209.
Fixes #209