Deleted Added
sdiff udiff text old ( 110007 ) new ( 160817 )
full compact
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
64#ifdef OPENSSL_NO_IDEA
65#error IDEA is disabled.
66#endif
67
68#define IDEA_ENCRYPT 1
69#define IDEA_DECRYPT 0
70
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);
87void idea_set_decrypt_key(const IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk);
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