blob: 3926f66476d2b03118e75b9596645493aa4406e8 [file] [log] [blame]
Nik Dewally6fd2f992024-07-01 13:53:23 +01001################
2Source Structure
3################
4
Nik Dewally6fd2f992024-07-01 13:53:23 +01005.. toctree::
6 :maxdepth: 1
7 :glob:
8
9 *
10
Nik Dewally3a98fe32024-07-09 16:30:17 +010011*************
12Code Overview
13*************
14To help understand the code, below is a C++-class hierarchy used in this code
15base. They are explained further in the documents in their respective
16directories, so the file names where the classes are defined is listed below (this,
17very roughly in order of functional interactions, of chronological usage during
18execution, and of most-to-least importance):
19
20.. code-block:: bash
21
22 template_line ./template/template_line.hpp
23 sst_template_line ./template/template_line.hpp
24 read_sst_template_line ./template/sst_template_line.hpp
25 remove_sst_template_line ./template/sst_template_line.hpp
26 set_sst_template_line ./template/sst_template_line.hpp
27 policy_template_line ./template/template_line.hpp
28 read_policy_template_line ./template/crypto_template_line.hpp
29 set_policy_template_line ./template/crypto_template_line.hpp
30 key_template_line ./template/template_line.hpp
31 read_key_template_line ./template/crypto_template_line.hpp
32 remove_key_template_line ./template/crypto_template_line.hpp
33 set_key_template_line ./template/crypto_template_line.hpp
34 security_template_line ./template/template_line.hpp
35 security_hash_template_line ./template/secure_template_line.hpp
36
37 psa_call ./calls/psa_call.hpp
38 crypto_call ./calls/psa_call.hpp
39 policy_call ./calls/crypto_call.hpp
40 init_policy_call ./calls/crypto_call.hpp
41 reset_policy_call ./calls/crypto_call.hpp
42 add_policy_usage_call ./calls/crypto_call.hpp
43 set_policy_lifetime_call ./calls/crypto_call.hpp
44 set_policy_type_call ./calls/crypto_call.hpp
45 set_policy_algorithm_call ./calls/crypto_call.hpp
46 set_policy_usage_call ./calls/crypto_call.hpp
47 get_policy_lifetime_call ./calls/crypto_call.hpp
48 get_policy_type_call ./calls/crypto_call.hpp
49 get_policy_algorithm_call ./calls/crypto_call.hpp
50 get_policy_usage_call ./calls/crypto_call.hpp
51 get_policy_size_call ./calls/crypto_call.hpp
52 get_policy_call ./calls/crypto_call.hpp
53 key_call ./calls/crypto_call.hpp
54 generate_key_call ./calls/crypto_call.hpp
55 create_key_call ./calls/crypto_call.hpp
56 copy_key_call ./calls/crypto_call.hpp
57 read_key_data_call ./calls/crypto_call.hpp
58 remove_key_call ./calls/crypto_call.hpp
59 sst_call ./calls/psa_call.hpp
60 sst_remove_call ./calls/sst_call.hpp
61 sst_get_call ./calls/sst_call.hpp
62 sst_set_call ./calls/sst_call.hpp
63 security_call ./calls/psa_call.hpp
64 hash_call ./calls/security_call.hpp
65
66 boilerplate ./boilerplate/boilerplate.hpp
67
68 psa_asset ./assets/psa_asset.hpp
69 crypto_asset ./assets/crypto_asset.hpp
70 policy_asset ./assets/crypto_asset.hpp
71 key_asset ./assets/crypto_asset.hpp
72 sst_asset ./assets/sst_asset.hpp
73
74 tf_fuzz_info ./tf_fuzz.hpp
75
76 variables ./utility/variables.hpp
77 crc32 ./utility/compute.hpp
78
79 gibberish ./utility/gibberish.hpp
80
81 expect_info ./utility/data_blocks.hpp
82 set_data_info ./utility/data_blocks.hpp
83 asset_name_id_info ./utility/data_blocks.hpp
84
85
86TF-Fuzz now has better-organized management of variables in the generated code.
87In particular, it maintains a list of variables named in the test template, and
88implicit in the code, notably variables assets are ``read`` into. It also now has
89completely separate execution phases to parse the test template, simulate the
90sequence of PSA calls generated, and write out the expected results. That
91simulation is only in enough detail to predict expected results. Since TF-Fuzz
92currently mostly addresses only SST calls, that simulation is very simple in
93nature -- just tracking data movement.
94
Nik Dewally6fd2f992024-07-01 13:53:23 +010095--------------
96
97*Copyright (c) 2024, Arm Limited. All rights reserved.*