<s>
Speck	B-Algorithm
is	O
a	O
family	O
of	O
lightweight	O
block	O
ciphers	O
publicly	O
released	O
by	O
the	O
National	O
Security	O
Agency	O
(	O
NSA	O
)	O
in	O
June	O
2013	O
.	O
</s>
<s>
Speck	B-Algorithm
has	O
been	O
optimized	O
for	O
performance	O
in	O
software	O
implementations	O
,	O
while	O
its	O
sister	O
algorithm	O
,	O
Simon	B-Algorithm
,	O
has	O
been	O
optimized	O
for	O
hardware	O
implementations	O
.	O
</s>
<s>
Speck	B-Algorithm
is	O
an	O
add	O
–	O
rotate	O
–	O
xor	O
(	O
ARX	O
)	O
cipher	O
.	O
</s>
<s>
The	O
NSA	O
began	O
working	O
on	O
the	O
Simon	B-Algorithm
and	O
Speck	B-Algorithm
ciphers	O
in	O
2011	O
.	O
</s>
<s>
The	O
agency	O
anticipated	O
some	O
agencies	O
in	O
the	O
US	O
federal	O
government	O
would	O
need	O
a	O
cipher	O
that	O
would	O
operate	O
well	O
on	O
a	O
diverse	O
collection	O
of	O
Internet	B-Operating_System
of	I-Operating_System
Things	I-Operating_System
devices	O
while	O
maintaining	O
an	O
acceptable	O
level	O
of	O
security	O
.	O
</s>
<s>
Speck	B-Algorithm
supports	O
a	O
variety	O
of	O
block	O
and	O
key	O
sizes	O
.	O
</s>
<s>
The	O
key	B-Algorithm
schedule	I-Algorithm
uses	O
the	O
same	O
round	O
function	O
as	O
the	O
main	O
block	O
cipher	O
.	O
</s>
<s>
The	O
following	O
is	O
the	O
designers	O
 '	O
