From 5798003b99c03a676d1684035c1390bb1e796ea5 Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Mon, 9 Jan 2023 15:07:26 +0100 Subject: [PATCH] Add enum that presents computation stage as single value Signed-off-by: Przemek Stekiel --- include/psa/crypto_extra.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/psa/crypto_extra.h b/include/psa/crypto_extra.h index 1678228d3b..fa6ef4e546 100644 --- a/include/psa/crypto_extra.h +++ b/include/psa/crypto_extra.h @@ -1946,6 +1946,21 @@ enum psa_jpake_sequence { PSA_PAKE_SEQ_END = 7, }; +enum psa_jpake_computation_state { + PSA_PAKE_X1_STEP_KEY_SHARE = 1, /* Round 1: input/output key share (for ephemeral private key X1).*/ + PSA_PAKE_X1_STEP_ZK_PUBLIC = 2, /* Round 1: input/output Schnorr NIZKP public key for the X1 key */ + PSA_PAKE_X1_STEP_ZK_PROOF = 3, /* Round 1: input/output Schnorr NIZKP proof for the X1 key */ + PSA_PAKE_X2_STEP_KEY_SHARE = 4, /* Round 1: input/output key share (for ephemeral private key X2).*/ + PSA_PAKE_X2_STEP_ZK_PUBLIC = 5, /* Round 1: input/output Schnorr NIZKP public key for the X2 key */ + PSA_PAKE_X2_STEP_ZK_PROOF = 6, /* Round 1: input/output Schnorr NIZKP proof for the X2 key */ + PSA_PAKE_X2S_STEP_KEY_SHARE = 7, /* Round 2: output X2S key (our key) */ + PSA_PAKE_X2S_STEP_ZK_PUBLIC = 8, /* Round 2: output Schnorr NIZKP public key for the X2S key (our key) */ + PSA_PAKE_X2S_STEP_ZK_PROOF = 9, /* Round 2: output Schnorr NIZKP proof for the X2S key (our key) */ + PSA_PAKE_X4S_STEP_KEY_SHARE = 10, /* Round 2: input X4S key (from peer) */ + PSA_PAKE_X4S_STEP_ZK_PUBLIC = 11, /* Round 2: input Schnorr NIZKP public key for the X4S key (from peer) */ + PSA_PAKE_X4S_STEP_ZK_PROOF = 12 /* Round 2: input Schnorr NIZKP proof for the X4S key (from peer) */ +}; + struct psa_jpake_computation_stage_s { unsigned int MBEDTLS_PRIVATE(state); unsigned int MBEDTLS_PRIVATE(sequence);