interplane.Get Omega
Read in your language

omtls

omtls: a TLS 1.3 client (RFC 8446) written fresh in seeded Omega, for mailhand. Not audited by a cryptographer. Free (Apache-2.0).

Brought by drakestapleton

branch main Branches Tags History

omtls / src / aes.om

26 lines · 622 bytes Raw Blame History
1note omtls AES driver layer: one-block AES-128 / AES-256 encryption (FIPS 197) through the bitsliced CT core.
2note is256 false uses key bytes 0..15. The core works on four blocks; lanes 1..3 carry zeros here.
3fn ot_aes_enc1 is256 bool k view uchar 32 in view uchar 16 o edit uchar 16 to void
4rk = new ulong 240 0
5s = new ulong 64 0
6w = new ulong 64 0
7if is256
8ot_aes_k256 k rk s w
9else
10ot_aes_k128 k rk s w
11end
12for i ulong 64 unroll
13put s i 0
14end
15for i ulong 16 unroll
16put s i ulong get in i
17end
18ot_gcm_enc is256 rk s w
19for i ulong 16 unroll
20put o i ot_ct_lo8 get s i
21end
22for i ulong 240
23put rk i 0
24end
25ot_gcm_z64 s w
26end