Skip to content

Add opt-in conformance check for missing symmetric output buffers - #8

Open
yss1522475048-collab wants to merge 2 commits into
GmSSL:mainfrom
yss1522475048-collab:cbc08-output-argument-conformance
Open

yss1522475048-collab wants to merge 2 commits into
GmSSL:mainfrom
yss1522475048-collab:cbc08-output-argument-conformance

Conversation

@yss1522475048-collab

Copy link
Copy Markdown

This adds an opt-in check for GM/T 0102-2020 §6.10 cc) (printed p. 48). It first verifies both directions against the public SM4-CBC known-answer example in GB/T 17964-2021 Annex B, then checks the status returned when the output buffer is absent. GB/T 36322-2018 Annex A maps the specified output-parameter error to SDR_OUTARGERR (0x0100001E).

On the official SoftSDF v1.1.3 Windows x64 DLL (SHA-256 75aa4fb9cc2e1e0f3287678ea36f2e123773821cd75c893537e2b15c2cad0f92), both known-answer controls match. When the output buffer is absent, both operations return SDR_OK and report 64 bytes. The opt-in check reports these statuses and exits 1 on that release.

Is the successful length query an intentional extension? If so, how should callers distinguish it from the conformance path?

This PR adds only the check, its public test vector, and instructions. Production code and CI are unchanged.

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