Inheritance diagram for SteganographiaIncantationAnalyzer:
Collaboration diagram for SteganographiaIncantationAnalyzer:Class to analyse ciphers based on the steganographic method Trithemius described for the incanations in Steganographia I & II
Public Types | |
| enum | DecipherMethod { PLAYFAIR = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.plaintextgenerators.PlayfairCipherAnalyzer"), POLYBUS = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.plaintextgenerators.PolybusCipherAnalyzer"), CAESAR = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.plaintextgenerators.CaesarCipherAnalyzer"), VIGNERE = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.plaintextgenerators.VignereCipherAnalyzer"), ATBASH = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.plaintextgenerators.AtbashCipherAnalyzer"), STEGANOGRAPHIA_I = ("SteganographiaICipherAnalyzer"), STEGANOGRAPHIA_INCANTATION = ("de.uni_koeln.spinfo.cryptology.steganalysis.plaintextgenerators.SteganographiaIncantationAnalyzer"), POLYGRAPHIA_I = ("de.uni_koeln.spinfo.cryptology.steganalysis.plaintextgenerators.PolygraphiaICipherAnalyzer"), POLYGRAPHIA_IV = ("de.uni_koeln.spinfo.cryptology.steganalysis.plaintextgenerators.PolygraphiaIVCipherAnalyzer"), POLYGRAPHIA_V = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.plaintextgenerators.PolygraphiaVCipherGenerator") } |
| enum | ConfigurationElement { KEY = ("Key"), ALPHABET = ("Alphabet"), REPLACEMENTS = ("Replacements"), WORD_SUBSTITUTES = ("Substitutes"), DELETE_WHITESPACE = ("Whitespace deletion") } |
Public Methods | |
| String | decipher (String cipherText) |
| String | decipher (List< String > words) |
| void | configure (Map< ConfigurationElement, String > configurations) |
| String | getAssembledString () |
| Set< Character > | getAlphabet () |
| void | setAlphabet (char[] alphabet) |
| String | replaceAll (String toProcess) |
| Map< String, String > | getReplacements () |
| Map< String, String > | getReplacements () |
| Set< Character > | getAlphabet () |
Public Static Methods | |
| static String | assembleSignificantLetters (List< String > words, int pos) |
| static String | assembleSignificantLetters (List< String > words, List< Integer > positions) |
| static String | getPlaintextFromTrithemianIncantation (List< String > words) |
| static String | getPlaintextFromTrithemianSteganographianCipher (List< String > words, boolean[] significantSequence) |
| static char[] | getDefaultAlphabet () |
| static char[] | getDefaultAlphabetWithoutChar (char ch) |
| static char[] | getTrithemianAlphabet () |
| static Map< String, String > | trithemianAlphabetReplacements () |
Protected Methods | |
| boolean | checkSubstitutes (String substitutesString) |
| boolean | checkAlphabet (String alphabetString, char[] defaultAlphabet) |
| boolean | checkReplacements (String replacementString) |
| void | checkWSDeletion (String deleteWhitespace) |
| boolean | checkIntKey (String intKeyString, int defaultKey) |
| String | getAlphabetAsStringKey (int start) |
Protected Attributes | |
| Map< Character, List< String > > | wordSubstitutions |
| char[] | alphabet |
| Map< String, String > | replacementMap |
| int | intKey |
| boolean | deleteWhitespace |
| Logger | logger = Logger.getLogger(this.getClass()) |
enum ConfigurationElement [inherited] |
enum DecipherMethod [inherited] |
| static String assembleSignificantLetters | ( | List< String > | words, |
| int | pos | ||
| ) | [static, inherited] |
Static method to assemble significant letters of the specified word List on a String. If the specified position lies outside a word, it will be ignored.
| words | words with significant letters. |
| pos | position of significant letter of each word. Positive ints will be interpreted as position from start, negative from end of each word. |
| static String assembleSignificantLetters | ( | List< String > | words, |
| List< Integer > | positions | ||
| ) | [static, inherited] |
Static method to assemble significant letters of the specified word List on a String. Letters will be assembled in order of the specified positions. Positive position Integers will be interpreted as position from start, negative as positions from end of each word. Example: If the Integer List contains {3,-1,4} the significant letter order of the word "trithemius" will be "ist". If one of the specified positions lies outside a word, it will be ignored.
| words | words with significant letters. |
| positions | of significant letters of each word. |
| boolean checkAlphabet | ( | String | alphabetString, |
| char[] | defaultAlphabet | ||
| ) | [protected, inherited] |
Builds alphabet from specified string, if not null and not empty. Else the specified default alphabet will be set as alphabet.
| alphabetString | String to set as alphabet. |
| defaultAlphabet | default alphabet. |
| boolean checkIntKey | ( | String | intKeyString, |
| int | defaultKey | ||
| ) | [protected, inherited] |
Builds an integer key from the specified string.
| intKeyString | integer key as string |
| defaultKey | key to set if integer key could not be build from specified string. |
| boolean checkReplacements | ( | String | replacementString | ) | [protected, inherited] |
Builds replacement map from specified string that should be parsable CSV data.
| replacementString | replacements as csv data. |
| boolean checkSubstitutes | ( | String | substitutesString | ) | [protected, inherited] |
Builds the word substitution map using specified string. String must contain parsable csv data.
| substitutesString | csv substitute data |
Reimplemented in PolygraphiaICipherAnalyzer.
| void checkWSDeletion | ( | String | deleteWhitespace | ) | [protected, inherited] |
If specified string equals true, whitespace will be deleted in the substituted text.
| deleteWhitespace | boolean value as string |
| void configure | ( | Map< ConfigurationElement, String > | configurations | ) |
Configures the Cryptologer with the specified ConfigurationElement - String value pairs.
| configurations | Map of ConfigurationElement - String value pairs |
Implements Cryptologer.
| String decipher | ( | List< String > | words | ) |
Returns the plain text of the specified cipher word sequence.
| words | Sequence of words to decipher. |
Implements Decipherer.
| String decipher | ( | String | cipherText | ) |
Deciphers the specified text.
| cipherText | text to decipher. |
Implements Decipherer.
| Set<Character> getAlphabet | ( | ) | [inherited] |
Returns the alphabet of this crypto component.
| Set<Character> getAlphabet | ( | ) | [inherited] |
Returns a set of the alphabet of replacement characters
| String getAlphabetAsStringKey | ( | int | start | ) | [protected, inherited] |
Returns the alphabet as string key (starts from the specified position, e.g. 1 for a).
| start | Position of the alphabet to start. |
| String getAssembledString | ( | ) | [inherited] |
Assembles the significant letters of the specified word.
| word | to assemble. Returns the assembled plaintext String. |
| static char [] getDefaultAlphabet | ( | ) | [static, inherited] |
Returns the default alphabet (a-z), lower case letters.
| static char [] getDefaultAlphabetWithoutChar | ( | char | ch | ) | [static, inherited] |
Returns the default alphabet (a-z) without the specified character. Needed e.g. to get 25 letters for a 5 * 5 matrix.
| ch | character to ignore. |
| static String getPlaintextFromTrithemianIncantation | ( | List< String > | words | ) | [static, inherited] |
Static method to get the plaintext from a Trithemian incantation of Steganographia I & II.
| words | words of an incantation |
| static String getPlaintextFromTrithemianSteganographianCipher | ( | List< String > | words, |
| boolean[] | significantSequence | ||
| ) | [static, inherited] |
Static method to get the plaintext from a Trithemian cipher of Steganographia I & II. Eg. if significantSequence is [true, true, false, false] after two significant words will be deleted two words, if "One Two Three Four Five Six Seven" is the input, "One Two Five Six" will be analyzed, the returned String will be "otfs".
| words | words of the cipher |
| significantSequence | sequence of significant initial letters |
| Map<String, String> getReplacements | ( | ) | [inherited] |
Returns a map of the replacements that were used by the component
| Map<String, String> getReplacements | ( | ) | [inherited] |
| static char [] getTrithemianAlphabet | ( | ) | [static, inherited] |
Returns the Trithemian alphabet: abcdefghiklmnopqrstuxyzw.
| String replaceAll | ( | String | toProcess | ) | [inherited] |
Replaces characters of the specified string by the replacements set in this.
| toProcess | String to process. |
| void setAlphabet | ( | char[] | alphabet | ) | [inherited] |
Sets the alphabet of this crypto component.
| alphabet | to set. |
| static Map<String,String> trithemianAlphabetReplacements | ( | ) | [static, inherited] |
Returns a map of default alphabet values and their replacements in the T. alphabet.
char [] alphabet [protected, inherited] |
boolean deleteWhitespace [protected, inherited] |
int intKey [protected, inherited] |
Logger logger = Logger.getLogger(this.getClass()) [protected, inherited] |
Map<String,String> replacementMap [protected, inherited] |
Map<Character, List<String> > wordSubstitutions [protected, inherited] |