X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_lcl.h;h=a6b6e1224845a3bb14ac29735d412657817ee487;hb=e55323c4c29e6b2645e7e7357453c34fb9a42440;hp=52984a00336ed96a0aebe595a92780aff586fee6;hpb=cd7f9c8e3c396cff87e1393df835c5f5f9fb661f;p=openssl-gost%2Fengine.git diff --git a/gost_lcl.h b/gost_lcl.h index 52984a0..a6b6e12 100644 --- a/gost_lcl.h +++ b/gost_lcl.h @@ -114,6 +114,24 @@ typedef struct { /* FIXME incomplete */ GOST_KEY_TRANSPORT *gkt; } GOST_CLIENT_KEY_EXCHANGE_PARAMS; +/* PSKeyTransport ::= SEQUENCE { + PSEXP OCTET STRING, + ephemeralPublicKey SubjectPublicKeyInfo + } + SubjectPublicKeyInfo ::= SEQUENCE { + algorithm AlgorithmIdentifier, + subjectPublicKey BITSTRING + } + AlgorithmIdentifier ::= SEQUENCE { + algorithm OBJECT IDENTIFIER, + parameters ANY OPTIONAL + }*/ +typedef struct PSKeyTransport_st { + ASN1_OCTET_STRING *psexp; + X509_PUBKEY *ephem_key; +} PSKeyTransport_gost; + +DECLARE_ASN1_FUNCTIONS(PSKeyTransport_gost) /* * Hacks to shorten symbols to 31 characters or less, or OpenVMS. This mimics * what's done in symhacks.h, but since this is a very local header file, I @@ -254,6 +272,17 @@ int gost_kdftree2012_256(unsigned char *keyout, size_t keyout_len, const unsigned char *label, size_t label_len, const unsigned char *seed, size_t seed_len, const size_t representation); +/* KExp/KImp */ +int gost_kexp15(const unsigned char *shared_key, const int shared_len, + int cipher_nid, const unsigned char *cipher_key, + int mac_nid, unsigned char *mac_key, + const unsigned char *iv, const size_t ivlen, + unsigned char *out, int *out_len); +int gost_kimp15(const unsigned char *expkey, const size_t expkeylen, + int cipher_nid, const unsigned char *cipher_key, + int mac_nid, unsigned char *mac_key, + const unsigned char *iv, const size_t ivlen, + unsigned char *shared_key, size_t shared_len); /*============== miscellaneous functions============================= */ /* from gost_sign.c */ /* Convert GOST R 34.11 hash sum to bignum according to standard */