Skip to content

Commit

Permalink
Add versionadded placeholders for the new APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
athoelke committed Dec 16, 2024
1 parent 66ed971 commit 2d995d8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doc/crypto/api/library/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ See :secref:`interruptible-operations`.
.. summary::
Set the maximum number of *ops* allowed to be executed by an interruptible function in a single call.

.. versionadded:: 1.x

.. param:: uint32_t max_ops
The maximum number of ops to be executed in a single call, this can be a number from ``0`` to `PSA_IOP_MAX_OPS_UNLIMITED`, where ``0`` is obviously the least amount of work done per call.

Expand All @@ -112,6 +114,8 @@ See :secref:`interruptible-operations`.
.. summary::
Get the maximum number of *ops* allowed to be executed by an interruptible function in a single call.

.. versionadded:: 1.x

.. return:: uint32_t
Maximum number of *ops* allowed to be executed by an interruptible function in a single call.

Expand All @@ -121,7 +125,8 @@ See :secref:`interruptible-operations`.
:definition: UINT32_MAX

.. summary::

Maximum value for use with `psa_iop_set_max_ops()`.

.. versionadded:: 1.x

Using this value in a call to `psa_iop_set_max_ops()` will cause interruptible functions to complete their calculation before returning.
40 changes: 40 additions & 0 deletions doc/crypto/api/ops/signature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,8 @@ An interruptible asymmetric signature operation is used as follows:
.. summary::
The type of the state data structure for an interruptible asymmetric signature operation.

.. versionadded:: 1.x

Before calling any function on an interruptible asymmetric signature operation object, the application must initialize it by any of the following means:

* Set the object to all-bits-zero, for example:
Expand Down Expand Up @@ -868,18 +870,24 @@ An interruptible asymmetric signature operation is used as follows:
.. summary::
This macro evaluates to an initializer for an interruptible asymmetric signature operation object of type `psa_sign_iop_t`.

.. versionadded:: 1.x

.. function:: psa_sign_iop_init

.. summary::
Return an initial value for an interruptible asymmetric signature operation object.

.. versionadded:: 1.x

.. return:: psa_sign_iop_t

.. function:: psa_sign_iop_get_num_ops

.. summary::
Get the number of *ops* that an interruptible asymmetric signature operation has taken so far.

.. versionadded:: 1.x

.. param:: psa_sign_iop_t * operation
The interruptible asymmetric signature operation to inspect.

Expand All @@ -897,6 +905,8 @@ An interruptible asymmetric signature operation is used as follows:
.. summary::
Begin the setup of an interruptible asymmetric signature operation.

.. versionadded:: 1.x

.. param:: psa_sign_iop_t * operation
The interruptible asymmetric signature operation to set up. It must have been initialized as per the documentation for `psa_sign_iop_t` and not yet in use.
.. param:: psa_key_id_t key
Expand Down Expand Up @@ -952,6 +962,8 @@ An interruptible asymmetric signature operation is used as follows:
.. summary::
Finish setting up an interruptible asymmetric signature operation.

.. versionadded:: 1.x

.. param:: psa_sign_iop_t * operation
The interruptible asymmetric signature operation to use. The operation must be in the process of being set up.

Expand Down Expand Up @@ -988,6 +1000,8 @@ An interruptible asymmetric signature operation is used as follows:
.. summary::
Input a pre-computed hash to an interruptible asymmetric signature operation.

.. versionadded:: 1.x

.. param:: psa_sign_iop_t * operation
The interruptible asymmetric signature operation to use. The operation must have been set up, with no data input.
.. param:: const uint8_t * hash
Expand Down Expand Up @@ -1039,6 +1053,8 @@ An interruptible asymmetric signature operation is used as follows:
.. summary::
Add a message fragment to an interruptible asymmetric signature operation.

.. versionadded:: 1.x

.. param:: psa_sign_iop_t * operation
The interruptible asymmetric signature operation to use. The operation must have been set up, with no hash value input.
.. param:: const uint8_t * input
Expand Down Expand Up @@ -1091,6 +1107,8 @@ An interruptible asymmetric signature operation is used as follows:
.. summary::
Attempt to finish the interruptible calculation of an asymmetric signature.

