Software APIs
sha3_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_SHA3_SCA_H_
6 #define OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_SCA_SHA3_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 SHA SCA operation.
13  */
14 typedef enum sha3_sca_error {
15  /**
16  * Indicates that the operation succeeded.
17  */
18  sha3ScaOk = 0,
19  /**
20  * Indicates some unspecified failure.
21  */
22  sha3ScaAborted = 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  sha3ScaOutOfRange = 2
28 } sha3_sca_error_t;
29 
30 status_t handle_sha3_sca_disable_masking(ujson_t *uj);
31 status_t handle_sha3_pentest_seed_lfsr(ujson_t *uj);
32 status_t handle_sha3_sca_fixed_message_set(ujson_t *uj);
33 status_t handle_sha3_sca_batch(ujson_t *uj);
34 status_t handle_sha3_sca_single_absorb(ujson_t *uj);
35 status_t handle_sha3_pentest_init(ujson_t *uj);
36 status_t handle_sha3_sca(ujson_t *uj);
37 
38 #endif // OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_SCA_SHA3_SCA_H_