-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsecurity-utils.html
More file actions
289 lines (266 loc) · 17 KB
/
security-utils.html
File metadata and controls
289 lines (266 loc) · 17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TI Tools - Key Configuration Tool</title>
<link rel="stylesheet" href="style.css">
<script src="navbar.js"></script>
</head>
<body>
<!-- Navigation bar loaded by navbar.js -->
<div class="container">
<header>
<h1>TI Tools</h1>
<p class="subtitle">Key Configuration Tool for Keywriter-Lite</p>
<div class="header-links">
<a href="index.html" class="doc-link">
← Back to Tools
</a>
<a href="https://downloads.ti.com/tisci/esd/latest/6_topic_user_guides/key_writer_lite.html"
target="_blank"
rel="noopener noreferrer"
class="doc-link">
View Keywriter-Lite Documentation
</a>
</div>
</header>
<main>
<section class="info-section">
<div class="experimental-warning">
<h3>🧪 Experimental Web Tool</h3>
<p><strong>This is an experimental web-based implementation of the TI Key Configuration Tool.</strong></p>
<p>For production use, please use the official Python tool from Texas Instruments:</p>
<p><a href="https://github.com/TexasInstruments/security-utils/tree/release" target="_blank" rel="noopener noreferrer">
https://github.com/TexasInstruments/security-utils/tree/release
</a></p>
<p>This web tool is useful for learning, planning configurations, and generating JSON files that can be loaded into the official Python tool.</p>
</div>
<div class="disclaimer-box">
<h3>⚠️ Disclaimer</h3>
<p>This Key configuration tool is provided solely for reference purposes.</p>
<p>The output generated by this tool should be thoroughly validated in a test environment before being applied to production devices.</p>
<p>Texas Instruments makes no warranty regarding the accuracy, completeness, or suitability of the generated configurations for any particular purpose. The user assumes full responsibility for the verification and validation of all generated key material and configurations.</p>
<p><strong>Improper use of this tool may result in permanent device configuration that cannot be reversed due to the one-time programmable (OTP) nature of the target memory.</strong></p>
<p>This tool is not a substitute for comprehensive security planning and risk assessment. Users should consult the complete product documentation and security best practices when implementing security features in production environments.</p>
</div>
</section>
<section class="input-section">
<h2>Configuration Options</h2>
<div class="config-group">
<label for="deviceSelect">Device:</label>
<select id="deviceSelect">
<option value="am62lx">AM62Lx</option>
</select>
</div>
<div class="config-group">
<label for="cmdIdSelect">Command ID:</label>
<select id="cmdIdSelect">
<option value="one-shot">One-Shot (0)</option>
<option value="multi-shot">Multi-Shot (1)</option>
<option value="smpkh">SMPKH (2)</option>
<option value="bmpkh">BMPKH (3)</option>
<option value="key-cnt">Key Count (4)</option>
<option value="key-rev">Key Revision (5)</option>
<option value="sbl-swrev">SBL Software Revision (6)</option>
<option value="sysfw-swrev">SYSFW Software Revision (7)</option>
<option value="brdcfg-swrev">BoardConfig Software Revision (8)</option>
<option value="msv">Model Specific Value (9)</option>
<option value="jtag-disable">JTAG Disable (10)</option>
<option value="boot-mode">Boot Mode (11)</option>
<option value="ext-otp">Extended OTP (12)</option>
</select>
</div>
<!-- MPK Options -->
<div class="config-group" id="mpkOptsGroup">
<h3>MPK Options</h3>
<label for="mpkOpts">MPK Options (10-bit hex, reserved for future use - use 0x000):</label>
<input type="text" id="mpkOpts" placeholder="0x000" value="0x000" maxlength="5">
</div>
<!-- SMPKH -->
<div class="config-group" id="smpkhGroup" style="display: none;">
<h3>SMPKH (Secure MPK Hash)</h3>
<label for="smpkhValue">SMPKH Value (512-bit hex - 128 hex characters):</label>
<textarea id="smpkhValue" rows="4" placeholder="Enter 128 hex characters or load from public key file"></textarea>
<button id="loadSmpkhBtn" class="secondary">Load from Public Key File</button>
<input type="file" id="smpkhFileInput" accept=".der" style="display: none;">
<div class="checkbox-group">
<label><input type="checkbox" id="smpkhEnable" checked> Enable</label>
<label><input type="checkbox" id="smpkhWrite"> Write</label>
<label><input type="checkbox" id="smpkhWriteProt"> Write Protect</label>
<label><input type="checkbox" id="smpkhOverride"> Override</label>
</div>
</div>
<!-- BMPKH -->
<div class="config-group" id="bmpkhGroup" style="display: none;">
<h3>BMPKH (Backup MPK Hash)</h3>
<label for="bmpkhValue">BMPKH Value (512-bit hex - 128 hex characters):</label>
<textarea id="bmpkhValue" rows="4" placeholder="Enter 128 hex characters or load from public key file"></textarea>
<button id="loadBmpkhBtn" class="secondary">Load from Public Key File</button>
<input type="file" id="bmpkhFileInput" accept=".der" style="display: none;">
<div class="checkbox-group">
<label><input type="checkbox" id="bmpkhEnable" checked> Enable</label>
<label><input type="checkbox" id="bmpkhWrite"> Write</label>
<label><input type="checkbox" id="bmpkhWriteProt"> Write Protect</label>
<label><input type="checkbox" id="bmpkhOverride"> Override</label>
</div>
</div>
<!-- Key Count -->
<div class="config-group" id="keyCntGroup" style="display: none;">
<h3>Key Count</h3>
<label for="keyCntValue">Key Count (0-255):</label>
<input type="number" id="keyCntValue" min="0" max="255" value="0">
<div class="checkbox-group">
<label><input type="checkbox" id="keyCntEnable" checked> Enable</label>
<label><input type="checkbox" id="keyCntWrite"> Write</label>
<label><input type="checkbox" id="keyCntWriteProt"> Write Protect</label>
<label><input type="checkbox" id="keyCntOverride"> Override</label>
</div>
</div>
<!-- Key Revision -->
<div class="config-group" id="keyRevGroup" style="display: none;">
<h3>Key Revision</h3>
<label for="keyRevValue">Key Revision (0-255):</label>
<input type="number" id="keyRevValue" min="0" max="255" value="0">
<div class="checkbox-group">
<label><input type="checkbox" id="keyRevEnable" checked> Enable</label>
<label><input type="checkbox" id="keyRevWrite"> Write</label>
<label><input type="checkbox" id="keyRevWriteProt"> Write Protect</label>
<label><input type="checkbox" id="keyRevOverride"> Override</label>
</div>
</div>
<!-- SBL Software Revision -->
<div class="config-group" id="sblSwrevGroup" style="display: none;">
<h3>SBL Software Revision</h3>
<label for="sblSwrevValue">SBL Software Revision (0-255):</label>
<input type="number" id="sblSwrevValue" min="0" max="255" value="0">
<div class="checkbox-group">
<label><input type="checkbox" id="sblSwrevEnable" checked> Enable</label>
<label><input type="checkbox" id="sblSwrevWrite"> Write</label>
<label><input type="checkbox" id="sblSwrevWriteProt"> Write Protect</label>
<label><input type="checkbox" id="sblSwrevOverride"> Override</label>
</div>
</div>
<!-- SYSFW Software Revision -->
<div class="config-group" id="sysfwSwrevGroup" style="display: none;">
<h3>SYSFW Software Revision</h3>
<label for="sysfwSwrevValue">SYSFW Software Revision (0-255):</label>
<input type="number" id="sysfwSwrevValue" min="0" max="255" value="0">
<div class="checkbox-group">
<label><input type="checkbox" id="sysfwSwrevEnable" checked> Enable</label>
<label><input type="checkbox" id="sysfwSwrevWrite"> Write</label>
<label><input type="checkbox" id="sysfwSwrevWriteProt"> Write Protect</label>
<label><input type="checkbox" id="sysfwSwrevOverride"> Override</label>
</div>
</div>
<!-- BoardConfig Software Revision -->
<div class="config-group" id="brdcfgSwrevGroup" style="display: none;">
<h3>BoardConfig Software Revision</h3>
<label for="brdcfgSwrevValue">BoardConfig Software Revision (0-255):</label>
<input type="number" id="brdcfgSwrevValue" min="0" max="255" value="0">
<div class="checkbox-group">
<label><input type="checkbox" id="brdcfgSwrevEnable" checked> Enable</label>
<label><input type="checkbox" id="brdcfgSwrevWrite"> Write</label>
<label><input type="checkbox" id="brdcfgSwrevWriteProt"> Write Protect</label>
<label><input type="checkbox" id="brdcfgSwrevOverride"> Override</label>
</div>
</div>
<!-- Model Specific Value -->
<div class="config-group" id="msvGroup" style="display: none;">
<h3>Model Specific Value (MSV)</h3>
<label for="msvValue">MSV (20-bit hex - 5 hex characters):</label>
<input type="text" id="msvValue" placeholder="0x00000" maxlength="7">
<div class="checkbox-group">
<label><input type="checkbox" id="msvEnable" checked> Enable</label>
<label><input type="checkbox" id="msvWrite"> Write</label>
<label><input type="checkbox" id="msvWriteProt"> Write Protect</label>
<label><input type="checkbox" id="msvOverride"> Override</label>
</div>
</div>
<!-- JTAG Disable -->
<div class="config-group" id="jtagDisableGroup" style="display: none;">
<h3>JTAG Disable</h3>
<p>Value is automatically set based on enable flag state.</p>
<div class="checkbox-group">
<label><input type="checkbox" id="jtagDisableEnable" checked> Enable</label>
<label><input type="checkbox" id="jtagDisableWrite"> Write</label>
<label><input type="checkbox" id="jtagDisableWriteProt"> Write Protect</label>
<label><input type="checkbox" id="jtagDisableOverride"> Override</label>
</div>
</div>
<!-- Boot Mode -->
<div class="config-group" id="bootModeGroup" style="display: none;">
<h3>Boot Mode</h3>
<label for="bootModeFuseIdx">Fuse Index (0-31):</label>
<input type="number" id="bootModeFuseIdx" min="0" max="31" value="0">
<label for="bootModeValue">Boot Mode Value (25-bit hex - up to 7 hex characters):</label>
<input type="text" id="bootModeValue" placeholder="0x0000000" maxlength="9">
<div class="checkbox-group">
<label><input type="checkbox" id="bootModeEnable" checked> Enable</label>
<label><input type="checkbox" id="bootModeWrite"> Write</label>
<label><input type="checkbox" id="bootModeWriteProt"> Write Protect</label>
<label><input type="checkbox" id="bootModeOverride"> Override</label>
</div>
</div>
<!-- Extended OTP -->
<div class="config-group" id="extOtpGroup" style="display: none;">
<h3>Extended OTP</h3>
<label for="extOtpOffset">Offset (in bits):</label>
<input type="number" id="extOtpOffset" min="0" value="0">
<label for="extOtpSize">Size (number of bits):</label>
<input type="number" id="extOtpSize" min="0" value="0">
<label for="extOtpData">Data (hex):</label>
<textarea id="extOtpData" rows="4" placeholder="Enter hex data"></textarea>
<label for="extOtpWpFlags">Write Protect Flags (64-bit hex):</label>
<input type="text" id="extOtpWpFlags" placeholder="0x0000000000000000" maxlength="18">
<label for="extOtpRpFlags">Read Protect Flags (64-bit hex):</label>
<input type="text" id="extOtpRpFlags" placeholder="0x0000000000000000" maxlength="18">
<div class="checkbox-group">
<label><input type="checkbox" id="extOtpEnable" checked> Enable</label>
<label><input type="checkbox" id="extOtpWrite"> Write</label>
<label><input type="checkbox" id="extOtpOverride"> Override</label>
</div>
</div>
<div class="button-group">
<button id="generateBtn">Generate Blob</button>
<button id="generateCBtn" class="secondary">Generate C File</button>
<button id="saveConfigBtn" class="secondary">Save Configuration</button>
<button id="loadConfigBtn" class="secondary">Load Configuration</button>
<input type="file" id="configFileInput" accept=".json" style="display: none;">
</div>
</section>
<section class="results-section" id="resultsSection" style="display: none;">
<h2>Generated Output</h2>
<div id="resultsContainer"></div>
</section>
<section class="info-section">
<h2>About This Tool</h2>
<p>
This tool generates blobs for programming keys using the keywriter-lite feature.
The keywriter-lite feature is currently available only on AM62Lx devices.
</p>
<p>
Generated binary files can be used as input to the U-Boot prompt as described in the
<a href="https://software-dl.ti.com/processor-sdk-linux/esd/AM62LX/latest/exports/docs/linux/Foundational_Components/U-Boot/UG-Key-Writer-Lite.html"
target="_blank"
rel="noopener noreferrer">
U-Boot Keywriter-Lite User Guide
</a>.
</p>
<h3>Features</h3>
<ul>
<li>Generate keywriter-lite blob for all command modes</li>
<li>Generate a C file with the configured keys for review</li>
<li>Save and restore progress via JSON configuration files</li>
<li>Real-time data validation</li>
<li>Support for MPK hashes, key counts, software revisions, and more</li>
</ul>
</section>
</main>
<footer>
<p>TI Tools | Key Configuration Tool for Keywriter-Lite</p>
</footer>
</div>
<script src="security-utils.js"></script>
</body>
</html>