Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8c4db18
Merge pull request #53 from pbaekgaard/49-code-prepare-some-experimen…
pbaekgaard Mar 11, 2026
2078d2d
some initial stuff for interpreter. it already can do quite some stuff
pbaekgaard Feb 26, 2026
1c56312
pretty print fixes
pbaekgaard Feb 26, 2026
b4b0e7b
updates
pbaekgaard Feb 26, 2026
8b71bb8
perchance str works?
pbaekgaard Feb 26, 2026
837ad4f
progress
pbaekgaard Mar 1, 2026
0035748
udpates
pbaekgaard Mar 3, 2026
1b083ce
exec b og exec add
Aasmundur Mar 5, 2026
4e0dd1b
adds compiled tests files for while loops
pbaekgaard Mar 5, 2026
b43592f
test for the qemu vs interpreter status codes
Aasmundur Mar 5, 2026
b014c0f
stuff
Aasmundur Mar 5, 2026
5ff2aaa
pooshe
pbaekgaard Mar 5, 2026
b8c9a4c
stuff
Aasmundur Mar 5, 2026
5e0488c
some stuff i tried, progress i think
pbaekgaard Mar 5, 2026
2fefced
fixed
pbaekgaard Mar 6, 2026
c2083dc
infinite loop detection
pbaekgaard Mar 6, 2026
241de55
better argument handling
pbaekgaard Mar 6, 2026
dc14467
main.asm
pbaekgaard Mar 10, 2026
054702a
added default value for compiler output
pbaekgaard Mar 11, 2026
f2d372b
crt-rsa works? now we just need prints maybe?
pbaekgaard Mar 11, 2026
4670c4a
prints work, yippiiiiiie!
pbaekgaard Mar 11, 2026
c788b1a
more than one print
pbaekgaard Mar 11, 2026
b783dae
restructuring
pbaekgaard Mar 11, 2026
67e5e86
testing framework looks great!
pbaekgaard Mar 11, 2026
575afdc
git ignore stuff
pbaekgaard Mar 11, 2026
b745b92
Merge pull request #54 from pbaekgaard/52-code-setup-python-experimen…
Aasmundur Mar 13, 2026
6002d7d
tested formatter teehee
Aasmundur Mar 16, 2026
1b2f7e7
merge origin/master into 48-etc
Aasmundur Mar 16, 2026
bef7441
Pure Python Experimentation Setup, gotta do something else that that …
Aasmundur Mar 16, 2026
8b409b1
added minimc as submodule
pbaekgaard Mar 20, 2026
a108d7a
changed to sqlite3 output!
pbaekgaard Mar 20, 2026
a198498
fdjlsa
pbaekgaard Mar 24, 2026
2459650
added new fields to db with information about injections (for experim…
Aasmundur Mar 25, 2026
f7ad04d
step counter done
pbaekgaard Mar 26, 2026
8fa1511
fixed tests
pbaekgaard Mar 26, 2026
8c0ed38
updated ci
pbaekgaard Mar 26, 2026
ee55304
qemu stuff for ci
pbaekgaard Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 29 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,57 @@ env:
CARGO_TERM_COLOR: always

jobs:
# This job handles all testing
test-compiler:
# Now we split the builds into separate jobs
build-compiler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# ... (insert your cache step here) ...

- name: Compiler Tests
- name: Install ARM tools
run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi qemu-user

- name: Build Compiler
working-directory: ./compiler
run: cargo test
test-interpreter:
run: cargo build --release

build-interpreter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# ... (insert your cache step here) ...

- name: Interpreter Tests
- name: Install ARM tools
run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi qemu-user

- name: Build Interpreter
working-directory: ./interpreter
run: cargo test
run: cargo build --release

# Now we split the builds into separate jobs
build-compiler:
# This job handles all testing
test-compiler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# ... (insert your cache step here) ...

- name: Build Compiler
- name: Install ARM tools
run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi qemu-user

- name: Compiler Tests
working-directory: ./compiler
run: cargo build --release

build-interpreter:
run: cargo test
test-interpreter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# ... (insert your cache step here) ...

- name: Build Interpreter
- name: Install ARM tools
run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi qemu-user

- name: Interpreter Tests
working-directory: ./interpreter
run: cargo build --release
run: cargo test

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
/testing/bin
/testing/artifacts
/testing/src/__pycache__
/testing/[0-9]*-*/
/testing/hardened.asm
/testing/out.asm
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "minimc"]
path = minimc
url = https://github.com/dannybpoulsen/minimc
2 changes: 1 addition & 1 deletion compiler/fissc/crt-rsa.trv
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func main() -> Integer {

g_sign = tmp;

print("g_sign herro = ", 1337);
print("g_sign = ", g_sign);
print("g_countermeasure: ", g_countermeasure);

return g_sign;
Expand Down
59 changes: 59 additions & 0 deletions compiler/fissc/verifypin.trv
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
func main() -> Integer {
let ptc : Integer = 3;
let authenticated : Integer = 0;
let cardPin1 : Integer = 1;
let cardPin2 : Integer = 2;
let cardPin3 : Integer = 3;
let cardPin4 : Integer = 4;
let userPin1 : Integer = 0;
let userPin2 : Integer = 0;
let userPin3 : Integer = 0;
let userPin4 : Integer = 0;

authenticated = 0;

if ptc > 0 then {
let pinsEqual : Integer = 1;
if userPin1 != cardPin1 then {
pinsEqual = 0;
}
else {
pinsEqual = 1;
}

if userPin2 != cardPin2 then {
pinsEqual = 0;
}
else {
pinsEqual = 1;
}

if userPin3 != cardPin3 then {
pinsEqual = 0;
}
else {
pinsEqual = 1;
}

if userPin4 != cardPin4 then {
pinsEqual = 0;
}
else {
pinsEqual = 1;
}

if pinsEqual == 1 then {
ptc = 3;
authenticated = 1;
} else {
ptc = ptc - 1;
}
}
else {
let x : Integer = 1;
}
print("g_authenticated: ", authenticated);
print("g_ptc: ", ptc);

return authenticated;
}
Loading
Loading