public abstract class Steganography
extends java.lang.Object
under research/steganography/
In the Alice and Bob prison scenario as discussed in the paper referenced this
stegosystem only provides security against a PRIMITIVE computerized analysis
that merely looks for textual data, (just looking for words instead of
random encrypted charaters). The stegotext currently produced will fail against
any form of statistical analysis or primitive natural language processing by
an adversarial computer system.
TODO Do more research and add support to incorporate information theory and
natural language processing operations so that stegotext appears as information
rather than just textual data.
Modifier and Type | Field and Description |
---|---|
private static int |
MIN_DICT_SIZE |
Constructor and Description |
---|
Steganography() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
deObfuscate(java.lang.String stegotext,
java.lang.String[] inverseDictionary,
java.text.Collator c)
De-obfuscates the stegotext back into the original content by using the unique
words INVERSE dictionary provided.
|
static <T extends java.lang.Comparable<? super T>> |
generateDict(java.lang.String[] uniqueDictionary,
java.text.CollationKey[] inverseDictionary,
java.lang.String[] masterDictionary,
java.util.Comparator<T> c,
ISAACRandomGenerator engine)
Generates the unique dictionary and it's inverse dictionary as a subset of the
master dictionary given the random generator engine.
|
static java.lang.String |
obfuscate(byte[] content,
java.lang.String[] uniqueDictionary)
Obfuscates the content by generating a stegotext using unique words from the dictionary
provided.
|
private static final int MIN_DICT_SIZE
public static <T extends java.lang.Comparable<? super T>> void generateDict(java.lang.String[] uniqueDictionary, java.text.CollationKey[] inverseDictionary, java.lang.String[] masterDictionary, java.util.Comparator<T> c, ISAACRandomGenerator engine) throws java.lang.Exception, DataLengthException, java.lang.IllegalArgumentException
uniqueDictionary
- An array which will be populated with a dictionary of unique words
for values, this is used in obfuscating encrypted messages, must be >= 65,537 elementsinverseDictionary
- An array which will be populated with the inverse values of
the uniquely generated dictionary, this is used in de-obfuscating stegotext,
must be >= 65,537 elementsmasterDictionary
- An array containing each of the unique words in the master
dictionary, must be twice size of the dictionariesc
- The comparator to use for performing comparisons on the words in the dictionary,
using Collator with the language locale specified is recommendedengine
- The random generator engine, ISAACEngine is currently the only accepted engine
as it supports a reproducible random number sequence using a seed value given by the seed
derivative functionDataLengthException
- If The dictionary and inverseDictionary are not the same size
or if the master dictionary is not at least twice the size of the dictionariesjava.lang.IllegalArgumentException
- If a comparator other than Collator is provided or if
a random number generator other than ISAACRandomGenerator is providedjava.lang.Exception
public static java.lang.String obfuscate(byte[] content, java.lang.String[] uniqueDictionary) throws DataLengthException
content
- The content to be transformed into an obfuscated stegotextuniqueDictionary
- A unique dictionary mapping hex values (keys) to wordsDataLengthException
- If the content in bytes is not divisible by two, or if
the unique dictionary does not contain 65,537 or more words,
TODO Research into adding NLP/Information theory support to generate
stegotext that appears as information rather than just textual datapublic static byte[] deObfuscate(java.lang.String stegotext, java.lang.String[] inverseDictionary, java.text.Collator c) throws DataLengthException, java.lang.IllegalArgumentException, java.lang.Exception
stegotext
- The obfuscated stegotext to be transformed into the original contentinverseDictionary
- The INVERSE unique dictionary for mapping words to hex values (keys)c
- The comparator to use for performing comparisons when looking up words in the
inverse dictionaryDataLengthException
- If the inverse dictionary does not contain 65,537 or more wordsjava.lang.Exception
- If there is an error converting from the stegotext to the original content
TODO Research into adding NLP/Information theory support to generate stegotext that appears
as information rather than just textual datajava.lang.IllegalArgumentException