]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Make VKO_compute_key public. 170/head
authorDmitry Timoshkov <dmitry@baikal.ru>
Wed, 4 Sep 2019 03:45:42 +0000 (11:45 +0800)
committerDmitry Timoshkov <dmitry@baikal.ru>
Thu, 5 Sep 2019 07:06:56 +0000 (15:06 +0800)
gost_ec_keyx.c
gost_lcl.h

index cc94d677ed37b5bb9aa5acc4284270824bed86db..b82c6f1859e5fe5bf249565e96282c563a9f26a3 100644 (file)
 #include "gost_lcl.h"
 
 /* Implementation of CryptoPro VKO 34.10-2001/2012 algorithm */
-static int VKO_compute_key(unsigned char *shared_key,
-                           const EC_POINT *pub_key, const EC_KEY *priv_key,
-                           const unsigned char *ukm, const size_t ukm_size,
-                           const int vko_dgst_nid)
+int VKO_compute_key(unsigned char *shared_key,
+                    const EC_POINT *pub_key, const EC_KEY *priv_key,
+                    const unsigned char *ukm, const size_t ukm_size,
+                    const int vko_dgst_nid)
 {
     unsigned char *databuf = NULL;
     BIGNUM *UKM = NULL, *p = NULL, *order = NULL, *X = NULL, *Y = NULL, *cofactor = NULL;
index 15ff31ead28813bde1ee7ceb4df9ecc0ca2a5aae..bb25ce360c3a47612c776dc507cb752bcbd56158 100644 (file)
@@ -265,6 +265,12 @@ int gost_ec_verify(const unsigned char *dgst, int dgst_len,
                    ECDSA_SIG *sig, EC_KEY *ec);
 int gost_ec_compute_public(EC_KEY *ec);
 
+/* VKO */
+int VKO_compute_key(unsigned char *shared_key,
+                    const EC_POINT *pub_key, const EC_KEY *priv_key,
+                    const unsigned char *ukm, const size_t ukm_size,
+                    const int vko_dgst_nid);
+
 /* KDF TREE */
 int gost_kdftree2012_256(unsigned char *keyout, size_t keyout_len,
                          const unsigned char *key, size_t keylen,