|
libenigma
Enigma machine utility library
|
#include "crack.h"Go to the source code of this file.
Macros | |
| #define | ENIGMA_BIIDX(a, b) ((a << 5) | b) |
| Generate a bigram index from two characters (for array lookup) | |
| #define | ENIGMA_TRIIDX(a, b, c) ((a << 10) | (b << 5) | c) |
| Generate a trigram index from three characters (for array lookup) | |
| #define | ENIGMA_QUADIDX(a, b, c, d) ((a << 15) | (b << 10) | (c << 5) | d) |
| Generate a quadgram index from four characters (for array lookup) | |
Functions | |
| float | enigma_bigram_score (const EnigmaCrackParams *, const char *) |
| Score text using bigram frequencies. | |
| float | enigma_trigram_score (const EnigmaCrackParams *, const char *) |
| Score text using trigram frequencies. | |
| float | enigma_quadgram_score (const EnigmaCrackParams *, const char *) |
| Score text using quadgram frequencies. | |
This file declares functions for cracking Enigma configurations using n-gram scoring.
| #define ENIGMA_BIIDX | ( | a, | |
| b | |||
| ) | ((a << 5) | b) |
Generate a bigram index from two characters (for array lookup)
| #define ENIGMA_QUADIDX | ( | a, | |
| b, | |||
| c, | |||
| d | |||
| ) | ((a << 15) | (b << 10) | (c << 5) | d) |
Generate a quadgram index from four characters (for array lookup)
| #define ENIGMA_TRIIDX | ( | a, | |
| b, | |||
| c | |||
| ) | ((a << 10) | (b << 5) | c) |
Generate a trigram index from three characters (for array lookup)
| float enigma_bigram_score | ( | const EnigmaCrackParams * | cfg, |
| const char * | text | ||
| ) |
Score text using bigram frequencies.
| cfg | Pointer to the cracking configuration structure. |
| text | The text to score. |
| float enigma_quadgram_score | ( | const EnigmaCrackParams * | cfg, |
| const char * | text | ||
| ) |
Score text using quadgram frequencies.
| cfg | Pointer to the cracking configuration structure. |
| text | The text to score. |
| float enigma_trigram_score | ( | const EnigmaCrackParams * | cfg, |
| const char * | text | ||
| ) |
Score text using trigram frequencies.
| cfg | Pointer to the cracking configuration structure. |
| text | The text to score. |