aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / native / omega / allen / tests / tls-crypto-x25519-iter.om
| 1 | note SPDX-License-Identifier: AGPL-3.0-or-later |
| 2 | note RFC7748 section5.2 official 1000-iteration X25519 vector, separate from short fixtures. |
| 3 | note https://www.rfc-editor.org/rfc/rfc7748 ; attribution/license in tls-crypto-fixture.om. |
| 4 | text Viter "684cf59ba83309552800ef566f2f4d3c1c3887c49360e3875f2eb94d99532c51" |
| 5 | fn main to int |
| 6 | tcwipe |
| 7 | put Tcxpriv 0 9 |
| 8 | put Tcxpeer 0 9 |
| 9 | for j ulong 1000 |
| 10 | tvcheck tcx25519 1 |
| 11 | for i ulong 32 |
| 12 | put Tcxpeer i get Tcxpriv i |
| 13 | put Tcxpriv i get Tcxshare i |
| 14 | end |
| 15 | end |
| 16 | for i ulong 32 |
| 17 | p = mul i 2 |
| 18 | v = tvbyte get Viter p get Viter add p 1 |
| 19 | tvcheck eq get Tcxpriv i v 2 |
| 20 | end |
| 21 | tcwipe |
| 22 | tvscrub |
| 23 | ret 0 |
| 24 | end |