]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_lcl.h
Update INSTALL.md
[openssl-gost/engine.git] / gost_lcl.h
index 4eba3545a38998cd5408c74886b649e0f602b6c4..df072922ce308fae0af1123abf6ccdb54d39822b 100644 (file)
@@ -55,6 +55,7 @@ int register_pmeth_gost(int id, EVP_PKEY_METHOD **pmeth, int flags);
 /* Gost-specific pmeth control-function parameters */
 /* For GOST R34.10 parameters */
 # define param_ctrl_string "paramset"
+# define ukm_ctrl_string "ukmhex"
 # define EVP_PKEY_CTRL_GOST_PARAMSET (EVP_PKEY_ALG_CTRL+1)
 /* For GOST 28147 MAC */
 # define key_ctrl_string "key"
@@ -241,7 +242,7 @@ const EVP_CIPHER *cipher_magma_cbc();
 const EVP_CIPHER *cipher_magma_ctr();
 void cipher_gost_destroy();
 
-void inc_counter(unsigned char *buffer, size_t buf_len);
+void inc_counter(unsigned char *counter, size_t counter_bytes);
 
 # define EVP_MD_CTRL_KEY_LEN (EVP_MD_CTRL_ALG_CTRL+3)
 # define EVP_MD_CTRL_SET_KEY (EVP_MD_CTRL_ALG_CTRL+4)
@@ -264,6 +265,22 @@ ECDSA_SIG *gost_ec_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey);
 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);
+int gost_ec_point_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
+                      const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
+
+#define CURVEDEF(a) \
+int point_mul_##a(const EC_GROUP *group, EC_POINT *r, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);\
+int point_mul_g_##a(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, BN_CTX *ctx);\
+int point_mul_two_##a(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
+
+CURVEDEF(id_GostR3410_2001_CryptoPro_A_ParamSet)
+CURVEDEF(id_GostR3410_2001_CryptoPro_B_ParamSet)
+CURVEDEF(id_GostR3410_2001_CryptoPro_C_ParamSet)
+CURVEDEF(id_GostR3410_2001_TestParamSet)
+CURVEDEF(id_tc26_gost_3410_2012_256_paramSetA)
+CURVEDEF(id_tc26_gost_3410_2012_512_paramSetA)
+CURVEDEF(id_tc26_gost_3410_2012_512_paramSetB)
+CURVEDEF(id_tc26_gost_3410_2012_512_paramSetC)
 
 /* VKO */
 int VKO_compute_key(unsigned char *shared_key,
@@ -278,8 +295,8 @@ int gost_kdftree2012_256(unsigned char *keyout, size_t keyout_len,
                          const unsigned char *seed, size_t seed_len,
                          const size_t representation);
 
-int gost_tlstree(int cipher_nid, const unsigned char* inkey,
-                unsigned char *outkey, const unsigned char *tlsseq);
+int gost_tlstree(int cipher_nid, const unsigned char *in, unsigned char *out,
+                 const unsigned char *tlsseq);
 /* KExp/KImp */
 int gost_kexp15(const unsigned char *shared_key, const int shared_len,
                 int cipher_nid, const unsigned char *cipher_key,