Software APIs
kmac_sca.h
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_SCA_KMAC_SCA_H_
6 #define OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_SCA_KMAC_SCA_H_
7 
8 #include "sw/device/lib/base/status.h"
9 #include "sw/device/lib/ujson/ujson.h"
10 
11 /**
12  * The result of an KMAC SCA operation.
13  */
14 typedef enum kmac_sca_error {
15  /**
16  * Indicates that the operation succeeded.
17  */
18  kmacScaOk = 0,
19  /**
20  * Indicates some unspecified failure.
21  */
22  kmacScaAborted = 1,
23  /**
24  * Indicates that the attempted operation would attempt a read/write to an
25  * address that would go out of range.
26  */
27  kmacScaOutOfRange = 2
28 } kmac_sca_error_t;
29 
30 status_t handle_kmac_pentest_seed_lfsr(ujson_t *uj);
31 status_t handle_kmac_sca_fixed_key_set(ujson_t *uj);
32 status_t handle_kmac_sca_batch(ujson_t *uj);
33 status_t handle_kmac_sca_single_absorb(ujson_t *uj);
34 status_t handle_kmac_sca_set_key(ujson_t *uj);
35 status_t handle_kmac_pentest_init(ujson_t *uj);
36 status_t handle_kmac_sca(ujson_t *uj);
37 
38 #endif // OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_SCA_KMAC_SCA_H_