Skip to content

Fix incorrect identifiers in PAKE operation example code#372

Open
krish2718 wants to merge 2 commits into
GlobalPlatform:mainfrom
krish2718:fix-pake-example-identifiers
Open

Fix incorrect identifiers in PAKE operation example code#372
krish2718 wants to merge 2 commits into
GlobalPlatform:mainfrom
krish2718:fix-pake-example-identifiers

Conversation

@krish2718

Copy link
Copy Markdown

Summary

The SPAKE2+ and WPA3-SAE operation examples in the PAKE chapter
(doc/crypto/api/ops/pake.rst) reference PAKE step macros that are not
defined anywhere in the specification, and the WPA3-SAE shared-key
extraction snippet operates on the wrong operation object. These are
copy/paste-style errors in the .. code-block:: xref example snippets;
they do not affect the normative text or the API.

Fixes

WPA3-SAE example

  • The send-confirm counter input step used PSA_PAKE_STEP_SEND_CONFIRM,
    which is undefined. The defined step is PSA_PAKE_STEP_CONFIRM_COUNT
    (0x07), whose documented format is exactly "the 2-byte little-endian
    send-confirm counter".
  • psa_pake_get_shared_key() operated on &spake2p_p (left over from the
    SPAKE2+ section) instead of the example's &wpa3_sae operation.

SPAKE2+ example

  • The Prover input step for the Verifier confirmation value used
    PSA_PAKE_STEP_KEY_CONFIRM, which is undefined. The defined step is
    PSA_PAKE_STEP_CONFIRM (0x04), consistent with every other
    confirmation step in the same example.

A "Clarifications and fixes" entry is added to the document change history.

Notes

  • Documentation only — no normative or API change.
  • Found while implementing WPA3-SAE against the 1.4 specification.
  • Two commits, split by protocol, so the SPAKE2+ correction can be taken
    or dropped independently of the WPA3-SAE one.
  • Both commits are DCO signed-off.

The WPA3-SAE operation example referenced a PAKE step macro that is not
defined, and extracted the shared key from the wrong operation object (a
copy-paste from the SPAKE2+ example).

*   The send-confirm counter input step used the undefined
    PSA_PAKE_STEP_SEND_CONFIRM; the defined step is
    PSA_PAKE_STEP_CONFIRM_COUNT.
*   psa_pake_get_shared_key() operated on &spake2p_p instead of the
    example's &wpa3_sae operation.

Signed-off-by: Chaitanya Tata <Chaitanya@dotstarsystems.com>
The SPAKE2+ operation example referenced a PAKE step macro that is not
defined: the Prover input step for the Verifier confirmation value used
the undefined PSA_PAKE_STEP_KEY_CONFIRM; the defined step is
PSA_PAKE_STEP_CONFIRM.

Signed-off-by: Chaitanya Tata <Chaitanya@dotstarsystems.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant