@@ -5474,7 +5474,7 @@ int wh_Client_MlDsaImportKey(whClientContext* ctx, MlDsaKey* key,
54745474{
54755475 int ret = WH_ERROR_OK ;
54765476 whKeyId key_id = WH_KEYID_ERASED ;
5477- byte buffer [DILITHIUM_MAX_PRV_KEY_SIZE ];
5477+ byte buffer [DILITHIUM_MAX_BOTH_KEY_DER_SIZE ];
54785478 uint16_t buffer_len = 0 ;
54795479
54805480 if ((ctx == NULL ) || (key == NULL ) ||
@@ -5511,7 +5511,7 @@ int wh_Client_MlDsaExportKey(whClientContext* ctx, whKeyId keyId, MlDsaKey* key,
55115511{
55125512 int ret = WH_ERROR_OK ;
55135513 /* buffer cannot be larger than MTU */
5514- byte buffer [DILITHIUM_MAX_PRV_KEY_SIZE ];
5514+ byte buffer [DILITHIUM_MAX_BOTH_KEY_DER_SIZE ];
55155515 uint16_t buffer_len = sizeof (buffer );
55165516
55175517 if ((ctx == NULL ) || WH_KEYID_ISERASED (keyId ) || (key == NULL )) {
@@ -5965,7 +5965,7 @@ int wh_Client_MlDsaImportKeyDma(whClientContext* ctx, MlDsaKey* key,
59655965{
59665966 int ret = WH_ERROR_OK ;
59675967 whKeyId key_id = WH_KEYID_ERASED ;
5968- byte buffer [DILITHIUM_MAX_PRV_KEY_SIZE ];
5968+ byte buffer [DILITHIUM_MAX_BOTH_KEY_DER_SIZE ];
59695969 uint16_t buffer_len = 0 ;
59705970
59715971 if ((ctx == NULL ) || (key == NULL ) ||
@@ -5997,7 +5997,7 @@ int wh_Client_MlDsaExportKeyDma(whClientContext* ctx, whKeyId keyId,
59975997 uint8_t * label )
59985998{
59995999 int ret = WH_ERROR_OK ;
6000- byte buffer [DILITHIUM_MAX_PRV_KEY_SIZE ] = {0 };
6000+ byte buffer [DILITHIUM_MAX_BOTH_KEY_DER_SIZE ] = {0 };
60016001 uint16_t buffer_len = sizeof (buffer );
60026002
60036003 if ((ctx == NULL ) || WH_KEYID_ISERASED (keyId ) || (key == NULL )) {
@@ -6021,7 +6021,7 @@ static int _MlDsaMakeKeyDma(whClientContext* ctx, int level,
60216021{
60226022 int ret = WH_ERROR_OK ;
60236023 whKeyId key_id = WH_KEYID_ERASED ;
6024- byte buffer [DILITHIUM_MAX_PRV_KEY_SIZE ];
6024+ byte buffer [DILITHIUM_MAX_BOTH_KEY_DER_SIZE ];
60256025 uint8_t * dataPtr = NULL ;
60266026 whMessageCrypto_MlDsaKeyGenDmaRequest * req = NULL ;
60276027 whMessageCrypto_MlDsaKeyGenDmaResponse * res = NULL ;
0 commit comments