Skip to content

Commit

Permalink
Fix some decryption variants
Browse files Browse the repository at this point in the history
  • Loading branch information
hanno-becker committed Jul 12, 2024
1 parent 5decfef commit 43b8f10
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ Lremainder_3_start:
aes_full_block aes_st, plain, res
str res_q, [output, #(0*16)]

load_htable_34
load_htable_3
ghash_init_0 plain, Ht3, Ht34, tag

ldr plain_q, [input, #(1*16)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,22 +383,20 @@ tag_q .req q30
load_h12 Ht12, Ht12q
.endm

.macro load_htable_1
load_h1 Ht1, Ht1q
load_h12 Ht12, Ht12q
.endm

.macro load_htable_34
load_h3 Ht3, Ht3q
load_h4 Ht4, Ht4q
load_h34 Ht34, Ht34q
.endm

.macro load_htable_56
load_h5 Ht5, Ht5q
load_h6 Ht6, Ht6q
load_h56 Ht56, Ht56q
.endm

.macro load_htable_78
load_h7 Ht7, Ht7q
load_h8 Ht8, Ht8q
load_h78 Ht78, Ht78q
.macro load_htable_3
load_h3 Ht3, Ht3q
load_h34 Ht34, Ht34q
.endm

/********************************************************************/
Expand Down Expand Up @@ -634,7 +632,7 @@ Lremainder_3_start:
str res_q, [output, #(1*16)]

ghash_acc_1 plain, Ht2, Ht12
load_htable_34
load_htable_3

ldr plain_q, [input, #(0*16)]
aes_full_block aes_st, plain, res, 0
Expand Down Expand Up @@ -666,7 +664,7 @@ Lremainder_2_end:
b Lend

Lremainder_1_start:
load_htable_12
load_htable_1

ldr plain_q, [input, #(0*16)]
aes_full_block aes_st, plain, res, 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ Lremainder_3_start:
aes_full_block aes_st, plain, res
str res_q, [output, #(0*16)]

load_htable_34
load_htable_3
ghash_init_0 plain, Ht3, Ht34, tag

ldr plain_q, [input, #(1*16)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,22 +392,20 @@ tag_q .req q30
load_h12 Ht12, Ht12q
.endm

.macro load_htable_1
load_h1 Ht1, Ht1q
load_h12 Ht12, Ht12q
.endm

.macro load_htable_34
load_h3 Ht3, Ht3q
load_h4 Ht4, Ht4q
load_h34 Ht34, Ht34q
.endm

.macro load_htable_56
load_h5 Ht5, Ht5q
load_h6 Ht6, Ht6q
load_h56 Ht56, Ht56q
.endm

.macro load_htable_78
load_h7 Ht7, Ht7q
load_h8 Ht8, Ht8q
load_h78 Ht78, Ht78q
.macro load_htable_3
load_h3 Ht3, Ht3q
load_h34 Ht34, Ht34q
.endm

/********************************************************************/
Expand Down Expand Up @@ -643,7 +641,7 @@ Lremainder_3_start:
str res_q, [output, #(1*16)]

ghash_acc_1 plain, Ht2, Ht12
load_htable_34
load_htable_3

ldr plain_q, [input, #(0*16)]
aes_full_block aes_st, plain, res, 0
Expand Down Expand Up @@ -675,7 +673,7 @@ Lremainder_2_end:
b Lend

Lremainder_1_start:
load_htable_12
load_htable_1

ldr plain_q, [input, #(0*16)]
aes_full_block aes_st, plain, res, 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ Lremainder_3_start:
aes_full_block aes_st, plain, res
str res_q, [output, #(0*16)]

load_htable_34
load_htable_3
ghash_init_0 plain, Ht3, Ht34, tag

ldr plain_q, [input, #(1*16)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,22 +399,20 @@ tag_q .req q30
load_h12 Ht12, Ht12q
.endm

.macro load_htable_1
load_h1 Ht1, Ht1q
load_h12 Ht12, Ht12q
.endm

.macro load_htable_34
load_h3 Ht3, Ht3q
load_h4 Ht4, Ht4q
load_h34 Ht34, Ht34q
.endm

.macro load_htable_56
load_h5 Ht5, Ht5q
load_h6 Ht6, Ht6q
load_h56 Ht56, Ht56q
.endm

.macro load_htable_78
load_h7 Ht7, Ht7q
load_h8 Ht8, Ht8q
load_h78 Ht78, Ht78q
.macro load_htable_3
load_h3 Ht3, Ht3q
load_h34 Ht34, Ht34q
.endm

/********************************************************************/
Expand Down Expand Up @@ -650,7 +648,7 @@ Lremainder_3_start:
str res_q, [output, #(1*16)]

ghash_acc_1 plain, Ht2, Ht12
load_htable_34
load_htable_3

ldr plain_q, [input, #(0*16)]
aes_full_block aes_st, plain, res, 0
Expand Down Expand Up @@ -682,7 +680,7 @@ Lremainder_2_end:
b Lend

Lremainder_1_start:
load_htable_12
load_htable_1

ldr plain_q, [input, #(0*16)]
aes_full_block aes_st, plain, res, 0
Expand Down

0 comments on commit 43b8f10

Please sign in to comment.