comparison rvinterf/etmsync/cl_des.h @ 14:3d148edb87c2

eliminated the dependency on OpenSSL for Pirelli IMEI DES decryption
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 03 Oct 2016 07:00:55 +0000
parents
children
comparison
equal deleted inserted replaced
13:46ad66a231af 14:3d148edb87c2
1 /*
2 * This DES implementation is used for the purpose of decrypting
3 * Pirelli's factory IMEI record; it has been lifted out of TI's
4 * reference GSM firmware source.
5 */
6
7 #ifndef CL_DES_H
8 #define CL_DES_H
9
10 /**********************************************************************************/
11
12 #define CL_DES_BUFFER_SIZE 8
13 #define CL_DES_KEY_SIZE 8
14 #define CL_DES_ENCRYPTION 1
15 #define CL_DES_DECRYPTION 2
16
17 /*
18 +------------------------------------------------------------------------------
19 | Function : cl_des
20 +------------------------------------------------------------------------------
21 | Description : The function performs DES encrypting or decrypting
22 |
23 | Parameters : inMsgPtr : pointer to input message M. The length of message
24 | has to be min. 8 bytes e.g. M = 0123456789abcdef
25 | desKeyPtr : pointer to DES key. Length has to be 8 bytes
26 | outMsgPtr : output encrypted/decrypted message. The length is 8 b.
27 | code : CL_DES_ENCRYPTION, CL_DES_DECRYPTION
28 +------------------------------------------------------------------------------
29 */
30 extern void cl_des(unsigned char *inMsgPtr, unsigned char *desKeyPtr,
31 unsigned char *outMsgPtr, unsigned char code);
32
33
34 /**********************************************************************************/
35
36 #endif /* CL_DES_H */