X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_lcl.h;h=5a012c1d095220e45ad4112b00c1096bcdddce51;hb=0c52f24e215480a6d6fb02646c8fb6886f23d8d0;hp=8471ed062cecde22fe78931015eaec8b0b5eb483;hpb=1c8b7f9a2a51ba2a6d668c2cd4e4672ed6731166;p=openssl-gost%2Fengine.git diff --git a/gost_lcl.h b/gost_lcl.h index 8471ed0..5a012c1 100644 --- a/gost_lcl.h +++ b/gost_lcl.h @@ -66,6 +66,9 @@ int register_pmeth_gost(int id, EVP_PKEY_METHOD **pmeth, int flags); # define EVP_PKEY_CTRL_GOST_MAC_HEXKEY (EVP_PKEY_ALG_CTRL+3) # define EVP_PKEY_CTRL_MAC_LEN (EVP_PKEY_ALG_CTRL+5) # define EVP_PKEY_CTRL_SET_VKO (EVP_PKEY_ALG_CTRL+11) +# define TLSTREE_MODE_NONE 0 +# define TLSTREE_MODE_S 1 +# define TLSTREE_MODE_L 2 /* Pmeth internal representation */ struct gost_pmeth_data { int sign_param_nid; /* Should be set whenever parameters are @@ -76,6 +79,7 @@ struct gost_pmeth_data { int peer_key_used; int cipher_nid; /* KExp15/KImp15 algs */ int vko_dgst_nid; + char derive_mode; }; struct gost_mac_pmeth_data { @@ -252,6 +256,8 @@ int gost_ec_verify(const unsigned char *dgst, int dgst_len, 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); +size_t gost_ec_key2buf(const EC_KEY *key, unsigned char **pbuf); +int gost_ec_oct2key(EC_KEY *key, const unsigned char *buf, size_t len); #define CURVEDEF(a) \ int point_mul_##a(const EC_GROUP *group, EC_POINT *r, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);\ @@ -281,7 +287,7 @@ int gost_kdftree2012_256(unsigned char *keyout, size_t keyout_len, const size_t representation); int gost_tlstree(int cipher_nid, const unsigned char *in, unsigned char *out, - const unsigned char *tlsseq); + const unsigned char *tlsseq, int mode); /* KExp/KImp */ int gost_kexp15(const unsigned char *shared_key, const int shared_len, int cipher_nid, const unsigned char *cipher_key, @@ -338,11 +344,13 @@ extern GOST_cipher magma_ctr_cipher; extern GOST_cipher magma_ctr_acpkm_cipher; extern GOST_cipher magma_ctr_acpkm_omac_cipher; extern GOST_cipher magma_cbc_cipher; +extern GOST_cipher magma_mgm_cipher; extern GOST_cipher grasshopper_ecb_cipher; extern GOST_cipher grasshopper_cbc_cipher; extern GOST_cipher grasshopper_cfb_cipher; extern GOST_cipher grasshopper_ofb_cipher; extern GOST_cipher grasshopper_ctr_cipher; +extern GOST_cipher grasshopper_mgm_cipher; extern GOST_cipher grasshopper_ctr_acpkm_cipher; extern GOST_cipher grasshopper_ctr_acpkm_omac_cipher; extern GOST_cipher magma_kexp15_cipher;