Fix psa_pake_get_implicit_key() state & add corresponding tests in ecjpake_rounds()

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
diff --git a/library/psa_crypto_pake.c b/library/psa_crypto_pake.c
index f7fb384..8ceacd9 100644
--- a/library/psa_crypto_pake.c
+++ b/library/psa_crypto_pake.c
@@ -660,8 +660,8 @@
 
     if( operation->alg == 0 ||
         operation->state != PSA_PAKE_STATE_READY ||
-        ( operation->input_step != PSA_PAKE_STEP_DERIVE  &&
-          operation->output_step != PSA_PAKE_STEP_DERIVE ) )
+        operation->input_step != PSA_PAKE_STEP_DERIVE ||
+        operation->output_step != PSA_PAKE_STEP_DERIVE )
         return( PSA_ERROR_BAD_STATE );
 
 #if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE)