# MQV

(Redirected from Menezes-Qu-Vanstone)

MQV (Menezes–Qu–Vanstone) is an authenticated protocol for key agreement based on the Diffie–Hellman scheme. Like other authenticated Diffie-Hellman schemes, MQV provides protection against an active attacker. The protocol can be modified to work in an arbitrary finite group, and, in particular, elliptic curve groups, where it is known as elliptic curve MQV (ECMQV).

MQV was initially proposed by Menezes, Qu and Vanstone in 1995. It was modified with Law and Solinas in 1998. There are one-, two- and three-pass variants.

MQV is incorporated in the public-key standard IEEE P1363.

Some variants of MQV are claimed in patents assigned to Certicom.

MQV has some weaknesses that were fixed by HMQV in 2005.[1] A few articles[2][3] offered alternative viewpoint. It is now known that HMQV is vulnerable to a KCI attack when ephemeral public keys are not validated

ECMQV has been dropped from the National Security Agency's Suite B set of cryptographic standards.

## Description

Alice has a key pair (A,a) with A her public key and a her private key and Bob has the key pair (B,b) with B his public key and b his private key.

In the following ${\displaystyle {\bar {R}}}$ has the following meaning. Let ${\displaystyle R=(x,y)}$ be a point on an elliptic curve. Then ${\displaystyle {\bar {R}}=(x\,{\bmod {\,}}2^{L})+2^{L}}$ where ${\displaystyle L=\left\lceil {\frac {\lfloor \log _{2}n\rfloor +1}{2}}\right\rceil }$ and n is the order of the used generator point P. So ${\displaystyle {\bar {R}}}$ are the first L bits of the x coordinate of R.

Step Operation
1 Alice generates a key pair (X,x) by generating randomly x and calculating X=xP with P a point on an elliptic curve.
2 Bob generates a key pair (Y,y) in the same way as Alice.
3 Now, Alice calculates ${\displaystyle S_{a}=x+{\bar {X}}a}$ and sends X to Bob.
4 Bob calculates ${\displaystyle S_{b}=y+{\bar {Y}}b}$ and sends Y to Alice.
5 Alice calculates ${\displaystyle K=h\cdot S_{a}(Y+{\bar {Y}}B)}$ and Bob calculates ${\displaystyle K=h\cdot S_{b}(X+{\bar {X}}A)}$ where h is the cofactor (see Elliptic curve cryptography: domain parameters).
6 The communication of secret ${\displaystyle K}$ was successful. A key for a symmetric-key algorithm can be derived from K.

Note: for the algorithm to be secure some checks have to be performed. See Hankerson et al.

### Correctness

Bob calculates: ${\displaystyle K=h\cdot S_{b}(X+{\bar {X}}A)=h\cdot S_{b}(xP+{\bar {X}}aP)=h\cdot S_{b}(x+{\bar {X}}a)P=h\cdot S_{b}S_{a}P}$.

Alice calculates: ${\displaystyle K=h\cdot S_{a}(Y+{\bar {Y}}B)=h\cdot S_{a}(yP+{\bar {Y}}bP)=h\cdot S_{a}(y+{\bar {Y}}b)P=h\cdot S_{b}S_{a}P}$.

So the keys K are indeed the same with ${\displaystyle K=h\cdot S_{b}S_{a}P}$