File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,7 @@ otbn_sim_test_suite(
395395 "p256_check_public_key_x_too_large.hjson" ,
396396 "p256_check_public_key_y_too_large.hjson" ,
397397 "p256_isoncurve_valid.hjson" ,
398+ "p256_keygen_valid.hjson" ,
398399 ],
399400)
400401
Original file line number Diff line number Diff line change 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+ /**
6+ * @param[out] dmem[d0]: First share of secret key.
7+ * @param[out] dmem[d1]: Second share of secret key.
8+ * @param[out] dmem[x]: Public key x-coordinate.
9+ * @param[out] dmem[y]: Public key y-coordinate.
10+ */
11+
12+ "input": {
13+ "dmem": {
14+ "mode": "0x000005c5" # MODE_KEYGEN
15+ }
16+ }
17+ "output": {
18+ "dmem": {
19+ # Verified that (x, y) == (d0 + d1) * G
20+ "x": "0xbc17c155181376b3197b131eac726c220cdf7ab4ad947226393afc1d82372b5e"
21+ "y": "0xf00fa582f6dc92f3d9016563addf53be343e2ddf13d61a60148a10823b363b0c"
22+
23+ # BUG: the upper 64 bits are cleared incorrectly in p256_random_scalar.
24+ # bn.rshi w16, w20, w31 >> 192
25+ #
26+ # This bug is runtime-patched by ROM_EXT (PR #27679).
27+ "d0":
28+ '''
29+ 0x0000000000000000000000000000000000000000000000000000000000000000
30+ cad51b98eeb2713c8b67bf9e1701f3fac2d04d8ecf8d2a5b69240a89b4dae4e1
31+ '''
32+
33+ "d1":
34+ '''
35+ 0x0000000000000000000000000000000000000000000000009bac529d8188e972
36+ 167bff297e742904961ff21ed1bc0dcde57b792d508dd4768ae99c4d870e512b
37+ '''
38+ }
39+ }
40+ }
You can’t perform that action at this time.
0 commit comments