<s>
In	O
cryptography	O
,	O
the	O
Double	B-Algorithm
Ratchet	I-Algorithm
Algorithm	I-Algorithm
(	O
previously	O
referred	O
to	O
as	O
the	O
Axolotl	B-Algorithm
Ratchet	I-Algorithm
)	O
is	O
a	O
key	O
management	O
algorithm	O
that	O
was	O
developed	O
by	O
Trevor	O
Perrin	O
and	O
Moxie	O
Marlinspike	O
in	O
2013	O
.	O
</s>
<s>
It	O
can	O
be	O
used	O
as	O
part	O
of	O
a	O
cryptographic	B-Protocol
protocol	I-Protocol
to	O
provide	O
end-to-end	O
encryption	O
for	O
instant	B-Application
messaging	I-Application
.	O
</s>
<s>
After	O
an	O
initial	O
key	B-Protocol
exchange	I-Protocol
it	O
manages	O
the	O
ongoing	O
renewal	O
and	O
maintenance	O
of	O
short-lived	O
session	O
keys	O
.	O
</s>
<s>
It	O
combines	O
a	O
cryptographic	O
so-called	O
"	O
ratchet	O
"	O
based	O
on	O
the	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
key	I-Protocol
exchange	I-Protocol
(	O
DH	B-Protocol
)	O
and	O
a	O
ratchet	O
based	O
on	O
a	O
key	B-Algorithm
derivation	I-Algorithm
function	I-Algorithm
(	O
KDF	B-Algorithm
)	O
,	O
such	O
as	O
a	O
hash	B-Error_Name
function	I-Error_Name
,	O
and	O
is	O
therefore	O
called	O
a	O
double	B-Algorithm
ratchet	I-Algorithm
.	O
</s>
<s>
This	O
effectively	O
forces	O
the	O
attacker	O
to	O
intercept	O
all	O
communication	O
between	O
the	O
honest	O
parties	O
,	O
since	O
they	O
lose	O
access	O
as	O
soon	O
as	O
a	O
key	B-Protocol
exchange	I-Protocol
occurs	O
that	O
is	O
not	O
intercepted	O
.	O
</s>
<s>
"	O
Axolotl	B-Protocol
"	O
was	O
in	O
reference	O
to	O
the	O
salamander	O
's	O
self-healing	O
properties	O
.	O
</s>
<s>
The	O
Double	B-Algorithm
Ratchet	I-Algorithm
Algorithm	I-Algorithm
was	O
developed	O
by	O
Trevor	O
Perrin	O
and	O
Moxie	O
Marlinspike	O
(	O
Open	O
Whisper	O
Systems	O
)	O
in	O
2013	O
and	O
introduced	O
as	O
part	O
of	O
the	O
Signal	B-Protocol
Protocol	I-Protocol
in	O
February	O
2014	O
.	O
</s>
<s>
The	O
Double	B-Algorithm
Ratchet	I-Algorithm
Algorithm	I-Algorithm
's	O
design	O
is	O
based	O
on	O
the	O
DH	B-Protocol
ratchet	O
that	O
was	O
introduced	O
by	O
Off-the-Record	B-Protocol
Messaging	I-Protocol
(	O
OTR	B-Protocol
)	O
and	O
combines	O
it	O
with	O
a	O
symmetric-key	O
ratchet	O
modeled	O
after	O
the	O
Silent	B-Protocol
Circle	I-Protocol
Instant	I-Protocol
Messaging	I-Protocol
Protocol	I-Protocol
(	O
SCIMP	B-Protocol
)	O
.	O
</s>
<s>
The	O
ratchet	O
was	O
initially	O
named	O
after	O
the	O
critically	O
endangered	O
aquatic	O
salamander	O
axolotl	B-Protocol
,	O
which	O
has	O
extraordinary	O
self-healing	O
capabilities	O
.	O
</s>
<s>
In	O
March	O
2016	O
,	O
the	O
developers	O
renamed	O
the	O
Axolotl	B-Algorithm
Ratchet	I-Algorithm
as	O
the	O
Double	B-Algorithm
Ratchet	I-Algorithm
Algorithm	I-Algorithm
to	O
better	O
differentiate	O
between	O
the	O
ratchet	O
and	O
the	O
full	O
protocol	O
,	O
because	O
some	O
had	O
used	O
the	O
name	O
Axolotl	B-Protocol
when	O
referring	O
to	O
the	O
Signal	B-Protocol
Protocol	I-Protocol
.	O
</s>
<s>
The	O
Double	B-Algorithm
Ratchet	I-Algorithm
Algorithm	I-Algorithm
features	O
properties	O
that	O
have	O
been	O
commonly	O
available	O
in	O
end-to-end	O
encryption	O
systems	O
for	O
a	O
long	O
time	O
:	O
encryption	O
of	O
contents	O
on	O
the	O
entire	O
way	O
of	O
transport	O
as	O
well	O
as	O
authentication	O
of	O
the	O
remote	O
peer	O
and	O
protection	O
against	O
manipulation	O
of	O
messages	O
.	O
</s>
<s>
As	O
a	O
hybrid	O
of	O
DH	B-Protocol
and	O
KDF	B-Algorithm
ratchets	O
,	O
it	O
combines	O
several	O
desired	O
features	O
of	O
both	O
principles	O
.	O
</s>
<s>
From	O
OTR	B-Protocol
messaging	I-Protocol
it	O
takes	O
the	O
properties	O
of	O
forward	O
secrecy	O
and	O
automatically	O
reestablishing	O
secrecy	O
in	O
case	O
of	O
compromise	O
of	O
a	O
session	O
key	O
,	O
forward	O
secrecy	O
with	O
a	O
compromise	O
of	O
the	O
secret	O
persistent	O
main	O
key	O
,	O
and	O
plausible	O
deniability	O
for	O
the	O
authorship	O
of	O
messages	O
.	O
</s>
<s>
Additionally	O
,	O
it	O
enables	O
session	O
key	O
renewal	O
without	O
interaction	O
with	O
the	O
remote	O
peer	O
by	O
using	O
secondary	O
KDF	B-Algorithm
ratchets	O
.	O
</s>
<s>
It	O
is	O
said	O
to	O
detect	O
reordering	O
,	O
deletion	O
,	O
and	O
replay	O
of	O
sent	O
messages	O
,	O
and	O
improve	O
forward	O
secrecy	O
properties	O
in	O
comparison	O
to	O
OTR	B-Protocol
messaging	I-Protocol
.	O
</s>
<s>
Combined	O
with	O
public	B-Architecture
key	I-Architecture
infrastructure	I-Architecture
for	O
the	O
retention	O
of	O
pregenerated	O
one-time	O
keys	O
(	O
prekeys	O
)	O
,	O
it	O
allows	O
for	O
the	O
initialization	O
of	O
messaging	O
sessions	O
without	O
the	O
presence	O
of	O
the	O
remote	O
peer	O
(	O
asynchronous	O
communication	O
)	O
.	O
</s>
<s>
The	O
usage	O
of	O
triple	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
key	I-Protocol
exchange	I-Protocol
(	O
3-DH	O
)	O
as	O
initial	O
key	B-Protocol
exchange	I-Protocol
method	O
improves	O
the	O
deniability	O
properties	O
.	O
</s>
<s>
An	O
example	O
of	O
this	O
is	O
the	O
Signal	B-Protocol
Protocol	I-Protocol
,	O
which	O
combines	O
the	O
Double	B-Algorithm
Ratchet	I-Algorithm
Algorithm	I-Algorithm
,	O
prekeys	O
,	O
and	O
a	O
3-DH	O
handshake	O
.	O
</s>
<s>
A	O
client	O
renews	O
session	O
key	O
material	O
in	O
interaction	O
with	O
the	O
remote	O
peer	O
using	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
ratchet	O
whenever	O
possible	O
,	O
otherwise	O
independently	O
by	O
using	O
a	O
hash	B-Error_Name
ratchet	O
.	O
</s>
<s>
Therefore	O
,	O
with	O
every	O
message	O
a	O
client	O
using	O
the	O
double	B-Algorithm
ratchet	I-Algorithm
advances	O
one	O
of	O
two	O
hash	B-Error_Name
ratchets	O
(	O
one	O
for	O
sending	O
,	O
one	O
receiving	O
)	O
which	O
get	O
seeded	O
with	O
a	O
common	O
secret	O
from	O
a	O
DH	B-Protocol
ratchet	O
.	O
</s>
<s>
At	O
the	O
same	O
time	O
it	O
tries	O
to	O
use	O
every	O
opportunity	O
to	O
provide	O
the	O
remote	O
peer	O
with	O
a	O
new	O
public	O
DH	B-Protocol
value	O
and	O
advance	O
the	O
DH	B-Protocol
ratchet	O
whenever	O
a	O
new	O
DH	B-Protocol
value	O
from	O
the	O
remote	O
peer	O
arrives	O
.	O
</s>
<s>
As	O
soon	O
as	O
a	O
new	O
common	O
secret	O
is	O
established	O
,	O
a	O
new	O
hash	B-Error_Name
ratchet	O
gets	O
initialized	O
.	O
</s>
<s>
Elliptic	O
curve	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
(	O
ECDH	O
)	O
with	O
Curve25519	O
,	O
</s>
<s>
Keyed-Hash	B-Algorithm
Message	I-Algorithm
Authentication	I-Algorithm
Code	I-Algorithm
(	O
HMAC	B-Algorithm
)	O
based	O
on	O
SHA-256	B-Algorithm
,	O
</s>
<s>
the	O
Advanced	B-Algorithm
Encryption	I-Algorithm
Standard	I-Algorithm
(	O
AES	B-Algorithm
)	O
,	O
partially	O
in	O
Cipher	O
Block	O
Chaining	O
mode	B-Algorithm
(	O
CBC	O
)	O
with	O
padding	B-Algorithm
as	O
per	O
PKCS	O
#5	O
and	O
partially	O
in	O
Counter	O
mode	B-Algorithm
(	O
CTR	O
)	O
without	O
padding	B-Algorithm
,	O
</s>
<s>
HMAC	B-Algorithm
.	O
</s>
<s>
The	O
following	O
is	O
a	O
list	O
of	O
applications	O
that	O
use	O
the	O
Double	B-Algorithm
Ratchet	I-Algorithm
Algorithm	I-Algorithm
or	O
a	O
custom	O
implementation	O
of	O
it	O
:	O
</s>
