Inheritance diagram for PolygraphiaIIICipherGenerator:
Collaboration diagram for PolygraphiaIIICipherGenerator:Class to generate ciphers based on Trithemius Polygraphia I, II & III substitution. It substitutes randomly from the underlying substitution list, contrary to PolygraphiaICipherGenerator witch substitutes in the order of the list. This substitution method is (for the case of P I & II) also known as "Ave Maria Cipher"
Public Types | |
| enum | EncipherMethod { ATBASH = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.ciphergenerators.AtbashCipherGenerator"), GEMATRIA = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.ciphergenerators.GematriaValueGenerator"), PLAYFAIR = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.ciphergenerators.PlayfairCipherGenerator"), POLYBUS = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.ciphergenerators.PolybusCipherGenerator"), CAESAR = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.ciphergenerators.CaesarCipherGenerator"), VIGNERE = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.ciphergenerators.VignereCipherGenerator"), POLYGRAPHIA_I = ("de.uni_koeln.spinfo.cryptology.steganalysis.ciphergenerators.PolygraphiaICipherGenerator"), POLYGRAPHIA_III = ("de.uni_koeln.spinfo.cryptology.steganalysis.ciphergenerators.PolygraphiaIIICipherGenerator"), POLYGRAPHIA_V = ("de.uni_koeln.spinfo.cryptology.cryptanalysis.ciphergenerators.PolygraphiaVCipherGenerator") } |
| enum | ConfigurationElement { KEY = ("Key"), ALPHABET = ("Alphabet"), REPLACEMENTS = ("Replacements"), WORD_SUBSTITUTES = ("Substitutes"), DELETE_WHITESPACE = ("Whitespace deletion") } |
Public Methods | |
| PolygraphiaIIICipherGenerator (List< List< String >> substitutes) | |
| PolygraphiaIIICipherGenerator (List< List< String >> substitutes, char[] alphabet) | |
| PolygraphiaIIICipherGenerator (Map< Character, List< String >> substitutes) | |
| PolygraphiaIIICipherGenerator (Map< Character, List< String >> substitutes, Map< String, String > replacements) | |
| PolygraphiaIIICipherGenerator () | |
| void | configure (Map< ConfigurationElement, String > configurations) |
| String | encipher (String plainText) |
| String | encipher (List< String > words) |
| 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()) |
Package Attributes | |
| Random | random |
enum ConfigurationElement [inherited] |
enum EncipherMethod [inherited] |
| PolygraphiaIIICipherGenerator | ( | List< List< String >> | substitutes | ) |
Generates a crypto-grapher based on the specified list of char-substitutions and the Trithemian alphabet (abcdefghiklmnopqrstuxyzw).
| substitutes | List of different substitutes lists. Each embedded list contains the substitutes for one character. |
| PolygraphiaIIICipherGenerator | ( | List< List< String >> | substitutes, |
| char[] | alphabet | ||
| ) |
Generates a crypto-grapher based on the specified list of substitutions and alphabet. Note that ideally the size of the list corresponds to the size of the alphabet.
| substitutes | List of different substitutes lists. Each embedded list contains the substitutes for one character. |
| PolygraphiaIIICipherGenerator | ( | Map< Character, List< String >> | substitutes | ) |
Generates a crypto-grapher based on the specified alphabet/substitutes map.
| substitutes | alphabet/substitutes map. Each list contains the different substitutions for the character. |
| PolygraphiaIIICipherGenerator | ( | Map< Character, List< String >> | substitutes, |
| Map< String, String > | replacements | ||
| ) |
Generates a crypto-grapher based on the specified alphabet/substitutes map. If second parameter is true, some replacement operations will take place for each plain text: 'v' will be substituted by 'u', 'j' by 'i', 'ß' by 'ss', 'ä' by 'ae' etc.
| substitutes | alphabet/substitutes map. Each list contains the different substitutions for the character. |
Generates a crypto-grapher that have to be configured afterwards by call the configure(Map<String,String> configurations) method.
| 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 crypto-grapher by the specified configurations. Must be called if this is generated by the non-argument-constructor.
| configurations |
Implements Cryptologer.
| String encipher | ( | String | plainText | ) |
Enciphers the specified text.
| plainText | text to encipher. |
Implements Encipherer.
| String encipher | ( | List< String > | words | ) |
Returns the cipher text of the specified cipher word sequence. Some methods (eg. Playfair) delete white spaces.
| words | Sequence of words to encipher. |
Implements Encipherer.
| 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] |
Random random [package] |
Map<String,String> replacementMap [protected, inherited] |
Map<Character, List<String> > wordSubstitutions [protected, inherited] |