X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_gost2015.h;h=663d31536d15185d9fce0a1b308d12255540346a;hb=dd645e71d12ec790dc6c2e1c44163e2683ae4c6a;hp=797fbca2e08ad4e598d5d0115b8fcd1feca67567;hpb=41b4121253a9c0e8d82d3eebcfe728d5d43e1b51;p=openssl-gost%2Fengine.git diff --git a/gost_gost2015.h b/gost_gost2015.h index 797fbca..663d315 100644 --- a/gost_gost2015.h +++ b/gost_gost2015.h @@ -1,10 +1,18 @@ +/* + * Copyright (c) 2020 Dmitry Belyavskiy + * + * Contents licensed under the terms of the OpenSSL license + * See https://www.openssl.org/source/license.html for details + */ #ifndef GOST_GOST2015_H #define GOST_GOST2015_H #include +#include #define MAGMA_MAC_MAX_SIZE 8 #define KUZNYECHIK_MAC_MAX_SIZE 16 +#define OID_GOST_CMS_MAC "1.2.643.7.1.0.6.1.1" int gost2015_final_call(EVP_CIPHER_CTX *ctx, EVP_MD_CTX *omac_ctx, size_t mac_size, unsigned char *encrypted_mac, @@ -19,4 +27,13 @@ int gost2015_get_asn1_params(const ASN1_TYPE *params, size_t ukm_size, int gost2015_set_asn1_params(ASN1_TYPE *params, const unsigned char *iv, size_t iv_size, const unsigned char *kdf_seed); + +int gost2015_process_unprotected_attributes(STACK_OF(X509_ATTRIBUTE) *attrs, + int encryption, size_t mac_len, unsigned char *final_tag); + +int gost2015_acpkm_omac_init(int nid, int enc, const unsigned char *inkey, + EVP_MD_CTX *omac_ctx, + unsigned char *outkey, unsigned char *kdf_seed); +int init_zero_kdf_seed(unsigned char *kdf_seed); + #endif