Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:44

0001 /*
0002  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
0003  *
0004  * Licensed under the Apache License 2.0 (the "License").  You may not use
0005  * this file except in compliance with the License.  You can obtain a copy
0006  * in the file LICENSE in the source distribution or at
0007  * https://www.openssl.org/source/license.html
0008  */
0009 
0010 #ifndef OPENSSL_IDEA_H
0011 # define OPENSSL_IDEA_H
0012 # pragma once
0013 
0014 # include <openssl/macros.h>
0015 # ifndef OPENSSL_NO_DEPRECATED_3_0
0016 #  define HEADER_IDEA_H
0017 # endif
0018 
0019 # include <openssl/opensslconf.h>
0020 
0021 # ifndef OPENSSL_NO_IDEA
0022 #  ifdef  __cplusplus
0023 extern "C" {
0024 #  endif
0025 
0026 #  define IDEA_BLOCK      8
0027 #  define IDEA_KEY_LENGTH 16
0028 
0029 #  ifndef OPENSSL_NO_DEPRECATED_3_0
0030 
0031 typedef unsigned int IDEA_INT;
0032 
0033 #   define IDEA_ENCRYPT    1
0034 #   define IDEA_DECRYPT    0
0035 
0036 typedef struct idea_key_st {
0037     IDEA_INT data[9][6];
0038 } IDEA_KEY_SCHEDULE;
0039 #endif
0040 #ifndef OPENSSL_NO_DEPRECATED_3_0
0041 OSSL_DEPRECATEDIN_3_0 const char *IDEA_options(void);
0042 OSSL_DEPRECATEDIN_3_0 void IDEA_ecb_encrypt(const unsigned char *in,
0043                                             unsigned char *out,
0044                                             IDEA_KEY_SCHEDULE *ks);
0045 OSSL_DEPRECATEDIN_3_0 void IDEA_set_encrypt_key(const unsigned char *key,
0046                                                 IDEA_KEY_SCHEDULE *ks);
0047 OSSL_DEPRECATEDIN_3_0 void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek,
0048                                                 IDEA_KEY_SCHEDULE *dk);
0049 OSSL_DEPRECATEDIN_3_0 void IDEA_cbc_encrypt(const unsigned char *in,
0050                                             unsigned char *out, long length,
0051                                             IDEA_KEY_SCHEDULE *ks,
0052                                             unsigned char *iv, int enc);
0053 OSSL_DEPRECATEDIN_3_0 void IDEA_cfb64_encrypt(const unsigned char *in,
0054                                               unsigned char *out, long length,
0055                                               IDEA_KEY_SCHEDULE *ks,
0056                                               unsigned char *iv, int *num,
0057                                               int enc);
0058 OSSL_DEPRECATEDIN_3_0 void IDEA_ofb64_encrypt(const unsigned char *in,
0059                                               unsigned char *out, long length,
0060                                               IDEA_KEY_SCHEDULE *ks,
0061                                               unsigned char *iv, int *num);
0062 OSSL_DEPRECATEDIN_3_0 void IDEA_encrypt(unsigned long *in,
0063                                         IDEA_KEY_SCHEDULE *ks);
0064 #endif
0065 
0066 #  ifndef OPENSSL_NO_DEPRECATED_1_1_0
0067 #   define idea_options          IDEA_options
0068 #   define idea_ecb_encrypt      IDEA_ecb_encrypt
0069 #   define idea_set_encrypt_key  IDEA_set_encrypt_key
0070 #   define idea_set_decrypt_key  IDEA_set_decrypt_key
0071 #   define idea_cbc_encrypt      IDEA_cbc_encrypt
0072 #   define idea_cfb64_encrypt    IDEA_cfb64_encrypt
0073 #   define idea_ofb64_encrypt    IDEA_ofb64_encrypt
0074 #   define idea_encrypt          IDEA_encrypt
0075 #  endif
0076 
0077 #  ifdef  __cplusplus
0078 }
0079 #  endif
0080 # endif
0081 
0082 #endif