<s>
QARMA	B-Algorithm
(	O
from	O
Qualcomm	O
ARM	O
Authenticator	O
)	O
is	O
a	O
lightweight	O
tweakable	O
block	O
cipher	O
primarily	O
known	O
for	O
its	O
use	O
in	O
the	O
ARMv8	O
architecture	O
for	O
protection	O
of	O
software	O
as	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
for	O
the	O
Pointer	O
Authentication	O
Code	O
.	O
</s>
<s>
Two	O
versions	O
of	O
QARMA	B-Algorithm
are	O
defined	O
:	O
QARMA-64	O
(	O
64-bit	O
block	O
size	O
with	O
a	O
128-bit	O
encryption	O
key	O
)	O
and	O
QARMA-128	O
(	O
128-bit	O
block	O
size	O
with	O
a	O
256-bit	O
key	O
)	O
.	O
</s>
<s>
The	O
design	O
of	O
the	O
QARMA	B-Algorithm
was	O
influenced	O
by	O
PRINCE	B-Algorithm
and	O
MANTIS	O
.	O
</s>
<s>
QARMA	B-Algorithm
is	O
an	O
Even-Mansour	B-Algorithm
cipher	I-Algorithm
using	O
three	O
stages	O
,	O
with	O
whitening	B-Algorithm
keys	O
w0	O
and	O
w1	O
XORed	O
in	O
between	O
:	O
</s>
<s>
permutation	O
F	O
is	O
using	O
core	O
key	O
k0	O
and	O
parameterized	O
by	O
a	O
tweak	O
T	O
.	O
It	O
has	O
r	O
rounds	O
inside	O
(	O
r	O
=	O
7	O
for	O
QARMA-64	O
,	O
r	O
=	O
11	O
for	O
QARMA-128	O
)	O
;	O
</s>
<s>
α	O
here	O
is	O
a	O
special	O
constant	O
and	O
Q	O
a	O
special	O
involutary	B-Algorithm
matrix	I-Algorithm
.	O
</s>
<s>
This	O
construct	O
is	O
similar	O
to	O
the	O
alpha	B-Algorithm
reflection	I-Algorithm
in	O
PRINCE	B-Algorithm
.	O
</s>
<s>
The	O
data	O
is	O
split	O
into	O
16	O
cells	O
(	O
4-bit	O
nibbles	O
for	O
QARMA-64	O
,	O
8-bit	O
bytes	B-Application
for	O
QARMA-128	O
)	O
.	O
</s>
<s>
is	O
ShuffleCells	O
,	O
a	O
MIDORI	B-Operating_System
permutation	O
of	O
cells	O
( [	O
0	O
,	O
11	O
,	O
6	O
,	O
13	O
,	O
10	O
,	O
1	O
,	O
12	O
,	O
7	O
,	O
5	O
,	O
14	O
,	O
3	O
,	O
8	O
,	O
15	O
,	O
4	O
,	O
9	O
,	O
2 ]	O
)	O
;	O
</s>
<s>
is	O
SubCells	O
:	O
each	O
cell	O
is	O
transformed	O
using	O
an	O
S-box	B-Algorithm
.	O
</s>
<s>
is	O
an	O
LFSR	B-Architecture
applied	O
to	O
each	O
of	O
the	O
cells	O
with	O
numbers	O
[	O
0	O
,	O
1	O
,	O
3	O
,	O
4	O
,	O
8	O
,	O
11	O
,	O
13 ]	O
.	O
</s>
<s>
For	O
QARMA-64	O
,	O
the	O
LFSR	B-Architecture
is	O
(	O
b3	O
,	O
b2	O
,	O
b1	O
,	O
b0	O
)	O
⇒	O
(	O
b0	O
+	O
b1	O
,	O
b3	O
,	O
b2	O
,	O
b1	O
)	O
,	O
for	O
QARMA-128	O
,	O
(	O
b7	O
,	O
b6	O
,	O
...	O
,	O
b0	O
)	O
⇒	O
(	O
b0	O
+	O
b2	O
,	O
b7	O
,	O
b6	O
,	O
...	O
,	O
b1	O
)	O
,	O
</s>
<s>
Central	O
rounds	O
,	O
in	O
addition	O
to	O
two	O
rounds	O
(	O
and	O
)	O
,	O
include	O
multiplication	O
of	O
the	O
state	O
by	O
an	O
involutary	B-Algorithm
matrix	I-Algorithm
Q	O
.	O
</s>
