Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ce2b3e7
OFB final functions on x86-64 for Blowfish, Camellia, CAST5, IDEA, SE…
claude Nov 7, 2026
1dcf6b0
OFB final functions on AArch64 for Blowfish, Camellia, CAST5, IDEA, S…
claude Nov 7, 2026
b496dfa
OFB final functions on x86 for Blowfish, Camellia, CAST5, IDEA, SEED,…
claude Nov 7, 2026
7a3864b
OFB final functions on ARMv7 for Blowfish, Camellia, CAST5, IDEA, SEE…
claude Nov 7, 2026
3d79a25
OFB final functions on PPC64LE for Blowfish, Camellia, CAST5, IDEA, S…
claude Nov 7, 2026
80fec1f
OFB final functions on RISC-V for Blowfish, Camellia, CAST5, IDEA, SE…
claude Nov 7, 2026
cdeb131
OFB of seven ciphers: a partial last block by the final functions (WI…
claude Nov 7, 2026
a7618a4
AES-OFB final and CTR finals (AES, Camellia, SM4) on x86-64 (WIP: cra…
claude Nov 7, 2026
33eb97a
AES-OFB and CTR: a partial last block by the final functions (WIP: ne…
claude Nov 7, 2026
a438e74
AES-OFB and AES-CTR final functions on x86 (WIP: crates to come)
claude Nov 7, 2026
0cc3198
AES-OFB and CTR (AES, Camellia, SM4) final functions on AArch64 (WIP:…
claude Nov 7, 2026
d26f12a
AES-OFB and CTR (AES, Camellia, SM4) final functions on ARMv7 (WIP: c…
claude Nov 7, 2026
765d7b9
Camellia and SM4 CTR final functions on x86 (WIP: crates to come)
claude Nov 7, 2026
59ab43d
AES-OFB and CTR (AES, Camellia, SM4) final functions on PPC64LE (WIP:…
claude Nov 7, 2026
517af68
AES-OFB and CTR (AES, Camellia, SM4) final functions on RISC-V (WIP: …
claude Nov 7, 2026
caf30f7
Merge remote-tracking branch 'origin/main' into claude/audit-4139-cfb…
claude Nov 7, 2026
da570fc
OFB/CTR finals: one copy of each shared lemma
claude Nov 7, 2026
ddcf267
Regenerate the crates: OFB and CTR final functions on every target
claude Nov 7, 2026
df278cc
Merge remote-tracking branch 'origin/main' into claude/audit-4139-cfb…
claude Nov 7, 2026
595e6e7
Regenerate the dispatchers for the OFB and CTR final functions
claude Nov 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
130 changes: 130 additions & 0 deletions crates/verified-garbage-asm-aarch64/assembly/aes_ctr.s
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,71 @@ vg_aes_ctr_aes:
ret
.p2align 6

vg_aes_ctr_final_aes:
sub sp, sp, #80
add x6, sp, #0
str x19, [x6, #0]
str x20, [x6, #8]
str x21, [x6, #16]
str x22, [x6, #24]
str x23, [x6, #32]
str x24, [x6, #40]
str x30, [x6, #48]
str x25, [x6, #56]
add x19, x0, #0
add x20, x1, #0
add x21, x2, #0
add x24, x5, #0
add x25, x6, #0
lsr x9, x4, #4
lsl x10, x9, #4
add x22, x3, x10
sub x23, x4, x10
add x4, x9, #0
bl {vg_aes_ctr_aes}
cbz x23, 20f
movz x9, #0, lsl #0
str x9, [x25, #64]
str x9, [x25, #72]
add x0, x19, #0
add x1, x20, #0
add x2, x21, #0
add x3, x25, #64
movz x4, #1, lsl #0
add x5, x24, #0
bl {vg_aes_ctr_aes}
add x9, x25, #64
22:
ldrb w6, [x9, #0]
ldrb w7, [x22, #0]
eor x7, x7, x6
strb w7, [x22, #0]
add x9, x9, #1
add x22, x22, #1
sub x23, x23, #1
cbnz x23, 22b
b 21f
20:
21:
ldr x19, [x25, #0]
ldr x20, [x25, #8]
ldr x21, [x25, #16]
ldr x22, [x25, #24]
ldr x23, [x25, #32]
ldr x24, [x25, #40]
ldr x30, [x25, #48]
ldr x25, [x25, #56]
movz x17, #0, lsl #0
add x16, sp, #0
stp x17, x17, [x16, #0]
stp x17, x17, [x16, #16]
stp x17, x17, [x16, #32]
stp x17, x17, [x16, #48]
stp x17, x17, [x16, #64]
add sp, sp, #80
ret
.p2align 6

vg_aes_ctr:
str x19, [x5, #2064]
str x20, [x5, #2072]
Expand Down Expand Up @@ -133,3 +198,68 @@ vg_aes_ctr:
ldr x24, [x24, #2112]
ret
.p2align 6

vg_aes_ctr_final:
sub sp, sp, #80
add x6, sp, #0
str x19, [x6, #0]
str x20, [x6, #8]
str x21, [x6, #16]
str x22, [x6, #24]
str x23, [x6, #32]
str x24, [x6, #40]
str x30, [x6, #48]
str x25, [x6, #56]
add x19, x0, #0
add x20, x1, #0
add x21, x2, #0
add x24, x5, #0
add x25, x6, #0
lsr x9, x4, #4
lsl x10, x9, #4
add x22, x3, x10
sub x23, x4, x10
add x4, x9, #0
bl {vg_aes_ctr}
cbz x23, 20f
movz x9, #0, lsl #0
str x9, [x25, #64]
str x9, [x25, #72]
add x0, x19, #0
add x1, x20, #0
add x2, x21, #0
add x3, x25, #64
movz x4, #1, lsl #0
add x5, x24, #0
bl {vg_aes_ctr}
add x9, x25, #64
22:
ldrb w6, [x9, #0]
ldrb w7, [x22, #0]
eor x7, x7, x6
strb w7, [x22, #0]
add x9, x9, #1
add x22, x22, #1
sub x23, x23, #1
cbnz x23, 22b
b 21f
20:
21:
ldr x19, [x25, #0]
ldr x20, [x25, #8]
ldr x21, [x25, #16]
ldr x22, [x25, #24]
ldr x23, [x25, #32]
ldr x24, [x25, #40]
ldr x30, [x25, #48]
ldr x25, [x25, #56]
movz x17, #0, lsl #0
add x16, sp, #0
stp x17, x17, [x16, #0]
stp x17, x17, [x16, #16]
stp x17, x17, [x16, #32]
stp x17, x17, [x16, #48]
stp x17, x17, [x16, #64]
add sp, sp, #80
ret
.p2align 6
120 changes: 120 additions & 0 deletions crates/verified-garbage-asm-aarch64/assembly/aes_ofb.s
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,66 @@ vg_aes_ofb_aes:
ret
.p2align 6

vg_aes_ofb_final_aes:
sub sp, sp, #64
add x6, sp, #0
str x19, [x6, #0]
str x20, [x6, #8]
str x21, [x6, #16]
str x22, [x6, #24]
str x23, [x6, #32]
str x24, [x6, #40]
str x30, [x6, #48]
str x25, [x6, #56]
add x19, x0, #0
add x20, x1, #0
add x21, x2, #0
add x24, x5, #0
add x25, x6, #0
lsr x9, x4, #4
lsl x10, x9, #4
add x22, x3, x10
sub x23, x4, x10
add x4, x9, #0
bl {vg_aes_ofb_aes}
cbz x23, 20f
add x0, x19, #0
add x1, x20, #0
add x2, x21, #0
movz x3, #1, lsl #0
add x4, x24, #0
bl {vg_aes_encrypt_blocks_aes}
add x9, x21, #0
22:
ldrb w6, [x9, #0]
ldrb w7, [x22, #0]
eor x7, x7, x6
strb w7, [x22, #0]
add x9, x9, #1
add x22, x22, #1
sub x23, x23, #1
cbnz x23, 22b
b 21f
20:
21:
ldr x19, [x25, #0]
ldr x20, [x25, #8]
ldr x21, [x25, #16]
ldr x22, [x25, #24]
ldr x23, [x25, #32]
ldr x24, [x25, #40]
ldr x30, [x25, #48]
ldr x25, [x25, #56]
movz x17, #0, lsl #0
add x16, sp, #0
stp x17, x17, [x16, #0]
stp x17, x17, [x16, #16]
stp x17, x17, [x16, #32]
stp x17, x17, [x16, #48]
add sp, sp, #64
ret
.p2align 6

vg_aes_ofb:
str x19, [x5, #2064]
str x20, [x5, #2072]
Expand Down Expand Up @@ -95,3 +155,63 @@ vg_aes_ofb:
ldr x24, [x24, #2112]
ret
.p2align 6

vg_aes_ofb_final:
sub sp, sp, #64
add x6, sp, #0
str x19, [x6, #0]
str x20, [x6, #8]
str x21, [x6, #16]
str x22, [x6, #24]
str x23, [x6, #32]
str x24, [x6, #40]
str x30, [x6, #48]
str x25, [x6, #56]
add x19, x0, #0
add x20, x1, #0
add x21, x2, #0
add x24, x5, #0
add x25, x6, #0
lsr x9, x4, #4
lsl x10, x9, #4
add x22, x3, x10
sub x23, x4, x10
add x4, x9, #0
bl {vg_aes_ofb}
cbz x23, 20f
add x0, x19, #0
add x1, x20, #0
add x2, x21, #0
movz x3, #1, lsl #0
add x4, x24, #0
bl {vg_aes_encrypt_blocks}
add x9, x21, #0
22:
ldrb w6, [x9, #0]
ldrb w7, [x22, #0]
eor x7, x7, x6
strb w7, [x22, #0]
add x9, x9, #1
add x22, x22, #1
sub x23, x23, #1
cbnz x23, 22b
b 21f
20:
21:
ldr x19, [x25, #0]
ldr x20, [x25, #8]
ldr x21, [x25, #16]
ldr x22, [x25, #24]
ldr x23, [x25, #32]
ldr x24, [x25, #40]
ldr x30, [x25, #48]
ldr x25, [x25, #56]
movz x17, #0, lsl #0
add x16, sp, #0
stp x17, x17, [x16, #0]
stp x17, x17, [x16, #16]
stp x17, x17, [x16, #32]
stp x17, x17, [x16, #48]
add sp, sp, #64
ret
.p2align 6
Loading
Loading