.. versionadded:: 1.x

.. param:: psa_sign_iop_t * operation
The interruptible asymmetric signature operation to use. The operation must have hash or message data input, or be in the process of finishing.
.. param:: uint8_t * signature
Expand Down Expand Up @@ -1139,6 +1157,8 @@ An interruptible asymmetric signature operation is used as follows:
.. summary::
Abort an interruptible asymmetric signature operation.

.. versionadded:: 1.x

.. param:: psa_sign_iop_t * operation
The interruptible signature operation to abort.

Expand Down Expand Up @@ -1184,6 +1204,8 @@ An interruptible asymmetric verification operation is used as follows:
.. summary::
The type of the state data structure for an interruptible asymmetric verification operation.

.. versionadded:: 1.x

Before calling any function on an interruptible asymmetric verification operation object, the application must initialize it by any of the following means:

* Set the object to all-bits-zero, for example:
Expand Down Expand Up @@ -1220,18 +1242,24 @@ An interruptible asymmetric verification operation is used as follows:
.. summary::
This macro evaluates to an initializer for an interruptible asymmetric verification operation object of type `psa_verify_iop_t`.

.. versionadded:: 1.x

.. function:: psa_verify_iop_init

.. summary::
Return an initial value for an interruptible asymmetric verification operation object.

.. versionadded:: 1.x

.. return:: psa_verify_iop_t

.. function:: psa_verify_iop_get_num_ops

.. summary::
Get the number of *ops* that an interruptible asymmetric verification operation has taken so far.

.. versionadded:: 1.x

.. param:: psa_verify_iop_t * operation
The interruptible asymmetric verification operation to inspect.

Expand All @@ -1249,6 +1277,8 @@ An interruptible asymmetric verification operation is used as follows:
.. summary::
Begin the setup of an interruptible asymmetric verification operation.

.. versionadded:: 1.x

.. param:: psa_verify_iop_t * operation
The interruptible verification operation to set up. It must have been initialized as per the documentation for `psa_verify_iop_t` and not yet in use.
.. param:: psa_key_id_t key
Expand Down Expand Up @@ -1310,6 +1340,8 @@ An interruptible asymmetric verification operation is used as follows:
.. summary::
Finish setting up an interruptible asymmetric verification operation.

.. versionadded:: 1.x

.. param:: psa_verify_iop_t * operation
The interruptible verification operation to use. The operation must be in the process of being set up.

Expand Down Expand Up @@ -1347,6 +1379,8 @@ An interruptible asymmetric verification operation is used as follows:
.. summary::
Input a pre-computed hash to an interruptible asymmetric verification operation.

.. versionadded:: 1.x

.. param:: psa_verify_iop_t * operation
The interruptible verification operation to use. The operation must have been set up, with no data input.
.. param:: const uint8_t * hash
Expand Down Expand Up @@ -1398,6 +1432,8 @@ An interruptible asymmetric verification operation is used as follows:
.. summary::
Add a message fragment to an interruptible asymmetric verification operation.

.. versionadded:: 1.x

.. param:: psa_verify_iop_t * operation
The interruptible verification operation to use. The operation must have been set up, with no hash value input.
.. param:: const uint8_t * input
Expand Down Expand Up @@ -1449,6 +1485,8 @@ An interruptible asymmetric verification operation is used as follows:
.. summary::
Attempt to finish the interruptible verification of an asymmetric signature.

.. versionadded:: 1.x

.. param:: psa_verify_iop_t * operation
The interruptible verification operation to use. The operation must have hash or message data input, or be in the process of finishing.

Expand Down Expand Up @@ -1486,6 +1524,8 @@ An interruptible asymmetric verification operation is used as follows:
.. summary::
Abort an interruptible asymmetric verification operation.

.. versionadded:: 1.x

.. param:: psa_verify_iop_t * operation
The interruptible verification operation to abort.

Expand Down

0 comments on commit 2d995d8

Please sign in to comment.