|
| 1 | +.. _ml-dsa-buffers-get-size: |
| 2 | + |
| 3 | +API to query working buffers size |
| 4 | +================================= |
| 5 | + |
| 6 | +Query the size of the working buffers. |
| 7 | + |
| 8 | +Syntax |
| 9 | +------ |
| 10 | +.. code:: cpp |
| 11 | +
|
| 12 | + IppStatus ippsMLDSA_KeyGenBufferGetSize(int* pSize, const IppsMLDSAState* pMLDSAState); |
| 13 | + IppStatus ippsMLDSA_SignBufferGetSize(int* pSize, const IppsMLDSAState* pMLDSAState); |
| 14 | + IppStatus ippsMLDSA_VerifyBufferGetSize(int* pSize, const IppsMLDSAState* pMLDSAState); |
| 15 | +
|
| 16 | +Include Files |
| 17 | +------------- |
| 18 | + |
| 19 | +``ippcp.h`` |
| 20 | + |
| 21 | +Parameters |
| 22 | +---------- |
| 23 | + |
| 24 | +.. list-table:: |
| 25 | + :header-rows: 0 |
| 26 | + |
| 27 | + * - pSize |
| 28 | + - Pointer to the buffers size. |
| 29 | + * - pMLDSAState |
| 30 | + - Pointer to the initialized ML-DSA context |
| 31 | + |
| 32 | +Description |
| 33 | +----------- |
| 34 | + |
| 35 | +``ippsMLDSA_KeyGenBufferGetSize`` queries the size for working buffer required for the |
| 36 | +``ippsMLDSA_KeyGen`` function. |
| 37 | + |
| 38 | +``ippsMLDSA_SignBufferGetSize`` queries the size for working buffer required for the |
| 39 | +``ippsMLDSA_Sign`` function. |
| 40 | + |
| 41 | +``ippsMLDSA_VerifyBufferGetSize`` queries the size for working buffer required for the |
| 42 | +``ippsMLDSA_Verify`` function. |
| 43 | + |
| 44 | +Allocated memory should be passed directly to the processing API. |
| 45 | + |
| 46 | +.. note:: |
| 47 | + |
| 48 | + .. rubric:: Important |
| 49 | + :class: NoteTipHead |
| 50 | + |
| 51 | + The API family is supported in experimental mode. To use the functions, users need to define |
| 52 | + the ``IPPCP_PREVIEW_ML_DSA`` macro before including the ``ippcp.h`` header file. See |
| 53 | + :ref:`Preview Features <experimental>` for more details. |
| 54 | + |
| 55 | +Return Values |
| 56 | +------------- |
| 57 | + |
| 58 | +.. list-table:: |
| 59 | + :header-rows: 0 |
| 60 | + |
| 61 | + * - ippStsNoErr |
| 62 | + - Indicates no error. Any other value indicates an error or warning. |
| 63 | + * - ippStsNullPtrErr |
| 64 | + - ``pSize`` or ``pMLDSAState`` are ``NULL`` pointers. |
| 65 | + * - ippStsContextMatchErr |
| 66 | + - ``pMLDSAState`` was not initialized. |
0 commit comments