]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Remove unneeded declarations after registration rework
authorVitaly Chikunov <vt@altlinux.org>
Wed, 13 May 2020 01:41:13 +0000 (04:41 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Wed, 13 May 2020 17:12:23 +0000 (20:12 +0300)
gost_crypt.c
gost_grasshopper_cipher.c
gost_grasshopper_cipher.h
gost_lcl.h
gost_md.c
gost_md2012.c
gost_omac.c
gost_omac_acpkm.c

index 66885bfafd8cb6771962607b090dbac2f0f2de6f..429bdd04d60f658832dc03264fe2bc3523321300 100644 (file)
@@ -270,16 +270,6 @@ GOST_digest Gost28147_89_MAC_digest = {
     .ctrl = gost_imit_ctrl,
 };
 
-EVP_MD *imit_gost_cpa(void)
-{
-    return GOST_init_digest(&Gost28147_89_MAC_digest);
-}
-
-void imit_gost_cpa_destroy(void)
-{
-    GOST_deinit_digest(&Gost28147_89_MAC_digest);
-}
-
 GOST_digest Gost28147_89_mac_12_digest = {
     .nid = NID_gost_mac_12,
     .result_size = 4,
@@ -294,16 +284,6 @@ GOST_digest Gost28147_89_mac_12_digest = {
     .ctrl = gost_imit_ctrl,
 };
 
-EVP_MD *imit_gost_cp_12(void)
-{
-    return GOST_init_digest(&Gost28147_89_mac_12_digest);
-}
-
-void imit_gost_cp_12_destroy(void)
-{
-    GOST_deinit_digest(&Gost28147_89_mac_12_digest);
-}
-
 /*
  * Correspondence between gost parameter OIDs and substitution blocks
  * NID field is filed by register_gost_NID function in engine.c
index 22d632d5c97c2c29056b01a540b15aaeff8b52ed..22ca71781bca3a45ae7858cce90a0b380d8179fd 100644 (file)
@@ -929,6 +929,7 @@ int gost_grasshopper_cipher_ctl(EVP_CIPHER_CTX *ctx, int type, int arg, void *pt
     return 1;
 }
 
+/* Called directly by CMAC_ACPKM_Init() */
 const GRASSHOPPER_INLINE EVP_CIPHER *cipher_gost_grasshopper_ctracpkm()
 {
     return GOST_init_cipher(&grasshopper_ctr_acpkm_cipher);
index f0ad7b3b7616f59fbc463fa9f5cc079ab25f525e..202133c8e0f3c826aeaf1ffd7f1b06549ac2842d 100644 (file)
@@ -35,14 +35,6 @@ typedef struct {
                EVP_MD_CTX *omac_ctx;
 } gost_grasshopper_cipher_ctx_ctr;
 
-typedef int (* grasshopper_init_cipher_func)(EVP_CIPHER_CTX* ctx, const unsigned char* key, const unsigned char* iv,
-                                             int enc);
-
-typedef int (* grasshopper_do_cipher_func)(EVP_CIPHER_CTX* ctx, unsigned char* out, const unsigned char* in,
-                                           size_t inl);
-
-typedef void (* grasshopper_destroy_cipher_func)(gost_grasshopper_cipher_ctx* c);
-
 void gost_grasshopper_cipher_key(gost_grasshopper_cipher_ctx* c, const uint8_t* k);
 
 void gost_grasshopper_cipher_destroy(gost_grasshopper_cipher_ctx* c);
@@ -94,21 +86,7 @@ int gost_grasshopper_get_asn1_parameters(EVP_CIPHER_CTX* ctx, ASN1_TYPE* params)
 
 int gost_grasshopper_cipher_ctl(EVP_CIPHER_CTX* ctx, int type, int arg, void* ptr);
 
-EVP_CIPHER* cipher_gost_grasshopper_create(int cipher_type, int block_size);
-
-const int cipher_gost_grasshopper_setup(EVP_CIPHER* cipher, uint8_t mode, int iv_size, bool padding, int extra_flags);
-
-const EVP_CIPHER* cipher_gost_grasshopper(uint8_t mode, uint8_t num);
-
-extern const EVP_CIPHER* cipher_gost_grasshopper_ecb();
-extern const EVP_CIPHER* cipher_gost_grasshopper_cbc();
-extern const EVP_CIPHER* cipher_gost_grasshopper_ofb();
-extern const EVP_CIPHER* cipher_gost_grasshopper_cfb();
-extern const EVP_CIPHER* cipher_gost_grasshopper_ctr();
-extern const EVP_CIPHER* cipher_gost_grasshopper_ctracpkm();
-extern const EVP_CIPHER* cipher_gost_grasshopper_ctracpkm_omac();
-
-void cipher_gost_grasshopper_destroy(void);
+const EVP_CIPHER* cipher_gost_grasshopper_ctracpkm();
 
 #if defined(__cplusplus)
 }
index bb441c6521178acb6f9eb267dbabcda3896c1b0a..6ca32972ffe4a0db3e4468abf86a08cff0a402e3 100644 (file)
@@ -194,25 +194,6 @@ struct ossl_gost_digest_ctx {
     gost_hash_ctx dctx;
     gost_ctx cctx;
 };
-/* EVP_MD structure for GOST R 34.11 */
-EVP_MD *digest_gost(void);
-void digest_gost_destroy(void);
-/* EVP MD structure for GOST R 34.11-2012 algorithms */
-EVP_MD *digest_gost2012_256(void);
-EVP_MD *digest_gost2012_512(void);
-void digest_gost2012_256_destroy(void);
-void digest_gost2012_512_destroy(void);
-/* EVP_MD structure for GOST 28147 in MAC mode */
-EVP_MD *imit_gost_cpa(void);
-void imit_gost_cpa_destroy(void);
-EVP_MD *imit_gost_cp_12(void);
-void imit_gost_cp_12_destroy(void);
-EVP_MD *magma_omac(void);
-void magma_omac_destroy(void);
-EVP_MD *grasshopper_omac(void);
-EVP_MD *grasshopper_omac_acpkm(void);
-void grasshopper_omac_destroy(void);
-void grasshopper_omac_acpkm_destroy(void);
 /* Cipher context used for EVP_CIPHER operation */
 struct ossl_gost_cipher_ctx {
     int paramNID;
@@ -240,21 +221,8 @@ struct ossl_gost_imit_ctx {
     int key_set;
     int dgst_size;
 };
-/* Table which maps parameter NID to S-blocks */
-extern struct gost_cipher_info gost_cipher_list[];
 /* Find encryption params from ASN1_OBJECT */
 const struct gost_cipher_info *get_encryption_params(ASN1_OBJECT *obj);
-/* Implementation of GOST 28147-89 cipher in CFB and CNT modes */
-const EVP_CIPHER *cipher_gost_cpacnt();
-const EVP_CIPHER *cipher_gost_cpcnt_12();
-const EVP_CIPHER *cipher_magma_cbc();
-const EVP_CIPHER *cipher_magma_ctr();
-const EVP_CIPHER *cipher_magma_ctr_acpkm();
-const EVP_CIPHER *cipher_magma_ctr_acpkm_omac();
-const EVP_CIPHER *cipher_magma_wrap();
-const EVP_CIPHER *cipher_kuznyechik_wrap();
-void cipher_gost_destroy();
-void wrap_ciphers_destroy();
 
 void inc_counter(unsigned char *counter, size_t counter_bytes);
 
index e4403098cd4ea9df90994a76c616978d2d6a7ab4..86714ab6860c164f3858b1e43cf3a34c04533353 100644 (file)
--- a/gost_md.c
+++ b/gost_md.c
@@ -78,16 +78,6 @@ void GOST_deinit_digest(GOST_digest *d)
     d->digest = NULL;
 }
 
-EVP_MD *digest_gost(void)
-{
-    return GOST_init_digest(&GostR3411_94_digest);
-}
-
-void digest_gost_destroy(void)
-{
-    GOST_deinit_digest(&GostR3411_94_digest);
-}
-
 int gost_digest_init(EVP_MD_CTX *ctx)
 {
     struct ossl_gost_digest_ctx *c = EVP_MD_CTX_md_data(ctx);
index 2616abe9d4255cb662e98413e742cd58311b0723..3ea1e3642855cb7644001d6e221d886ae198ec84 100644 (file)
@@ -47,16 +47,6 @@ GOST_digest GostR3411_2012_256_digest = {
     .ctrl = gost_digest_ctrl_256,
 };
 
-EVP_MD *digest_gost2012_256(void)
-{
-    return GOST_init_digest(&GostR3411_2012_256_digest);
-}
-
-void digest_gost2012_256_destroy(void)
-{
-    GOST_deinit_digest(&GostR3411_2012_256_digest);
-}
-
 GOST_digest GostR3411_2012_512_digest = {
     .nid = NID_id_GostR3411_2012_512,
     .alias = "streebog512",
@@ -66,16 +56,6 @@ GOST_digest GostR3411_2012_512_digest = {
     .ctrl = gost_digest_ctrl_512,
 };
 
-EVP_MD *digest_gost2012_512(void)
-{
-    return GOST_init_digest(&GostR3411_2012_512_digest);
-}
-
-void digest_gost2012_512_destroy(void)
-{
-    GOST_deinit_digest(&GostR3411_2012_512_digest);
-}
-
 static int gost_digest_init512(EVP_MD_CTX *ctx)
 {
     init_gost2012_hash_ctx((gost2012_hash_ctx *) EVP_MD_CTX_md_data(ctx),
index 57660a69ee769c718043c86bbf8c9f922c89c6aa..47ad760edda55db1e13aa6b3895168cf822cf282 100644 (file)
@@ -277,23 +277,3 @@ GOST_digest grasshopper_mac_digest = {
     .result_size = 16,
     .init = grasshopper_imit_init,
 };
-
-EVP_MD *magma_omac(void)
-{
-    return GOST_init_digest(&magma_mac_digest);
-}
-
-void magma_omac_destroy(void)
-{
-    GOST_deinit_digest(&magma_mac_digest);
-}
-
-EVP_MD *grasshopper_omac(void)
-{
-    return GOST_init_digest(&grasshopper_mac_digest);
-}
-
-void grasshopper_omac_destroy(void)
-{
-    GOST_deinit_digest(&grasshopper_mac_digest);
-}
index 1d9cdd19e066309d191f44ab5ccb087c9282d9d7..93b9277dad08202e649572d1cce244c85379e94e 100644 (file)
@@ -509,13 +509,3 @@ GOST_digest kuznyechik_ctracpkm_omac_digest = {
     .cleanup = omac_acpkm_imit_cleanup,
     .ctrl = omac_acpkm_imit_ctrl,
 };
-
-EVP_MD *grasshopper_omac_acpkm(void)
-{
-    return GOST_init_digest(&kuznyechik_ctracpkm_omac_digest);
-}
-
-void grasshopper_omac_acpkm_destroy(void)
-{
-    GOST_deinit_digest(&kuznyechik_ctracpkm_omac_digest);
-}