A52HackTool 1.3.0
Turnkey & easy to use tool for cracking the GSM A5/2 cipher
code.h
Go to the documentation of this file.
00001 /*============================================================================*
00002  *                                                                            *
00003  *                                    code.h                                  *
00004  *                                                                            *
00005  *============================================================================*
00006  *                                                                            *
00007  * Part of A52HackTool                                                        *
00008  *                                                                            *
00009  * Copyright © 2011   -   Nicolas Paglieri   &   Olivier Benjamin             *
00010  * All rights reserved.                                                       *
00011  *                                                                            *
00012  * Contact Information:  nicolas.paglieri [at] ensimag.fr                     *
00013  *                       olivier.benjamin [at] ensimag.fr                     *
00014  *                                                                            *
00015  *============================================================================*
00016  *                                                                            *
00017  * This file may be used under the terms of the GNU General Public License    *
00018  * version 3 as published by the Free Software Foundation.                    *
00019  * See <http://www.gnu.org/licenses/> or GPL.txt included in the packaging of *
00020  * this file.                                                                 *
00021  *                                                                            *
00022  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE    *
00023  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  *
00024  *                                                                            *
00025  *============================================================================*/
00026 
00037 #ifndef _CODE_H_
00038 #define _CODE_H_
00039 
00040 #include "utils.h"
00041 
00042 #include "firecode.h"
00043 #include "const_code.h"
00044 #include "convolution.h"
00045 #include "interleaving.h"
00046 
00047 
00048 
00049 
00056 void processFullEncodingGMatrix(byte G[FIRE_SOURCE_LENGTH][INTERLEAVING_LENGTH]);
00057 
00058 
00059 
00060 
00069 void processFullEncodingGSystematicMatrix(byte G[FIRE_SOURCE_LENGTH][INTERLEAVING_LENGTH], byte L[FIRE_SOURCE_LENGTH][FIRE_SOURCE_LENGTH], byte P[INTERLEAVING_LENGTH][INTERLEAVING_LENGTH]);
00070 
00071 
00072 
00080 void processFullEncodingHSystematicMatrix(byte G[FIRE_SOURCE_LENGTH][INTERLEAVING_LENGTH], byte H[INTERLEAVING_LENGTH - FIRE_SOURCE_LENGTH][INTERLEAVING_LENGTH]);
00081 
00082 
00083 
00084 
00092 void processFullEncodingHMatrix(byte G[FIRE_SOURCE_LENGTH][INTERLEAVING_LENGTH], byte H[INTERLEAVING_LENGTH - FIRE_SOURCE_LENGTH][INTERLEAVING_LENGTH]);
00093 
00094 
00095 
00096 
00104 void InvertMatrixL(byte L[FIRE_SOURCE_LENGTH][FIRE_SOURCE_LENGTH], byte L_I[FIRE_SOURCE_LENGTH][FIRE_SOURCE_LENGTH]);
00105 
00106 
00107 
00108 
00116 void processFullDecoding(byte codeword[CODEWORD_LENGTH], byte sourceword[SOURCEWORD_LENGTH]);
00117 
00118 
00119 
00120 
00127 int code_test();
00128 
00129 
00130 
00131 
00132 #endif