From cd8ae9e30b2b261e5a274255b1d000df732f8725 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 6 Sep 2018 16:25:42 +0300
Subject: [PATCH] One more TODO

---
 gost_ec_keyx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gost_ec_keyx.c b/gost_ec_keyx.c
index 409d8e1..3f0b286 100644
--- a/gost_ec_keyx.c
+++ b/gost_ec_keyx.c
@@ -584,7 +584,17 @@ static int pkey_gost2018_decrypt(EVP_PKEY_CTX *pctx, unsigned char *key,
     }
 
     eph_key = X509_PUBKEY_get(pst->ephem_key);
+/*
+ * TODO beldmit
+   1.  Checks the next three conditions fulfilling and terminates the
+   connection with fatal error if not.
+
+   o  Q_eph is on the same curve as server public key;
+
+   o  Q_eph is not equal to zero point;
 
+   o  q * Q_eph is not equal to zero point.
+*/
     if (gost_keg(data->shared_ukm, pkey_nid,
                  EC_KEY_get0_public_key(EVP_PKEY_get0(eph_key)),
                  EVP_PKEY_get0(priv), expkeys) <= 0) {
-- 
2.39.5