OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Functions | Variables
gost_lcl.h File Reference
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/dsa.h>
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#include <openssl/engine.h>
#include <openssl/ec.h>
#include "gost89.h"
#include "gosthash.h"

Go to the source code of this file.

Classes

struct  gost_pmeth_data
 
struct  gost_mac_pmeth_data
 
struct  GOST_KEY_INFO
 
struct  GOST_KEY_AGREEMENT_INFO
 
struct  GOST_KEY_TRANSPORT
 
struct  GOST_CLIENT_KEY_EXCHANGE_PARAMS
 
struct  GOST_KEY_PARAMS
 
struct  GOST_CIPHER_PARAMS
 
struct  ossl_gost_digest_ctx
 
struct  ossl_gost_cipher_ctx
 
struct  gost_cipher_info
 
struct  ossl_gost_imit_ctx
 

Macros

#define GOST_PARAM_CRYPT_PARAMS   0
 
#define GOST_PARAM_MAX   0
 
#define GOST_CTRL_CRYPT_PARAMS   (ENGINE_CMD_BASE+GOST_PARAM_CRYPT_PARAMS)
 
#define param_ctrl_string   "paramset"
 
#define EVP_PKEY_CTRL_GOST_PARAMSET   (EVP_PKEY_ALG_CTRL+1)
 
#define key_ctrl_string   "key"
 
#define hexkey_ctrl_string   "hexkey"
 
#define EVP_PKEY_CTRL_GOST_MAC_HEXKEY   (EVP_PKEY_ALG_CTRL+3)
 
#define EVP_MD_CTRL_KEY_LEN   (EVP_MD_CTRL_ALG_CTRL+3)
 
#define EVP_MD_CTRL_SET_KEY   (EVP_MD_CTRL_ALG_CTRL+4)
 

Functions

int gost_control_func (ENGINE *e, int cmd, long i, void *p, void(*f)(void))
 
const char * get_gost_engine_param (int param)
 
int gost_set_default_param (int param, const char *value)
 
void gost_param_free (void)
 
int register_ameth_gost (int nid, EVP_PKEY_ASN1_METHOD **ameth, const char *pemstr, const char *info)
 
int register_pmeth_gost (int id, EVP_PKEY_METHOD **pmeth, int flags)
 
struct gost_cipher_infoget_encryption_params (ASN1_OBJECT *obj)
 
int pkey_GOST94cp_encrypt (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *key, size_t key_len)
 
int pkey_GOST94cp_decrypt (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t in_len)
 
int pkey_GOST01cp_encrypt (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *key, size_t key_len)
 
int pkey_GOST01cp_decrypt (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t in_len)
 
int pkey_gost2001_derive (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)
 
int pkey_gost94_derive (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)
 
int fill_GOST94_params (DSA *dsa, int nid)
 
int fill_GOST2001_params (EC_KEY *eckey, int nid)
 
int gost_sign_keygen (DSA *dsa)
 
int gost2001_keygen (EC_KEY *ec)
 
DSA_SIGgost_do_sign (const unsigned char *dgst, int dlen, DSA *dsa)
 
DSA_SIGgost2001_do_sign (const unsigned char *dgst, int dlen, EC_KEY *eckey)
 
int gost_do_verify (const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa)
 
int gost2001_do_verify (const unsigned char *dgst, int dgst_len, DSA_SIG *sig, EC_KEY *ec)
 
int gost2001_compute_public (EC_KEY *ec)
 
int gost94_compute_public (DSA *dsa)
 
BIGNUMhashsum2bn (const unsigned char *dgst)
 
int store_bignum (BIGNUM *bn, unsigned char *buf, int len)
 
BIGNUMgetbnfrombuf (const unsigned char *buf, size_t len)
 
int pack_sign_cp (DSA_SIG *s, int order, unsigned char *sig, size_t *siglen)
 
DSA_SIGunpack_cp_signature (const unsigned char *sig, size_t siglen)
 
BIGNUMgost_get0_priv_key (const EVP_PKEY *pkey)
 
int gost94_nid_by_params (DSA *p)
 

Variables

const ENGINE_CMD_DEFN gost_cmds []
 
EVP_MD digest_gost
 
EVP_MD imit_gost_cpa
 
struct gost_cipher_info gost_cipher_list []
 
EVP_CIPHER cipher_gost
 
EVP_CIPHER cipher_gost_cpacnt
 

Macro Definition Documentation

#define EVP_MD_CTRL_KEY_LEN   (EVP_MD_CTRL_ALG_CTRL+3)

Definition at line 166 of file gost_lcl.h.

#define EVP_MD_CTRL_SET_KEY   (EVP_MD_CTRL_ALG_CTRL+4)

Definition at line 167 of file gost_lcl.h.

#define EVP_PKEY_CTRL_GOST_MAC_HEXKEY   (EVP_PKEY_ALG_CTRL+3)

Definition at line 44 of file gost_lcl.h.

#define EVP_PKEY_CTRL_GOST_PARAMSET   (EVP_PKEY_ALG_CTRL+1)

Definition at line 40 of file gost_lcl.h.

#define GOST_CTRL_CRYPT_PARAMS   (ENGINE_CMD_BASE+GOST_PARAM_CRYPT_PARAMS)

Definition at line 24 of file gost_lcl.h.

#define GOST_PARAM_CRYPT_PARAMS   0

Definition at line 22 of file gost_lcl.h.

#define GOST_PARAM_MAX   0

Definition at line 23 of file gost_lcl.h.

