idea.h (110007) | idea.h (160817) |
---|---|
1/* crypto/idea/idea.h */ 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 45 unchanged lines hidden (view full) --- 54 * derivative of this code cannot be changed. i.e. this code cannot simply be 55 * copied and put under another distribution licence 56 * [including the GNU Public Licence.] 57 */ 58 59#ifndef HEADER_IDEA_H 60#define HEADER_IDEA_H 61 | 1/* crypto/idea/idea.h */ 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 45 unchanged lines hidden (view full) --- 54 * derivative of this code cannot be changed. i.e. this code cannot simply be 55 * copied and put under another distribution licence 56 * [including the GNU Public Licence.] 57 */ 58 59#ifndef HEADER_IDEA_H 60#define HEADER_IDEA_H 61 |
62#include <openssl/opensslconf.h> /* IDEA_INT, OPENSSL_NO_IDEA */ 63 |
|
62#ifdef OPENSSL_NO_IDEA 63#error IDEA is disabled. 64#endif 65 66#define IDEA_ENCRYPT 1 67#define IDEA_DECRYPT 0 68 | 64#ifdef OPENSSL_NO_IDEA 65#error IDEA is disabled. 66#endif 67 68#define IDEA_ENCRYPT 1 69#define IDEA_DECRYPT 0 70 |
69#include <openssl/opensslconf.h> /* IDEA_INT */ | |
70#define IDEA_BLOCK 8 71#define IDEA_KEY_LENGTH 16 72 73#ifdef __cplusplus 74extern "C" { 75#endif 76 77typedef struct idea_key_st 78 { 79 IDEA_INT data[9][6]; 80 } IDEA_KEY_SCHEDULE; 81 82const char *idea_options(void); 83void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 84 IDEA_KEY_SCHEDULE *ks); 85void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); | 71#define IDEA_BLOCK 8 72#define IDEA_KEY_LENGTH 16 73 74#ifdef __cplusplus 75extern "C" { 76#endif 77 78typedef struct idea_key_st 79 { 80 IDEA_INT data[9][6]; 81 } IDEA_KEY_SCHEDULE; 82 83const char *idea_options(void); 84void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 85 IDEA_KEY_SCHEDULE *ks); 86void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); |
86void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); | 87void idea_set_decrypt_key(const IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); |
87void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 88 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); 89void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, 90 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 91 int *num,int enc); 92void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, 93 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); 94void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 95#ifdef __cplusplus 96} 97#endif 98 99#endif | 88void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 89 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); 90void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, 91 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 92 int *num,int enc); 93void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, 94 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); 95void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 96#ifdef __cplusplus 97} 98#endif 99 100#endif |