-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit prototypes an implementation of a 'global' selftest, building and emulating the entire source code loaded into SLOTHY and checking that input and output behave equivalently. To use, call `slothy.global_selftest(...)` at any point during stateful SLOTHY operations. Then, the global selftest will compare the current state of the code with the original state. See ntt_kyber_123_4567 for an example.
- Loading branch information
1 parent
f6c6404
commit 0e04f48
Showing
9 changed files
with
362 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.syntax unified | ||
//.cpu cortex-m4 // llvm-mc does not like this... | ||
//.thumb // unicorn seems to get confused by this... | ||
|
||
.align 2 | ||
.global my_func | ||
// .type my_func, %function // llvm-mc does not like this... | ||
my_func: | ||
push {r4-r11, lr} | ||
|
||
start: | ||
ldr r8, [r0, #4] | ||
add r8, r2, r8 | ||
eor.w r8, r8, r3 | ||
smlabt r3, r2, r2, r8 | ||
asrs r3, r3, #1 | ||
str r3, [r0, #4] | ||
end: | ||
|
||
pop {r4-r11, pc} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.