When ML-DSA is configured in low-stack mode (TF_PSA_CRYPTO_PQCP_BUFFER_ALLOC introduced by #786), also use the global buffer instead of a large stack variable (~4kB) for temporary copies of keys.
Also, in signature, when the expanded private key is available (#774), make sure we never use a large stack variable or a heap variable.
Prerequisites:
When ML-DSA is configured in low-stack mode (
TF_PSA_CRYPTO_PQCP_BUFFER_ALLOCintroduced by #786), also use the global buffer instead of a large stack variable (~4kB) for temporary copies of keys.Also, in signature, when the expanded private key is available (#774), make sure we never use a large stack variable or a heap variable.
Prerequisites: