Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/qualification/security673/relational/evidence/gate1/3.src # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / qualification / security673 / relational / evidence / gate1 / 3.src` 43 lines ยท 875 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 2 note SC1-L: public pointers a,b; secret contents; only equality result disclosed. 3 fn compare32 a view uchar 32 b view uchar 32 to ulong 4 d = uchar 0 5 for i ulong 32 6 d = or d xor get a i get b i 7 end 8 ret shr sub ulong d 1 63 9 end 10 note SPDX-License-Identifier: Apache-2.0 11 note Concatenate after compare32.om. Test assertions are outside scanned primitive. 12 text ok "PASS L1 native: equal, every mismatch position, all256 bytes, paired unequal outputs\n" 13 fn main to int 14 a = new uchar 32 0 15 b = new uchar 32 0 16 if ne compare32 a b 1 17 ret 11 18 end 19 for p ulong 32 20 for v ulong 256 21 put a p uchar v 22 put b p uchar v 23 if ne compare32 a b 1 24 ret 12 25 end 26 put b p xor uchar v 1 27 if ne compare32 a b 0 28 ret 13 29 end 30 put a p xor uchar v 128 31 if ne compare32 a b 0 32 ret 14 33 end 34 end 35 put a p 0 36 put b p 0 37 end 38 n = write 1 ok 0 len ok 39 if ne n long len ok 40 ret 15 41 end 42 ret 0 43 end