<s>
Elliptic-curve	B-Protocol
Diffie	I-Protocol
–	I-Protocol
Hellman	I-Protocol
(	O
ECDH	B-Protocol
)	O
is	O
a	O
key	B-Protocol
agreement	I-Protocol
protocol	I-Protocol
that	O
allows	O
two	O
parties	O
,	O
each	O
having	O
an	O
elliptic-curve	O
public	O
–	O
private	O
key	O
pair	O
,	O
to	O
establish	O
a	O
shared	O
secret	O
over	O
an	O
insecure	O
channel	O
.	O
</s>
<s>
This	O
shared	O
secret	O
may	O
be	O
directly	O
used	O
as	O
a	O
key	O
,	O
or	O
to	O
derive	B-Algorithm
another	I-Algorithm
key	I-Algorithm
.	O
</s>
<s>
The	O
key	O
,	O
or	O
the	O
derived	O
key	O
,	O
can	O
then	O
be	O
used	O
to	O
encrypt	O
subsequent	O
communications	O
using	O
a	O
symmetric-key	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
It	O
is	O
a	O
variant	O
of	O
the	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
protocol	O
using	O
elliptic-curve	O
cryptography	O
.	O
</s>
<s>
The	O
following	O
example	O
illustrates	O
how	O
a	O
shared	B-Algorithm
key	I-Algorithm
is	O
established	O
.	O
</s>
<s>
Suppose	O
Alice	O
wants	O
to	O
establish	O
a	O
shared	B-Algorithm
key	I-Algorithm
with	O
Bob	O
,	O
but	O
the	O
only	O
channel	O
available	O
for	O
them	O
may	O
be	O
eavesdropped	O
by	O
a	O
third	O
party	O
.	O
</s>
<s>
Most	O
standardized	O
protocols	O
based	O
on	O
ECDH	B-Protocol
derive	O
a	O
symmetric	B-Algorithm
key	I-Algorithm
from	O
using	O
some	O
hash-based	O
key	B-Algorithm
derivation	I-Algorithm
function	I-Algorithm
.	O
</s>
<s>
No	O
party	O
other	O
than	O
Alice	O
or	O
Bob	O
can	O
compute	O
the	O
shared	O
secret	O
,	O
unless	O
that	O
party	O
can	O
solve	O
the	O
elliptic	B-Protocol
curve	I-Protocol
Diffie	I-Protocol
–	I-Protocol
Hellman	I-Protocol
problem	O
.	O
</s>
<s>
The	O
public	O
keys	O
are	O
either	O
static	O
(	O
and	O
trusted	O
,	O
say	O
via	O
a	O
certificate	O
)	O
or	O
ephemeral	O
(	O
also	O
known	O
as	O
ECDHE	B-Protocol
,	O
where	O
final	O
'	O
E	O
 '	O
stands	O
for	O
"	O
ephemeral	O
"	O
)	O
.	O
</s>
<s>
Ephemeral	B-General_Concept
keys	I-General_Concept
are	O
temporary	O
and	O
not	O
necessarily	O
authenticated	O
,	O
so	O
if	O
authentication	O
is	O
desired	O
,	O
authenticity	O
assurances	O
must	O
be	O
obtained	O
by	O
other	O
means	O
.	O
</s>
<s>
Holders	O
of	O
static	O
private	O
keys	O
should	O
validate	O
the	O
other	O
public	O
key	O
,	O
and	O
should	O
apply	O
a	O
secure	O
key	B-Algorithm
derivation	I-Algorithm
function	I-Algorithm
to	O
the	O
raw	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
shared	O
secret	O
to	O
avoid	O
leaking	O
information	O
about	O
the	O
static	O
private	O
key	O
.	O
</s>
<s>
For	O
schemes	O
with	O
other	O
security	O
properties	O
,	O
see	O
MQV	B-Protocol
.	O
</s>
<s>
Several	O
TLS	B-Protocol
libraries	O
were	O
found	O
to	O
be	O
vulnerable	O
to	O
this	O
attack	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
the	O
secret	O
should	O
not	O
be	O
used	O
directly	O
as	O
a	O
symmetric	B-Algorithm
key	I-Algorithm
,	O
but	O
it	O
can	O
be	O
used	O
as	O
entropy	O
for	O
a	O
key	B-Algorithm
derivation	I-Algorithm
function	I-Algorithm
.	O
</s>
<s>
Curve25519	O
is	O
a	O
popular	O
set	O
of	O
elliptic	O
curve	O
parameters	O
and	O
reference	O
implementation	O
by	O
Daniel	O
J	O
.	O
Bernstein	O
in	O
C	B-Language
.	O
Bindings	O
and	O
alternative	O
implementations	O
are	O
also	O
available	O
.	O
</s>
<s>
LINE	B-Application
messenger	I-Application
app	I-Application
has	O
used	O
the	O
ECDH	B-Protocol
protocol	O
for	O
its	O
"	O
Letter	O
Sealing	O
"	O
end-to-end	O
encryption	O
of	O
all	O
messages	O
sent	O
through	O
said	O
app	O
since	O
October	O
2015	O
.	O
</s>
<s>
Signal	B-Protocol
Protocol	I-Protocol
uses	O
ECDH	B-Protocol
to	O
obtain	O
post-compromise	O
security	O
.	O
</s>
<s>
Implementations	O
of	O
this	O
protocol	O
are	O
found	O
in	O
Signal	B-Application
,	O
WhatsApp	B-Application
,	O
Facebook	B-Protocol
Messenger	I-Protocol
and	O
Skype	B-Application
.	O
</s>