#define hexkey_ctrl_string   "hexkey"

Definition at line 43 of file gost_lcl.h.

#define key_ctrl_string   "key"

Definition at line 42 of file gost_lcl.h.

#define param_ctrl_string   "paramset"

Definition at line 39 of file gost_lcl.h.

Function Documentation

int fill_GOST2001_params ( EC_KEY eckey,
int  nid 
)

Definition at line 34 of file gost2001.c.

int fill_GOST94_params ( DSA dsa,
int  nid 
)

Definition at line 215 of file gost_sign.c.

struct gost_cipher_info* get_encryption_params ( ASN1_OBJECT obj)
read

Definition at line 122 of file gost_crypt.c.

const char* get_gost_engine_param ( int  param)

Definition at line 60 of file gost_ctl.c.

BIGNUM* getbnfrombuf ( const unsigned char *  buf,
size_t  len 
)

Definition at line 294 of file gost_sign.c.

int gost2001_compute_public ( EC_KEY ec)

Definition at line 276 of file gost2001.c.

DSA_SIG* gost2001_do_sign ( const unsigned char *  dgst,
int  dlen,
EC_KEY eckey 
)

Definition at line 94 of file gost2001.c.

int gost2001_do_verify ( const unsigned char *  dgst,
int  dgst_len,
DSA_SIG sig,
EC_KEY ec 
)

Definition at line 184 of file gost2001.c.

int gost2001_keygen ( EC_KEY ec)

Definition at line 321 of file gost2001.c.

int gost94_compute_public ( DSA dsa)

Definition at line 194 of file gost_sign.c.

int gost94_nid_by_params ( DSA p)

Definition at line 23 of file gost_ameth.c.

int gost_control_func ( ENGINE e,
int  cmd,
long  i,
void p,
void(*)(void f 
)

Definition at line 51 of file gost_ctl.c.

DSA_SIG* gost_do_sign ( const unsigned char *  dgst,
int  dlen,
DSA dsa 
)

Definition at line 51 of file gost_sign.c.

int gost_do_verify ( const unsigned char *  dgst,
int  dgst_len,
DSA_SIG sig,
DSA dsa 
)

Definition at line 135 of file gost_sign.c.

BIGNUM* gost_get0_priv_key ( const EVP_PKEY pkey)

Definition at line 184 of file gost_ameth.c.

void gost_param_free ( void  )

Definition at line 39 of file gost_ctl.c.

int gost_set_default_param ( int  param,
const char *  value 
)

Definition at line 78 of file gost_ctl.c.

int gost_sign_keygen ( DSA dsa)

Definition at line 242 of file gost_sign.c.

BIGNUM* hashsum2bn ( const unsigned char *  dgst)

Definition at line 282 of file gost_sign.c.

int pack_sign_cp ( DSA_SIG s,
int  order,
unsigned char *  sig,
size_t *  siglen 
)

Definition at line 119 of file gost_sign.c.

int pkey_GOST01cp_decrypt ( EVP_PKEY_CTX ctx,
unsigned char *  out,
size_t *  outlen,
const unsigned char *  in,
size_t  in_len 
)

Definition at line 228 of file gost2001_keyx.c.

int pkey_GOST01cp_encrypt ( EVP_PKEY_CTX ctx,
unsigned char *  out,
size_t *  outlen,
const unsigned char *  key,
size_t  key_len 
)

Definition at line 117 of file gost2001_keyx.c.

int pkey_gost2001_derive ( EVP_PKEY_CTX ctx,
unsigned char *  key,
size_t *  keylen 
)

Definition at line 75 of file gost2001_keyx.c.

int pkey_gost94_derive ( EVP_PKEY_CTX ctx,
unsigned char *  key,
size_t *  keylen 
)

Definition at line 73 of file gost94_keyx.c.

int pkey_GOST94cp_decrypt ( EVP_PKEY_CTX ctx,
unsigned char *  out,
size_t *  outlen,
const unsigned char *  in,
size_t  in_len 
)

Definition at line 212 of file gost94_keyx.c.

int pkey_GOST94cp_encrypt ( EVP_PKEY_CTX ctx,
unsigned char *  out,
size_t *  outlen,
const unsigned char *  key,
size_t  key_len 
)

Definition at line 88 of file gost94_keyx.c.

int register_ameth_gost ( int  nid,
EVP_PKEY_ASN1_METHOD **  ameth,
const char *  pemstr,
const char *  info 
)

Definition at line 898 of file gost_ameth.c.

int register_pmeth_gost ( int  id,
EVP_PKEY_METHOD **  pmeth,
int  flags 
)

Definition at line 576 of file gost_pmeth.c.

int store_bignum ( BIGNUM bn,
unsigned char *  buf,
int  len 
)

Definition at line 314 of file gost_sign.c.

DSA_SIG* unpack_cp_signature ( const unsigned char *  sig,
size_t  siglen 
)

Definition at line 266 of file gost_sign.c.

Variable Documentation

EVP_CIPHER cipher_gost

Definition at line 32 of file gost_crypt.c.

EVP_CIPHER cipher_gost_cpacnt

Definition at line 50 of file gost_crypt.c.

EVP_MD digest_gost

Definition at line 21 of file gost_md.c.

struct gost_cipher_info gost_cipher_list[]

Definition at line 106 of file gost_crypt.c.

const ENGINE_CMD_DEFN gost_cmds[]

Definition at line 19 of file gost_ctl.c.

EVP_MD imit_gost_cpa

Definition at line 81 of file gost_crypt.c.