FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/include/condat/cl_des.h @ 897:e8bdd3d0c4c2
top README: status update
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Wed, 01 Jul 2015 06:29:55 +0000 |
parents | 39bacc7d5c49 |
children |
rev | line source |
---|---|
662
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 | Project : COMLIB |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 | Modul : cl_des.h |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 | All rights reserved. |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 | |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 | Purpose : Definitions of global types used by common library functions |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 | and the prototypes of those functions. |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 +----------------------------------------------------------------------------- |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 * Version 1.0 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 /**********************************************************************************/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 #ifndef CL_DES_H |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #define CL_DES_H |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 /**********************************************************************************/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #define CL_DES_BUFFER_SIZE 8 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #define CL_DES_KEY_SIZE 8 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #define CL_DES_ENCRYPTION 1 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #define CL_DES_DECRYPTION 2 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 +------------------------------------------------------------------------------ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 | Function : cl_des |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 +------------------------------------------------------------------------------ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 | Description : The function performs DES encrypting or decrypting |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 | |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 | Parameters : inMsgPtr : pointer to input message M. The length of message |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 | has to be min. 8 bytes e.g. M = 0123456789abcdef |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 | desKeyPtr : pointer to DES key. Length has to be 8 bytes |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 | outMsgPtr : output encrypted/decrypted message. The length is 8 b. |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 | code : CL_DES_ENCRYPTION, CL_DES_DECRYPTION |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 +------------------------------------------------------------------------------ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 EXTERN void cl_des(UBYTE *inMsgPtr, UBYTE *desKeyPtr, UBYTE *outMsgPtr, UBYTE code); |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 /**********************************************************************************/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 #endif /* CL_DES_H */ |