Skip to content

Documented the per-session CertificateVerify scratch buffers - #49

Open
fdesbiens wants to merge 1 commit into
eclipse-threadx:mainfrom
fdesbiens:fix/certificate-verify-per-session-scratch
Open

Documented the per-session CertificateVerify scratch buffers#49
fdesbiens wants to merge 1 commit into
eclipse-threadx:mainfrom
fdesbiens:fix/certificate-verify-per-session-scratch

Conversation

@fdesbiens

@fdesbiens fdesbiens commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Documentation for eclipse-threadx/netxduo#431, which fixes eclipse-threadx/netxduo#430.

netxduo now reserves the CertificateVerify signature working buffers per TLS session, out of the crypto metadata area, so that two sessions authenticating with a certificate at the same time no longer corrupt each other's handshake hash and signature block.

Two consequences need documenting:

  • The metadata buffer requirement grows. An application that hard-codes the size instead of calling nx_secure_tls_metadata_size_calculate will start getting NX_INVALID_PARAMETERS from nx_secure_tls_session_create. Covered by a new paragraph in the TLS guide's "Cryptographic Metadata" section (chapter 3), which also explains why the buffers are per-session.
  • Two new configuration options. NX_SECURE_TLS_CERTIFICATE_VERIFY_SIGNATURE_SIZE and NX_SECURE_TLS_CERTIFICATE_VERIFY_PSS_SCRATCH_SIZE let an application recover memory when its largest certificate key is smaller than the 4096-bit default of NX_CRYPTO_MAX_RSA_MODULUS_SIZE. Added to the option tables in both the TLS and the DTLS guides (chapter 2), next to the existing NX_CRYPTO_MAX_RSA_MODULUS_SIZE entry.

Should be merged together with, or just after, eclipse-threadx/netxduo#431.

netxduo now reserves the CertificateVerify signature working buffers per TLS
session, out of the crypto metadata area, so that concurrent sessions do not
corrupt each other's handshake hash and signature block
(eclipse-threadx/netxduo#430).

Two consequences need documenting. The metadata buffer requirement grows, so
an application that hard-codes the size instead of calling
nx_secure_tls_metadata_size_calculate will start getting NX_INVALID_PARAMETERS
from nx_secure_tls_session_create. And the buffer sizes are now configurable
through NX_SECURE_TLS_CERTIFICATE_VERIFY_SIGNATURE_SIZE and
NX_SECURE_TLS_CERTIFICATE_VERIFY_PSS_SCRATCH_SIZE, which an application can
lower to recover memory when its largest certificate key is smaller than the
4096-bit default.

Assisted-by: Claude Code (Opus 5)
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.

CertificateVerify signing uses static buffers shared across TLS sessions

1 participant