source: trunk/third/ssh/idea.h @ 12646

Revision 12646, 1.7 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12645, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2
3idea.h
4
5Author: Tatu Ylonen <ylo@cs.hut.fi>
6
7Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8                   All rights reserved
9
10Created: Sun Jun 25 04:44:30 1995 ylo
11
12The IDEA encryption algorithm.
13
14*/
15
16/*
17 * $Id: idea.h,v 1.1.1.2 1999-03-08 17:43:35 danw Exp $
18 * $Log: not supported by cvs2svn $
19 * Revision 1.1.1.1  1996/02/18  21:38:11  ylo
20 *      Imported ssh-1.2.13.
21 *
22 * Revision 1.2  1995/07/13  01:25:00  ylo
23 *      Removed "Last modified" header.
24 *      Added cvs log.
25 *
26 * $Endlog$
27 */
28
29#ifndef IDEA_H
30#define IDEA_H
31
32typedef struct
33{
34  word16 key_schedule[52];
35} IDEAContext;
36
37/* Sets idea key for encryption. */
38void idea_set_key(IDEAContext *c, const unsigned char key[16]);
39
40/* Destroys any sensitive data in the context. */
41void idea_destroy_context(IDEAContext *c);
42
43/* Performs the IDEA cipher transform on a block of data. */
44void idea_transform(IDEAContext *c, word32 l, word32 r, word32 *output);
45
46/* Encrypts len bytes from src to dest in CFB mode.  Len need not be a multiple
47   of 8; if it is not, iv at return will contain garbage. 
48   Otherwise, iv will be modified at end to a value suitable for continuing
49   encryption. */
50void idea_cfb_encrypt(IDEAContext *c, unsigned char *iv, unsigned char *dest,
51                      const unsigned char *src, unsigned int len);
52
53
54/* Decrypts len bytes from src to dest in CFB mode.  Len need not be a multiple
55   of 8; if it is not, iv at return will contain garbage. 
56   Otherwise, iv will be modified at end to a value suitable for continuing
57   decryption. */
58void idea_cfb_decrypt(IDEAContext *c, unsigned char *iv, unsigned char *dest,
59                      const unsigned char *src, unsigned int len);
60
61#endif /* IDEA_H */
62
Note: See TracBrowser for help on using the repository browser.