Skip to content
mindreframer edited this page Sep 13, 2010 · 4 revisions

Original Project

This goth poetry generator is part of a larger project to do with steganography. At one point, it was necessary to generate a lot of ‘noise’ data within which to hide encrypted ‘signal’ data. The grammar-based generator used here was created to produce a large amount of junk data which cannot easily be distinguished from real text without human intervention.

The generator was implemented in Ruby because Ruby is fun and lends itself well to this sort of thing, and because at that time it wasn’t yet obvious that no effort would be made to make Ruby generally useful (which is a rant for another time).

The text generator does it’s job of creating text that is hard for a computer to tell apart from real data well. It is possible, given a large body of real data, to generate a grammar from sample data and then generate fake data from the grammar. It is also possible to use grammar-based generation to create binary data for steganography, although I haven’t explored that angle.

Grammar
The generator takes a text grammar file as its input. You may be able to work out the details by looking at the example file, but here is a rough guide:

Clone this wiki locally