| /* Copyright lowRISC contributors. */ |
| /* Licensed under the Apache License, Version 2.0, see LICENSE for details. */ |
| /* SPDX-License-Identifier: Apache-2.0 */ |
| * Standalone elliptic curve P-256 scalar multiplication test |
| * Uses OTBN ECC P-256 lib to perform a scalar multiplication with a valid |
| * example curve point and an example scalar. Both scalar and coordinates of |
| * the curve point are contained in the .data section below. |
| * x and y cordinates of the resulting curve points are copied to wide |
| * registers. See comment at the end of the file for expected values. |
| /* set dmem pointer to point to x-coordinate */ |
| /* set dmem pointer to point to y-coordinate */ |
| /* set dmem pointer to point to scalar k */ |
| /* set dmem pointer to point to blinding parameter */ |
| /* call scalar point multiplication routine in P-256 lib */ |
| /* copy result to wide reg file */ |
| /* random number for blinding */ |
| /* example curve point x-coordinate */ |
| /* example curve point y-coordinate */ |
| /* Expected values wide register file (w0=X, w1=Y): |
| w0 = 0x5f33d746a326640a739a9490ec15c10372869f3de675b2e85742271d18c9eb82 |
| w1 = 0xb5ebbd1e4ac99c9e3d70a862e41fe23ace6ab34f7ac9f99a4c403defb76c462d |