reference	O
implementation	O
,	O
written	O
in	O
C	B-Language
,	O
of	O
the	O
Speck	B-Algorithm
variant	O
with	O
a	O
128-bit	O
block	O
size	O
and	O
key	O
,	O
where	O
key	O
=	O
(	O
K[1]	O
,	O
K[0]	O
)	O
.	O
</s>
<s>
Note	O
that	O
this	O
code	O
computes	O
the	O
round	B-Algorithm
keys	I-Algorithm
(	O
key	B-Algorithm
schedule	I-Algorithm
)	O
on-demand	O
.	O
</s>
<s>
In	O
practice	O
,	O
as	O
with	O
other	O
block	O
ciphers	O
it	O
is	O
common	O
for	O
implementations	O
to	O
compute	O
the	O
round	B-Algorithm
keys	I-Algorithm
just	O
once	O
and	O
cache	O
them	O
,	O
rather	O
than	O
recomputing	O
them	O
for	O
every	O
block	O
encrypted	O
or	O
decrypted	O
.	O
</s>
<s>
Although	O
,	O
as	O
the	O
authors	O
point	O
out	O
,	O
"	O
Given	O
that	O
small	O
code	O
size	O
was	O
a	O
major	O
goal	O
of	O
the	O
design	O
,	O
it	O
made	O
sense	O
to	O
reuse	O
the	O
round	O
function	O
for	O
round	B-Algorithm
key	I-Algorithm
generation	O
.	O
</s>
<s>
This	O
approach	O
enables	O
on-the-fly	O
round	B-Algorithm
key	I-Algorithm
generation	O
for	O
microcontroller	O
implementations	O
,	O
using	O
just	O
the	O
round	O
function	O
code	O
,	O
very	O
little	O
ROM	O
,	O
and	O
no	O
RAM	O
beyond	O
what	O
is	O
required	O
to	O
hold	O
the	O
key	O
and	O
plaintext.	O
"	O
</s>
<s>
The	O
original	O
Speck	B-Algorithm
paper	O
does	O
not	O
explicitly	O
state	O
the	O
endianness	O
of	O
bytes	O
when	O
the	O
plaintext	O
block	O
is	O
interpreted	O
as	O
the	O
two	O
words	O
used	O
in	O
the	O
cipher	O
algorithm	O
.	O
</s>
<s>
According	O
to	O
ECRYPT	O
's	O
stream	B-Algorithm
cipher	I-Algorithm
benchmarks	O
(	O
eBASC	O
)	O
,	O
Speck	B-Algorithm
is	O
one	O
of	O
the	O
fastest	O
ciphers	O
available	O
,	O
both	O
for	O
long	O
as	O
well	O
as	O
short	O
messages	O
.	O
</s>
<s>
For	O
example	O
,	O
on	O
the	O
ARMv7	O
platform	O
,	O
Speck	B-Algorithm
is	O
about	O
3	O
times	O
faster	O
than	O
AES	B-Algorithm
.	O
</s>
<s>
When	O
implemented	O
on	O
8-bit	O
AVR	O
microcontroller	O
,	O
Speck	B-Algorithm
encryption	O
with	O
64-bit	O
blocks	O
and	O
128-bit	O
key	O
consumes	O
192	O
bytes	O
of	O
flash	B-Device
memory	I-Device
,	O
temporary	O
variables	O
consume	O
112	O
bytes	O
of	O
RAM	O
,	O
and	O
takes	O
164	O
cycles	O
to	O
encrypt	O
each	O
byte	O
in	O
the	O
block	O
.	O
</s>
<s>
Salsa20	B-Algorithm
is	O
a	O
stream	B-Algorithm
cipher	I-Algorithm
with	O
comparable	O
performance	O
,	O
but	O
it	O
is	O
difficult	O
to	O
use	O
stream	B-Algorithm
ciphers	I-Algorithm
securely	O
in	O
some	O
applications	O
where	O
block	O
ciphers	O
like	O
Speck	B-Algorithm
work	O
well	O
.	O
</s>
<s>
This	O
led	O
Google	O
to	O
add	O
an	O
implementation	O
of	O
Speck	B-Algorithm
in	O
Linux	B-Operating_System
kernel	I-Operating_System
version	O
4.17	O
,	O
planning	O
to	O
offer	O
it	O
as	O
an	O
option	O
for	O
disk	O
encryption	O
on	O
low-end	O
Android	B-Application
devices	O
that	O
would	O
otherwise	O
be	O
unencrypted	O
due	O
to	O
slow	O
AES	B-Algorithm
performance	O
on	O
processors	O
that	O
lack	O
AES	B-Algorithm
instructions	I-Algorithm
.	O
</s>
<s>
Speck	B-Algorithm
was	O
later	O
dropped	O
from	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
due	O
to	O
backlash	O
and	O
concerns	O
,	O
and	O
Google	O
switched	O
to	O
the	O
Adiantum	B-Algorithm
algorithm	I-Algorithm
instead	O
.	O
</s>
<s>
The	O
designers	O
claim	O
that	O
Speck	B-Algorithm
,	O
though	O
a	O
"	O
lightweight	O
"	O
cipher	O
,	O
is	O
designed	O
to	O
have	O
the	O
full	O
security	O
possible	O
for	O
each	O
block	O
and	O
key	O
size	O
,	O
against	O
standard	O
chosen-plaintext	O
(	O
CPA	O
)	O
and	O
chosen-ciphertext	O
(	O
CCA	O
)	O
attacks	O
.	O
</s>
<s>
No	O
effort	O
was	O
made	O
to	O
resist	O
attacks	O
in	O
the	O
known-key	B-General_Concept
distinguishing	I-General_Concept
attack	I-General_Concept
model	O
,	O
nor	O
did	O
the	O
designers	O
evaluate	O
Speck	B-Algorithm
for	O
use	O
as	O
a	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
As	O
of	O
2018	O
,	O
no	O
successful	O
attack	O
on	O
full-round	O
Speck	B-Algorithm
of	O
any	O
variant	O
is	O
known	O
.	O
</s>
<s>
Due	O
to	O
interest	O
in	O
Simon	B-Algorithm
and	O
Speck	B-Algorithm
,	O
about	O
70	O
cryptanalysis	O
papers	O
have	O
been	O
published	O
on	O
them	O
.	O
</s>
<s>
The	O
best	O
published	O
attacks	O
on	O
Speck	B-Algorithm
in	O
the	O
standard	O
attack	O
model	O
(	O
CPA/CCA	O
with	O
unknown	O
key	O
)	O
are	O
differential	O
cryptanalysis	O
attacks	O
;	O
these	O
make	O
it	O
through	O
about	O
70	O
–	O
75%	O
of	O
the	O
rounds	O
of	O
most	O
variants	O
,	O
though	O
these	O
best	O
attacks	O
are	O
only	O
marginally	O
faster	O
than	O
brute-force	O
.	O
</s>
<s>
The	O
design	O
team	O
states	O
that	O
while	O
designing	O
Speck	B-Algorithm
,	O
they	O
found	O
differential	O
attacks	O
to	O
be	O
the	O
limiting	O
attacks	O
,	O
i.e.	O
</s>
<s>
the	O
type	O
of	O
attack	O
that	O
makes	O
it	O
through	O
the	O
most	O
rounds	O
;	O
they	O
then	O
set	O
the	O
number	O
of	O
rounds	O
to	O
leave	O
a	O
security	O
margin	O
similar	O
to	O
AES-128	B-Algorithm
'	O
s	O
at	O
approximately	O
30%	O
.	O
</s>
<s>
Speck	B-Algorithm
has	O
been	O
criticized	O
for	O
having	O
too	O
small	O
a	O
security	O
margin	O
,	O
i.e.	O
</s>
<s>
Speck	B-Algorithm
's	O
design	O
team	O
counters	O
that	O
there	O
is	O
a	O
real-world	O
cost	O
to	O
unnecessarily	O
large	O
security	O
margins	O
,	O
especially	O
on	O
lightweight	O
devices	O
,	O
that	O
cryptanalysis	O
during	O
the	O
design	O
phase	O
allowed	O
the	O
number	O
of	O
rounds	O
to	O
be	O
set	O
appropriately	O
,	O
and	O
that	O
they	O
targeted	O
AES	B-Algorithm
's	O
security	O
margin	O
.	O
</s>
<s>
Speck	B-Algorithm
includes	O
a	O
round	O
counter	O
in	O
the	O
key	B-Algorithm
schedule	I-Algorithm
.	O
</s>
<s>
The	O
designers	O
state	O
this	O
was	O
included	O
to	O
block	O
slide	O
and	O
rotational	B-General_Concept
cryptanalysis	I-General_Concept
attacks	O
.	O
</s>
<s>
Still	O
,	O
rotational-XOR	O
cryptanalysis	O
has	O
been	O
used	O
to	O
find	O
distinguishers	O
against	O
reduced-round	O
versions	O
of	O
Speck	B-Algorithm
.	O
</s>
<s>
Though	O
the	O
authors	O
do	O
n't	O
describe	O
standard	O
key-recovery	O
attacks	O
based	O
on	O
their	O
distinguishers	O
,	O
their	O
best	O
distinguishers	O
on	O
Speck32	O
and	O
Speck48	O
in	O
the	O
known-key	B-General_Concept
distinguishing	I-General_Concept
attack	I-General_Concept
model	O
for	O
certain	O
weak	O
key	O
classes	O
make	O
it	O
through	O
slightly	O
more	O
rounds	O
than	O
the	O
best	O
differential	O
distinguishers	O
.	O
</s>
<s>
However	O
,	O
this	O
type	O
of	O
cryptanalysis	O
assumes	O
the	O
related-key	O
or	O
even	O
the	O
known-key	B-General_Concept
attack	I-General_Concept
models	O
,	O
which	O
are	O
not	O
a	O
concern	O
in	O
typical	O
cryptographic	O
protocols	O
and	O
solutions	O
.	O
</s>
<s>
The	O
designers	O
also	O
state	O
that	O
Speck	B-Algorithm
was	O
not	O
designed	O
to	O
resist	O
known-key	B-General_Concept
distinguishing	I-General_Concept
attacks	I-General_Concept
(	O
which	O
do	O
not	O
directly	O
compromise	O
the	O
confidentiality	O
of	O
ciphers	O
)	O
.	O
</s>
<s>
Speck	B-Algorithm
's	O
designers	O
have	O
been	O
criticized	O
for	O
not	O
providing	O
more	O
details	O
on	O
NSA	O
cryptanalysis	O
of	O
the	O
ciphers	O
.	O
</s>
<s>
The	O
NSA	O
has	O
approved	O
Simon128/256	O
and	O
Speck128/256	O
for	O
use	O
in	O
U.S.	O
National	O
Security	O
Systems	O
,	O
though	O
AES-256	B-Algorithm
is	O
still	O
recommended	O
for	O
non-constrained	O
applications	O
.	O
</s>
<s>
Being	O
an	O
ARX	O
cipher	O
,	O
Speck	B-Algorithm
does	O
not	O
use	O
S-boxes	B-Algorithm
or	O
other	O
lookup	O
tables	O
;	O
it	O
is	O
therefore	O
naturally	O
immune	O
to	O
cache-timing	O
attacks	O
.	O
</s>
<s>
This	O
contrasts	O
with	O
ciphers	O
that	O
use	O
lookup	O
tables	O
such	O
as	O
AES	B-Algorithm
,	O
which	O
have	O
been	O
shown	O
to	O
be	O
vulnerable	O
to	O
such	O
attacks	O
.	O
</s>
<s>
However	O
,	O
like	O
most	O
block	O
ciphers	O
(	O
including	O
AES	B-Algorithm
)	O
Speck	B-Algorithm
is	O
vulnerable	O
to	O
power	O
analysis	O
attacks	O
unless	O
hardware	O
countermeasures	O
are	O
taken	O
.	O
</s>
<s>
Although	O
the	O
Speck	B-Algorithm
family	O
of	O
ciphers	O
includes	O
variants	O
with	O
the	O
same	O
block	O
and	O
key	O
sizes	O
as	O
AES	B-Algorithm
(	O
Speck128/128	O
,	O
Speck128/192	O
,	O
and	O
Speck128/256	O
)	O
,	O
it	O
also	O
includes	O
variants	O
with	O
block	O
size	O
as	O
low	O
as	O
32	O
bits	O
and	O
key	O
size	O
as	O
low	O
as	O
64	O
bits	O
.	O
</s>
<s>
in	O
RFID	B-Application
protocols	O
.	O
</s>
<s>
Initial	O
attempts	O
to	O
standardise	O
Simon	B-Algorithm
and	O
Speck	B-Algorithm
failed	O
to	O
meet	O
International	O
Organization	O
for	O
Standardization	O
super-majority	O
required	O
by	O
the	O
process	O
and	O
the	O
ciphers	O
were	O
not	O
adopted	O
.	O
</s>
<s>
Expert	O
delegates	O
to	O
the	O
ISO	O
from	O
several	O
countries	O
including	O
Germany	O
,	O
Japan	O
and	O
Israel	O
opposed	O
the	O
efforts	O
by	O
the	O
NSA	O
to	O
standardise	O
the	O
Simon	B-Algorithm
and	O
Speck	B-Algorithm
ciphers	O
,	O
citing	O
concerns	O
that	O
the	O
NSA	O
is	O
pushing	O
for	O
their	O
standardisation	O
with	O
knowledge	O
of	O
exploitable	O
weaknesses	O
in	O
the	O
ciphers	O
.	O
</s>
<s>
After	O
initial	O
attempts	O
to	O
standardise	O
the	O
ciphers	O
failed	O
,	O
the	O
ISO	O
standardised	O
Simon	B-Algorithm
and	O
Speck	B-Algorithm
in	O
other	O
working	O
groups	O
.	O
</s>
<s>
As	O
of	O
October	O
2018	O
,	O
the	O
Simon	B-Algorithm
and	O
Speck	B-Algorithm
ciphers	O
have	O
been	O
standardized	O
by	O
ISO	O
as	O
a	O
part	O
of	O
the	O
RFID	B-Application
air	O
interface	O
standard	O
,	O
International	O
Standard	O
ISO/29167	O
-21	O
(	O
for	O
Simon	B-Algorithm
)	O
and	O
International	O
Standard	O
ISO/29167	O
-22	O
(	O
for	O
Speck	B-Algorithm
)	O
,	O
making	O
them	O
available	O
for	O
use	O
by	O
commercial	O
entities	O
.	O
</s>
<s>
On	O
August	O
7	O
,	O
2018	O
,	O
Speck	B-Algorithm
was	O
removed	O
from	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
4.20	O
release	O
completely	O
.	O
</s>
