![]() |
A52HackTool 1.3.0
Turnkey & easy to use tool for cracking the GSM A5/2 cipher
|
Specification of A52 attack. More...
Go to the source code of this file.
Data Structures | |
| struct | cipherTextArgs |
| Set of arguments to be provided to perform the attack. More... | |
| struct | threadArgs |
| Set of arguments related to a thread in a multithreaded attack context. More... | |
Defines | |
| #define | SYNDROME_EMPTY_EQUATIONS (NEEDED_ENCRYPTED_MESSAGES*SYNDROME_LENGTH - REGS_TOTAL_VARS) |
| Number of empty equations remaining after proceeding to Gauss Elimination in (HS × ? = Syndrome) | |
Functions | |
| void | freeRAM () |
| Frees the RAM used to store resolution matrices. | |
| int | initializeRAM (const char *filename) |
| Initializes the RAM storage of resolution matrices from a given binary file. | |
| int | attack (cipherTextArgs *ctArgs, byte secretKey[SECRETKEY_BITS]) |
| Performs the attack on a given problem, then writes back the solution. | |
| int | attack_test () |
| Autotests the attack on a verified set of problem/solution. | |
Specification of A52 attack.
| int attack | ( | cipherTextArgs * | ctArgs, |
| byte | secretKey[SECRETKEY_BITS] | ||
| ) |
Performs the attack on a given problem, then writes back the solution.
| [in] | ctArgs | Problem to be solved |
| [out] | secretKey | Deciphered secret key if the attack succeeded, all zeros otherwise |
References ALLMATRICES, attack_launchAttack(), threadArgs::ctArgs, DEBUG, DUMP_CHAR_VECTOR, threadArgs::highindex, threadArgs::keyFound, threadArgs::lowindex, PROCESSING_THREADS, and THREAD_CHUNKSIZE.
Referenced by attack_test(), and main().
| int attack_test | ( | ) |
Autotests the attack on a verified set of problem/solution.
References attack(), BINPRODUCT_VECTOR_MATRIX, cipherTextArgs::cipherText1, cipherTextArgs::cipherText2, cipherTextArgs::cipherText3, CODEWORD_LENGTH, DEBUG, DEBUG_LF, DUMP_CHAR_VECTOR, cipherTextArgs::frameId, FRAMEID_BITS, freeRAM(), getKeystream(), initializeRAM(), keysetup(), NEEDED_ENCRYPTED_MESSAGES, processFullEncodingGMatrix(), SECRETKEY_BITS, SOURCEWORD_LENGTH, and XOR_CHARARRAYS.
Referenced by main().
| int initializeRAM | ( | const char * | filename | ) |
Initializes the RAM storage of resolution matrices from a given binary file.
| [in] | filename | Path of the file containing resolution matrices |
References ALLMATRICES, BUFFER_SIZE, DEBUG, freeRAM(), NEEDED_ENCRYPTED_MESSAGES, RESOLUTION_MATRIX_INT_WIDTH, SYNDROME_LENGTH, and TOTAL_MATRICES.
Referenced by attack_test(), and main().
1.7.4