downloaded

advertisement
Final Year Project
Steganography & Games
Supervisor: Dr. Conn Mulvihill
Group Members
David Earls
Shane Martin
01436007
01368877
Date: 23 March 2007
Page | 1
Acknowledgements:
We would like to express our sincere gratitude to our project supervisor Dr. Conn Mulvihill. His
knowledge of steganography and computer games proved an enormous help.
We would also like to thank the I.T. department staff for all of their help.
David Earls
Shane Martin.
Page | 2
Table of Contents
Chapter 1 – Introduction
1.1 Project Goals ..................................................................................................................... 1
1.2 Report Content .................................................................................................................. 1
Chapter 2 – Background
2.1 Introduction ........................................................................................................................ 2
2.1.1 Cyber-Crime
2.1.2 Plausible Deniability
2.2 Steganography ..................................................................................................................... 3
2.2.1 Introduction
2.2.2 History
2.2.3 Techniques
- Insertion-Based
- Substitution-Based
- Generation-Based
2.2.4 Common Media for Steganography
- Image Files
- Audio Files
- Text Files
2.2.5 Steganalysis
2.3 Games ................................................................................................................................. 6
2.3.1 Introduction
2.3.2 History of Computer Games
2.3.3 Games Industry
2.3.4 Game Maker
Page | 3
Chapter 3 – Design and Implementation
3.1 Introduction.......................................................................................................................... 13
3.2 Hiding Information – Design.................................................................................................. 13
3.2.1 Sprites
3.2.2 Paths
3.2.3 Sound
3.2.4 Message Boxes
3.2.5 Rooms
3.2.6 Advanced Methods of Transmitting Information using Sprites
- Huffman Coding
- Eulerian Path
- Hamiltonian Cycle
3.3 Hiding Information – Implementation................................................................................... 25
3.3.1 Sprites – Basic Text Example
3.3.2 Paths – Basic Text Example
3.3.3 Sound – Basic Text File Example
3.3.4 Message Box – Basic Text & Space Example
3.3.5 Sprites – Basic, Intermediate Text Example demonstrating Logic Circuits, Hidden
Rooms & Huffman Coding
3.3.6 Advanced Sprites Example – Eulerian Path
3.3.7 Advanced Sprites Example – Hamiltonian Cycle
Page | 4
Chapter 4 – Evaluation
4.1 Introduction ........................................................................................................................... 52
4.2 Project Goals ……………………………………………………………………………………………………………………… 52
4.3 Hiding Information - Sprite Technique ……............................................................................. 53
4.4 Hiding Information - Paths Technique …….............................................................................. 53
4.5 Hiding Information – Message Box Technique....................................................................... 53
4.6 Hiding Information - Sound Technique ……............................................................................. 54
4.7 Hiding Information - Room Technique ……............................................................................. 54
4.8 Hiding Information – Huffman Coding.…….............................................................................. 54
4.9 Hiding Information – Logic Circuit ……..................................................................................... 54
4.10 Hiding Information - Eulerian Graph ……………....................................................................... 54
4.11 Hiding Information – Hamiltonian Cycle …………….................................................................. 55
4.12 Game Maker Evaluation......................................................................................................... 55
4.13 Conclusion…………………………………………………………………………………………………………………………. 55
Chapter 5 – Conclusion
5.1 Conclusion .............................................................................................................................. 57
5.2 Future Work ........................................................................................................................... 57
References.................................................................................................................................... 59
Page | 5
Chapter 1 – Introduction
1.1 Project Goals
The aim of this project is to develop a set of effective stego techniques for concealing
information within a computer game. Due to the high graphical content in some computer games, this is
the ideal medium for hiding information. The project involved
1. Research into the background of Steganography.
2. Choice of an appropriate platform on which to create our game environment.
3. Design of techniques to successfully hide information within our game.
4. Creation of the game and implementation of the created techniques.
5. Evaluation of the techniques weighing the advantages and disadvantages of each
1.2 Report Content
The following gives a breakdown of the report contents and how it is broken down over the
chapters.
Chapter 1:
Will provide a general introduction to the project and its goals. It will also give a
breakdown of the report’s content.
Chapter 2:
This section will provide an overview of the main areas of research that were
undertaken in preparation for the design and implementation section of the project. It is hoped that the
reader will gain an insight into the topics researched.
Chapter 3:
This section gives a detailed account of the different hiding techniques that were
devised over the course of the project. It will give an idea of the progression of one technique to the
next.
Chapter 4:
Will evaluate the techniques and algorithms used in the project.
Chapter 5:
Conclusion
Page | 6
Chapter 2 – Background
2.1 Introduction
2.1.1 Cyber Crime
Cyber Crime is a term used broadly to describe criminal activity in which computers or
networks are a tool, a target, or a place of criminal activity. It is one of the world's costliest problems,
but one which many organisations fail to secure themselves properly against.
The Computer Crime and Security Survey [1] is conducted by the Computer Security
Institute with the participation of the San Francisco Federal Bureau of Investigation’s Computer
Intrusion Squad. The survey is now in its 11th year. The 2006 survey results are based on the responses
of 616 security practitioners in U.S. corporations, government agencies, financial institutions, medical
institutions and universities.
Total losses for 2006 were US$52,494,290 for the 313 respondents that were willing and
able to estimate losses. This is an average loss of US$167,713 per respondent. This is down from losses
of US$130,104,542 for the 639 respondents in 2005 (average US$203,606).
Virus attacks continue to be the source of the greatest financial losses (US$ 15.6m).
Unauthorized access continues to be the second-greatest source of financial loss (US$ 10.6m). Financial
losses related to laptops, or mobile hardware, (US$6.6m) and theft of proprietary information (i.e.,
intellectual property) (US$6m) are third and fourth. These four categories account for more than 74
percent of financial losses.
The percentage of organizations reporting computer intrusions to law enforcement
stands at 25 percent as compared with 20 percent in the previous two years. However, negative
publicity from reporting intrusions to law enforcement is still a major concern for most organizations.
When asked why they didn't report security intrusions to law enforcement, 48% of the 226 respondents
gave the reason that the negative publicity would hurt the company's image.
Encryption remains the primary method used to protect information in the event it is
accessed of obtained illegally. It involves encrypting the vital information into an undecipherable form.
Only a recipient with the correct key will be able to decipher the information. The downside of
encryption is that is immediately apparent to anyone acquiring the file that there is hidden information
within the file.
Another option is steganography. Rather that encrypting the information, it is hidden
inside another, apparently innocuous file. The benefit of this method is that someone acquiring the file
might not even know that there is valuable information contained within it. As the world becomes more
anxious about the use of any secret communication, and as regulations are created by governments to
limit uses of encryption, steganography’s role is gaining prominence.
Page | 7
2.1.2 Plausible Deniability
Plausible Deniability means that if the information hidden within the game is
discovered, the user has concrete grounds for denial. This is a high priority when creating stego
technique. The user can make a strong argument that they didn't know anything about there being
information hidden within the medium.
2.2 Steganography
2.2.1 Introduction
Steganography is the art and science of writing hidden messages in such a way that no
one apart from the intended recipient knows of the existence of the message; this differs from
cryptography, the art of secret writing, which is intended to make a message unreadable by a third party
but does not hide the existence of the secret communication.
The purpose of steganography is covert communication—to hide the existence of a
message from a third party.
Generally, a steganographic message will appear to be something else: a picture, an
article, a shopping list, or some other message. This apparent message is the cover text. For instance, a
message may be hidden by using invisible ink between the visible lines of innocuous documents.
The advantage of steganography over cryptography alone is that messages do not
attract attention to themselves, to messengers, or to recipients. An unhidden coded message, no matter
how unbreakable it is, will arouse suspicion and may in itself be incriminating, as in some countries
encryption is illegal. [2]
2.2.2 History
The word "Steganography" is of Greek origin and means "covered or hidden writing". Its
ancient origins can be traced back to 440 BC.
In ancient times, messages were hidden on the back of wax writing tables, written on
the stomachs of rabbits, or tattooed on the scalp of slaves. Invisible ink has been in use for centuries—
for fun by children and students and for serious espionage by spies and terrorists. Microdots and
microfilm, a staple of war and spy movies, came about after the invention of photography.
2.2.3 Techniques
Insertion-Based
Using this technique, you store the data you want to hide in sections of a file that are
ignored by the processing application. By doing this you avoid modifying those file bits that are relevant
to an end-user—leaving the cover file perfectly usable.
Page | 8
For example, with some files there is an EOF or end-of-file marker. This flag signifies to
the application that is reading the file that it has reached the end of the file and the application can stop
processing the file. Hidden information can then be inserted after the EOF marker. The end-user may
not even realize that the file contains additional hidden information. However, using an insertion
technique changes file size according to the amount of data hidden and therefore, if the file looks
unusually large, it may arouse suspicion.
Substitution-Based
Using this approach, you replace the least significant bits of information that determine
the meaningful content of the original file with new data in a way that causes the least amount of
distortion.
The main advantage of that technique is that the cover file size does not change after
the execution of the algorithm. There is, however, a limit to the amount of data you can hide with this
approach as there is a limited amount of insignificant data in any given file.
Generation-Based
Unlike insertion and substitution, this technique doesn't require an existing cover file—
this technique generates a cover file for the sole purpose of hiding the message.
The main flaw of the insertion and substitution techniques is that people can compare
the stego file with any pre-existing copy of the cover file (which is supposed to be the same file) and
discover differences between the two. You won't have that problem when using a generation approach,
because the result is an original file, and is therefore immune to comparison tests. [3] [4]
2.2.4 Common Media for Steganography
Image Files
Image files are probably the most common medium for hiding files. Most of the stego
techniques that use image files involve manipulation of the image’s colour tables.
8-bit images use a colour table of 256 RGB values. Each pixel is represented by a byte,
which is then used to pick out the pixel’s RGB value from the colour table. In order to hide data in 8-bit
images, S-Tools modifies the image to only use a 32-colour palette instead of 256. These 32 colours are
duplicated 8 times in order to fill the colour table. The duplicate entries are then used to store the secret
message in the three least significant bits for each RGB entry. This all means that each colour in the
modified image can be represented in eight different ways, which leaves redundant representations in
which information can be hidden. [21]
Page | 9
Audio Files
Audio files are also a popular medium. As with image files it is very difficult to detect
hidden information without a detection tool and just by listening.
S-Tools uses least significant bit insertion to hide information in a sound file. This
involves replacing the least significant bit of each byte with one bit of the message we are trying to hide.
There is no way for anyone to detect the difference simply by listening to the file. [21]
Text Files
Data can also be hidden in text files. There are several methods available, including the
template technique, deliberate misspelling, changes in spacing, or the use of slightly different fonts
(such as Courier and Courier New).
The template method [5] involves a set of preselected locations on a page to hide a
message. Consider the note:
THE MOST COMMON WORK ANIMAL IS THE HORSE. THEY CAN BE USED
TO FERRY EQUIPMENT TO AND FROM WORKERS OR TO PULL A PLOW.
BE CAREFUL, THOUGH, BECAUSE SOME HAVE SANK UP TO THEIR
KNEES IN MUD OR SAND, SUCH AS AN INCIDENT AT THE BURLINGTON
FACTORY LAST YEAR. BUT HORSES REMAIN A SIGNIFICANT FIND. ON
A FARM, AN ALTERNATE WORK ANIMAL MIGHT BE A BURRO BUT THEY
ARE NOT AS COMFORTABLE AS A TRANSPORT ANIMAL.
Applying a template or rule as to which words to read to this message might yield the following:
HORSE
FERRY
SANK
IN
BURLINGTON
FIND
ALTERNATE
TRANSPORT
2.2.5 Steganlysis
Steganalysis is the science of detecting messages hidden using steganography. The goal
of steganalysis is to identify suspected packages, determine whether or not they have a payload
encoded into them and, if possible, recover that payload. [6]
Unlike cryptanalysis, where it is obvious that intercepted data contains a message
(though that message is encrypted), steganalysis generally starts with a pile of suspect data files, but
little information about which of the files, if any, contain a payload.
Page | 10
One case where detection of suspect files is straightforward is when the original,
unmodified carrier is available for comparison. Comparing the package against the original file will yield
the differences caused by encoding the payload-- and, thus, the payload can be extracted.
However, this is only part of the problem, as the payload has often been encrypted first.
Encrypting the payload is not always done solely to make recovery of the payload more difficult. Many
encryption techniques have the desirable property of making the payload appear much more like welldistributed noise, which can make detection efforts more difficult, and save the steganographic
encoding technique the trouble of having to distribute the signal energy evenly. [7]
2.3 Games
2.3.1 Introduction
Through the years, man has searched for enjoyable and entertaining activities with
which to spend his free time. Many different types of games have been invented, such as sports, card
games, and board games. The major developments in the fields of electronics and information
technology in the last century have made a new kind of game possible: The computer game.
2.3.2 History of Computer Games
1952:
A.S. Douglas created a game called OXO, a graphical version of tic-tac-toe, at the
University of Cambridge. It was developed on the EDSAC computer, which used a
cathode ray tube as a visual display. The player competes against the computer using a
rotary dial.
1958:
William Higinbotham created the first video game using an oscilloscope. Called Tennis
for Two, it showed a simplified tennis court from the side, which featured a gravity
controlled ball that had to be played over the net.
1961:
A group of students at MIT, including Steve Russell, programmed a game titled
Spacewar! . The game pitted two human players against each other, each controlling a
spacecraft capable of firing missiles. The game was eventually distributed with new DEC
computers and traded throughout the then-primitive internet. Spacewar! is credited as
the first widely available and influential computer game.
1967:
Ralph Baer created a simple video game named Chase that displayed on a standard
television set, the first to do so. Ralph Baer continued development, and in 1968 a
prototype was completed that could run several different games such as table tennis
and target shooting.
1980:
Atari’s “Asteroids” and “Lunar Launcher” were the two first video games to ever be
registered in the Copyright Office. Atari also brought computer games into homes all
over the world with their revolutionary home entertainment systems.
Page | 11
1985-1993:
In 1985, the North American video game console market was revived with Nintendo's
release of its 8-bit console, known as Nintendo Entertainment System (NES). It was
bundled with Super Mario Bros. and suddenly became a success. The NES dominated the
North American market until the rise of the next generation of consoles in the early
1990s. Other markets were not as heavily dominated, allowing other consoles to find an
audience like the Sega Master System.
The next generation console to be released was the 16-bit generation. It began in 1989
with the release of the Sega Mega Drive and the Super NES (SNES), released in 1991.
1994 – 2001:
In 1994-95, Sega released Sega Saturn and Sony made its debut to the video gaming
scene with the PlayStation. Nintendo followed with the Nintendo-64 in 1996. Sony’s
Playstation sold 102.49million units worldwide, far ahead of both the Nintendo-64
(32.93m) and the Sega Saturn (9.26m).
In 1998 Sega’s next console, the Dreamcast, was released. Like the Saturn before it, it
was to prove unsuccessful. Sony released the Playstation 2 in 2000, and it, like its
predecessor, was by far the most successful console of its generation. 2001 saw the
release of the Nintendo Gamecube and Microsoft’s entry to the video game console
industry with the Xbox.
2005+:
Microsoft releases their second video game console, the Xbox 360 on November 22
2005. It is well received, with resold units going for much higher than the recommended
retail price on the secondary market.
Sony releases the Playstation 3 on November 17 2006, and chaos erupts at several
locations in the US due to high demand and extremely limited retailer supply. Two men
were shot, and many others were injured.
Nintendo launched the Wii on November 19 2006, boasting an 800,000 unit launch
across the United States and relatively fewer injuries. Sales surged for the Wii and it
eventually sold 2 million units by the end of December, compared to the Playstation 3's
sales of less than a million. As of mid-January, Wii remains in high demand and has been
perpetually out of stock at many retailers, but PS3 supply now outstrips demand. [8]
2.3.3 Games Industry
Once a niche market and considered by some as a curiosity in the mid-1970s, the
computer and video game industry took in about US$7 billion in the US in 2005. US computer and video
game software sales grew six percent in 2006 to $7.4 billion – almost tripling industry software sales
since 1996.
Page | 12
[11]
For the manufacturer, a hit game--like a hit movie or record--can generate extraordinary
returns. Indeed, by the late 1990s, games such as Nintendo's GoldenEye or Legend of Zelda had
generated domestic gross revenues of more than $200 million, even though the cost of production and
development had been no more than $6 million for each game. Such revenue to cost ratios are far more
impressive than, say, in movies, where the production cost for most projects able to generate in excess
of $200 million in revenues would be typically several times higher. [10]
Although often considered a market pre-dominantly aimed at children and young
people, in the United States the average game player is 33 years old and has been playing games for 12
years. The average age of the most frequent game buyer is 40 years old. In 2006, 93 percent of
computer game buyers and 83 percent of console game buyers were over the age of 18.
The modern computing world owes many modern computing innovations to the game
industry. Many computing elements owe their lineage and development to the game industry.
Sound cards were developed for addition of digital-quality sound to games. They were
later improved for music and audiophiles.
Graphics cards and 3D graphic accelerators were developed for graphical user interfaces
(GUIs) and games. GUIs drove the need for high resolution, games drove 3D acceleration. They also gave
one the opportunity to use SLI or CrossFire graphics cards, or two graphics cards in one computer.
Although CD ROM drives were developed for mass distribution of media in general,
games use is believed to have been instrumental in driving their ever higher speeds.
Also, UNIX was developed, in part, so that the programmers could play a space traveling
game.
In addition, many of the higher powered personal computers are purchased by gamers
who want the fastest equipment to power the latest cutting-edge games. Modern games are some of
the most demanding on PC resources, so the latest hardware is often targeted at this sector likely to
Page | 13
purchase and make use of the latest features. Thus, the inertia of CPU development is due in part to this
industry whose applications demand faster processors than traditional applications. [9]
2.3.4 Game Maker
Game Maker is a software application written by Mark Overmars, a professor at Utrecht
University. It is written in the Delphi programming language. Overmars released the original version on
November 15, 1999.
The primary interface for the creation of games is via an object-oriented drag-and-drop
system, allowing users unfamiliar with traditional programming to intuitively create games simply by
organizing things visually on the screen. Users select a personally-created object and drop instances of
these objects in the area of the game being worked on, and Game Maker automatically applies any
global effects to that instance of the object. If this amount of control does not meet your requirements,
there is an easy-to-use programming language
As of February 2007, Game Maker is at version 7. It still incorporates the use of
Direct3D, allowing the usage of limited 3D graphics, and adds limited support for simple 3D models.
Converters make it possible to use more popular 3D formats such as .3ds, and .obj for use in a 3D
project. It also supports the ability to create certain particle effects like rain, snow, and clouds easily.
Page | 14
Game Maker is available in an unregistered version, free of charge, and a registered
version. The registered version, which costs €15, extends the features available in the program, such as
the ability to incorporate DLLs, take advantage of Direct3D, use particles, and utilize advanced drawing
functions. The free version displays a small Game Maker advertisement during the execution of the
game, while the registered version removes the advertisement, giving a more professional feel to the
finished game.
Game Maker's engine has improved over the years and has become much faster —
especially in the graphics area — allowing the use of alpha and blending functions for games' sprites.
Game Maker itself is not limited to the functions and abilities included in GML. Game
Maker can load and utilize DLLs allowing it to perform tasks it otherwise could not. A number of DLLs
have been created for the specific purpose of extending Game Maker, such as providing socket support
and allowing MySQL connectivity. In version 7 of the software, a new extension mechanism will allow for
more extensions to Game Maker through the use of dlls, gml scripts and action libraries.
Game Maker can be used free of charge and allows you to free distribute the games you
create, even sell them if you like. They do however strongly encourage you to register your copy to
support the further development of Game Maker. This also unlocks a number of advanced features and
removes the logo when running games.
On January 26, 2007, Mark Overmars announced that he would be working with a small
company in the UK named YoYo Games. The motive behind the cooperation is that it would bring faster
and better development to Game Maker, as well as provide a better website for its users. The website is
Page | 15
planned to be a community in which users can upload and share their created games and review and
discuss submitted games on the website. It will also provide a much extended help system and support
for the sharing of resources. Yoyo Games is recreating the GMC (Game Maker Community) and has
published Game Maker 7. [12] [13]
Creating Games
First of all, the games take place in one or more rooms. Each room can be used to
represent a level of your game. In these rooms you place objects you have created (or multiple instances
of the same object). Rooms first of all have a background. This can be a simple colour or an image.
Theses images can be loaded from files or created in Game Maker.
An object is a piece of code in your game world and may be programmed to do a variety
of things, ranging from simply occupying space in order to prevent the player from advancing along a
path to being as complex as a programmed enemy with hundreds of lines of code to give it a small
amount of artificial intelligence. Objects are commonly represented with sprites, though they may be
rendered invisibly by not selecting a sprite for them.
Sprites are images which can be imported from most image file types and are graphical
representations of objects within the game. A sprite can be static, animated or stepped when used in
Game Maker. Game Maker allows you to load sprites from files or create your own sprites within the
application.
Certain things will happen to objects within your game. These are known as events.
Game Maker allows you to instruct the object on what actions to take should these events occur. Events
Page | 16
can include an object being created, a key being pressed by the user, or a collision with another object.
For example, when the user presses a directional key, the user object will move in the appropriate
direction, or when it collides with an enemy object, it is destroyed.
If you want the object to move in a specific pattern, you can define the path that the
object will take by drawing it out using the path function. The first point is the start point and the red
point is the current point that you are on. You can change the speed of the path from point to point and
Game Maker provides you with options to make the path open or closed, and the point connection to be
straight or smooth.
With all these elements defined, your game should be ready to run. The first room you defined will
appear on screen and the objects you placed in it will act according to the actions you assigned to them.
[12] [21] [22]
Page | 17
Chapter 3 – Design and Implementation
3.1 Introduction
In order to hide information, we need to develop techniques that could be used within
Game Maker, so that information could be covertly placed within the game and so that this information
could be retrieved by the intended recipient.
3.2 Hiding Information – Design
3.2.1 Sprites
We decided to begin by hiding information using sprites. This involved allocating a piece
of information to an individual sprite, so that it could represent this information when the receiver was
decoding the message. For example we will take the first sprite that we have, called Sprite1, and let it
represent the binary digit 0. Likewise for the second sprite, Sprite2, which we will allocate the binary
digit 1. Now to begin the hiding process, we will place the sprites in the order that we want so that they
make up the byte we are trying to represent. For example, if we were trying to create the letter ‘A’
(whose binary number is 01000001) using these sprites, we would place the sprites we are using in the
following order:
Sprite1, Sprite2, Sprite1, Sprite1, Sprite1, Sprite1, Sprite1, Sprite2
With the correct key in hand, the receiver should now be able to decode this piece of
information without anyone else knowing there was a piece of hidden information being represented.
As we a creating a maze game, we will place our sprites from left to right to make it easier for the
receiver to read and decode.
Now that we can let a sprite represent a single binary digit, using the same method we
will now try to let a sprite represent two binary digits. For this to work however, we will need four
sprites instead of two. This is because of the fact that there are four different combinations that two
binary digits may be placed in:
00, 01, 10, 11
So now we will allocate sprites to the pairs of digits as follows:
Sprite1 => 00
Page | 18
Sprite2 => 01
Sprite3 => 10
Sprite4 => 11
Now trying to represent the binary number of the letter ‘A’ we need only four sprites in the order:
Sprite2, Sprite1, Sprite1, Sprite2
The next step we will make is to let each sprite represent three binary digits. This however
leaves us with a possible eight combinations of the three binary digits as follows:
000, 001, 010, 011, 100, 101, 110, 111
As a result, we will now need eight different sprites to allocate these combinations to:
Sprite1 => 000
Sprite2 => 001
Sprite3 => 010
Sprite4 => 011
Sprite5 => 100
Sprite6 => 101
Sprite7 => 110
Sprite8 => 111
However, if as before, we try to represent the binary representation of the letter ‘A’, we
run into a problem. To represent the letter ‘A’ in binary, as we have seen before, we need a combination
of sprites that add up to eight binary digits. However, if we are only, as in this case, using sprites that are
representing combinations of three sprites, we can only get a possible six or nine digit combination.
Therefore, as it stands now, three digit representation can not work on its own, however it can be used
as a combination of one binary digit and two binary digit allocation as we will see further on in this
report.
Next we will try letting each sprite represent four binary digits. Because of the fact that
with four binary digits it is possible to have sixteen possible combinations, we will need sixteen sprites
to allocate to. Because this seems like a lot of sprites, and due to the fact that this may arouse suspicion
amongst users for which the message is not intended, we will use different colours of the same sprite.
Now we can allocate each combination to each sprite without fear of as much suspicion as we would
have if we used 16 different sprites:
Page | 19
Sprite1 => 0000
Sprite9 => 1000
Sprite2 => 0001
Sprite10 => 1001
Sprite3 => 0010
Sprite11 => 1010
Sprite4 => 0011
Sprite12 => 1011
Sprite5 => 0100
Sprite13 => 1100
Sprite6 => 0101
Sprite14 => 1101
Sprite7 => 0110
Sprite15 => 1110
Sprite8 => 0111
Sprite16 => 1111
Now as before, to encode the binary byte of the letter ‘A’ we will only need two sprites in the following
order:
Sprite5, Sprite2
So as we have seen with the above examples, the more digits that we want a sprite to
represent, the more sprites we needed to represent that information. This can be represented in a
simple formula:
E = 2^x
Where: E = The no. of Sprites
And
x = number of bits to encode
3.2.2 Paths
The next idea we will look at for using to represent binary digits is the path of a certain
sprite. We will begin the examples exactly the same as we did for hiding information using the sprites,
however unlike sprites, the binary digit or digits we will be trying to send will be represented by the
movement of the sprite rather than the sprite itself.
To begin, we will allocate one digit to one movement. For example, we will let the path:
Path1 = 0
Page | 20
be equal to the binary digit 0, and the next path:
Path2 = 1
be equal to the binary digit 1.
Now, when we see a sprite moving up we will know to allocate the digit 0 to it and
similarly for the movement down, we will allocate the digit 1 to it. So to repeat the process (as in sprites)
to represent the letter ‘A’ we will get:
(i.e. Path1, Path2, Path1, Path1, Path1, Path1, Path1, Path2)
which when decoded is the binary code 01000001.
Next we will continue as we did with sprites and look at using paths to represent
combinations of a pair of digits, of which there are four combinations.
&
=>
=>
00
&
10
=>
=>
01
11
So now that Path1 represents 00, Path2 represents 01, Path3 represents 10 & Path4
represents 11, we can now begin to code our message, which again will be the character ‘A’ (i.e.
01000001). This will give us a combination of paths as follows (reading from left to right):
Path2, Path1, Path1, Path2
This will be represented by 4 individual sprites moving in their own paths corresponding
to the binary digits they are trying to represent. For example, Path1 will have the sprite moving from
Page | 21
right to left, the left to right. Similarly, Path2 will have the sprite moving from down to up, and from up
to down (or in the case of Path3 & Path4, from left to right/ right to left and from down to up.
The next step in the ‘paths’ section is to let each path represent a combination of three
digits. As we saw before in the sprites section, there are 8 combinations of these digits, and using our
formula from before we again realise that we will need 8 different paths for representation which are as
follows:
&
=>
000
=> 010
&
=>
001
=> 011
=> 100
=> 101
=> 110
=> 111
This however, as with the sprites example will work only when combined with other
sprites whose value is represented by one binary digit or two binary digits due to the fact that 8 digits
make up a byte and this can not be represented by a combination of paths or sprites that are being used
to represent combinations of three digits.
Now we will use each path to represent four bits of binary code. As was with the sprites,
we will now need 16 different paths to represent the 16 combinations of binary digits:
=> 0000
=> 0001
Page | 22
=> 0010
&
=> 0100
=> 0101
=> 0110
=> 1000
&
=> 0011
=> 0111
&
=> 1001
=> 1010
=> 1011
=> 1100
=> 1101
=> 1110
=> 1111
Page | 23
We will use these paths to move a sprite and form a byte. However, we have decided,
for efficiency purposes, that it is better to use a coloured sprite for one half of the byte and the path for
the other half. We will be dealing with this further on in the ‘Paths Implementation’ part of the report.
3.2.3 Sound
Within the Gamemaker environment, sounds can be used almost everywhere, from the
users footsteps, to collecting coins. For almost every action in a game, it is possible to use a noise as the
action is preformed.
There are numerous amounts of Steganography tools or S-Tools as they are also known,
available online today. By using the S-Tools freeware that is available online, it is possible to hide a text
file inside any sound in Game Maker. This could be used as a valuable way of transmitting information as
it is only detectable to whomever has the S-Tool used to encode the file, i.e. the receiver.
Page | 24
3.2.4 Message Boxes
Also available to users in the Game Maker environment, is the ability to use message
boxes that can appear when an action is performed by the user. For example, when the user finishes a
level, it is possible to display a message congratulating them or explaining the storyline of the game to
them.
This feature gives us a few options to perform with respect to the text that is written in
the message box. The first option we have is to use a key on the text in the message box. When the
receiver looks at the message box they will know which words to pick out of the paragraph because of
the key they will have telling them which positions the words with the information intended for them
are in.
We also have the option of using the blank spaces between the words in the paragraph
to our advantage. For example, if we let one space between two words equal the binary digit 1, and two
spaces between two words equal the binary digit 0, then it is possible to transmit information with great
subtlety. This however may allow us to only transmit a very limited amount of information as to
transmit much information in this manner would result us in having to have a very large paragraph
which may arouse suspicion to anyone who the information is not intended.
The final option we have is to use two types of font on the paragraph in the message
box. This way the user will be able to select the letters that are in the different font, put them together
and form the hidden message intended for them. This however is not a very safe option as it may look
obvious to the unsuspecting user that there are in fact two types of font being used.
3.2.5 Rooms
The option to create a room in Game Maker is one that is solely used to create different
levels for the game that the user of the application is creating. Room properties include options such as
placing objects, name of the room, caption for the room, width, height & speed of the room and the
option to set a backdrop or background for the level. This does not leave us, from a secret information
transmitting point of view, with many options.
What we can do however, is have a secret room, unsuspecting to the user that the
information is not intended for. Within this secret room, we can have more encoded information so,
should a user other than our intended receiver stumble across it, they will still have the job of decoding
the information, should they expect it of course.
3.2.6 Advanced Methods of transmitting information using Sprites
Huffman Coding
We decided to look at Huffman coding as a way of transmitting information mainly
because of its compression capabilities.
Page | 25
Huffman coding is a data compression scheme that assigns codes to symbols so as to
match code lengths with the probabilities of the symbols and is used for lossless data compression. A
Huffman tree is needed however to create Huffman code for a given paragraph. [15]
By creating a Huffman tree for the paragraph which we want to transmit secretly, we
hope to be able to reduce the amount of digits needed to represent each character, hence allowing
more information to be transmitted in each individual level. To create a Huffman tree, one needs to
note down all the characters that they are using in the paragraph they want to compress, and the
frequency that they occur in the paragraph. For example, let’s say we have the following set of numbers
and the frequency which they occur:
FREQUENCY
VALUE
---------
-----
5
1
7
2
10
3
15
4
20
5
45
6
To create a Huffman tree we sort this list by its frequency and make the two lowest
elements into leaves, creating a parent node with a frequency that is the addition of the two lower
element’s frequencies:
12 : *
/
5:1
\
7:2
Next those two elements are removed from the list and the new parent node with the
frequency of 12 is entered into the list, which is now sorted by frequency:
10 : 3
12 : *
15 : 4
20 : 5
45 : 6
Page | 26
Now we repeat the above by combining the next two lowest elements, which gives us:
22 : *
/
\
10 : 3
12 : *
/
5:1
\
7:2
Now the list is:
15 : 4
20 : 5
22 : *
45 : 6
The above steps are repeated until all there is only one element left in the list:
102 : *
____________________/
/
\
57 : *
_____/
/
\_____
35 : *
\
10 : 3
45 : 6
\
22 : *
/
\__________
/
12 : *
/
5:1
\
15 : 4 20 : 5
\
7:2
Now that the list contains only one element (i.e. 102 : *), we are finished. This element
now becomes the root of our binary Huffman tree. Now, to create our Huffman code for this tree, we
Page | 27
traverse the tree (from top to bottom) to the value we want, outputting a 0 every time we take a lefthand branch, and outputting a 1 every time we take a right-hand branch. For example, if we want to get
the Huffman code value for 4 ( 15 : 4 ), we traverse left, right, and then left again which leaves us with
the value of 010. Likewise, if we want to get the value for 6 ( 45 : 6 ), we traverse right and we are there,
which leaves 6 with the Huffman code value of 1. [14]
As we can see from the above example, the benefits of using Huffman coding to shorten
eight bit characters and numbers are excellent.
Eulerian Path
The reason for our interest in Eulerian paths was purely because of the discreetness
they hold.
An Eulerian path is a path in a graph which visits each edge exactly once. They first came
about by Leonhard Euler while solving the famous Seven Bridges of Königsberg problem in 1736. The
problem included two large islands that were connected to the mainland by 7 bridges. The question
Euler had was weither it was possible to walk with a route that crosses each bridge only once.
The answer was no, it is not possible. Euler walks are only possible if exactly two nodes
(or in this case the coloured circles above) have an odd number of edges. In this case, all of the nodes
have an odd number of edges.
If an eighth edge is added however, we then have two nodes with an odd number of
edges, and two nodes with an even number of edges. So now, our graph is Eulerian.
Page | 28
As we can see from the above graph, our Eulerian walk is now possible.
Our idea for implementing this in our project is to design two paths, one where an
Eulerian walk is possible, and one where it is not, and allowing these to represent the binary digits 0,
and 1 respectively. [16]
Hamiltonian Cycle
The advantage of using Hamiltonian graphs, as with Euler graphs, is the discreetness
they provide.
A Hamiltonian Path is a path in an undirected graph which visits each vertex exactly
once. A Hamiltonian Cycle is a Hamiltonian Path which ends on the same vertex it started on.
Hamiltonian paths and cycles are named after William Rowan Hamilton who invented the Icosian Game,
now also known as Hamilton's puzzle, which involves finding a Hamiltonian cycle in the edge graph of
the dodecahedron.
This is an example of a graph containing a Hamiltonian cycle:
[20]
This is an example of a graph that is not Hamiltonian:
Page | 29
[19]
Once again, as with the Eulerian paths, we will be implementing this in our where a
Hamiltonian cycle is possible, and where it is not, and allowing these to represent the binary digits 0,
and 1 respectively.
3.3 Hiding Information – Implementation
We decided to use the maze format for our game that we created. We chose this option
because of the size and amount of information it could hold. Although there were many other types of
games we could have used, we felt that this was the most efficient type of game available for the
project.
3.3.1 Sprites – Basic Text Example
Below is a section of the ASCII (American Standard Code for Information Interchange)
table of characters that we will be using in this project, and especially their binary equivalent that we
will be most interested in. We decided to use the sprite method of hiding information, as described in
section 3.2.1. Because of the fact that there are eight bits in a byte, we decided, from an efficiency point
of view, that it would be best if we used the ‘4-bits-per-sprite’ method as we have seen earlier.
Decimal
------032
033
034
035
036
037
038
039
040
041
042
043
044
Octal
----040
041
042
043
044
045
046
047
050
051
052
053
054
Hex
--020
021
022
023
024
025
026
027
028
029
02A
02B
02C
Binary
-----00100000
00100001
00100010
00100011
00100100
00100101
00100110
00100111
00101000
00101001
00101010
00101011
00101100
Value
----SP
!
"
#
$
%
&
'
(
)
*
+
,
(Space)
(exclamation mark)
(double quote)
(number sign)
(dollar sign)
(percent)
(ampersand)
(single quote)
(left/openingparenthesis)
(right/closing parenthesis)
(asterisk)
(plus)
(comma)
Page | 30
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
092
055
056
057
060
061
062
063
064
065
066
067
070
071
072
073
074
075
076
077
100
101
102
103
104
105
106
107
110
111
112
113
114
115
116
117
120
121
122
123
124
125
126
127
130
131
132
134
02D
02E
02F
030
031
032
033
034
035
036
037
038
039
03A
03B
03C
03D
03E
03F
040
041
042
043
044
045
046
047
048
049
04A
04B
04C
04D
04E
04F
050
051
052
053
054
055
056
057
058
059
05A
05C
00101101
00101110
00101111
00110000
00110001
00110010
00110011
00110100
00110101
00110110
00110111
00111000
00111001
00111010
00111011
00111100
00111101
00111110
00111111
01000000
01000001
01000010
01000011
01000100
01000101
01000110
01000111
01001000
01001001
01001010
01001011
01001100
01001101
01001110
01001111
01010000
01010001
01010010
01010011
01010100
01010101
01010110
01010111
01011000
01011001
01011010
01011100
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
\
(minus or dash)
(dot)
(forward slash)
(colon)
(semi-colon)
(less than)
(equal sign)
(greater than)
(question mark)
(AT symbol)
(back slash)
Page | 31
To do this, we will need sixteen different sprites. To make this easier on us, and the
receiver that will be decoding the message, we have used some sprites a number of times, changing the
colour and hence changing there binary meaning:
=> 0000
=> 0001
=> 0010
=> 0011
=> 0100
=> 0101
=> 0110
=> 0111
=> 1000
=> 1001
=> 1010
=> 1011
=> 1100
=> 1101
=> 1110
=> 1111
Now that we have allocated the combinations of digits to our sprites, we are ready to
encode a message. As we are trying to show how Steganography can be used to transmit large amounts
of important information, we have decided to use a comment by John F. Kennedy on the Cuban missile
crisis:
“We will not prematurely or unnecessarily risk the costs of a worldwide nuclear war in which
even the fruits of victory would be ashes in our mouth – but neither shall we shrink from that risk any
time it must be faced.”
In binary this message would start off like this:
0101011101000101 01010111010010010100110001001100 010011100100111101010100
01010000010100100100010101001101010000010101010001010101010100100100010101001100010
11001…….
To get the maximum space out of the levels we are using, we decided to not use the
eight bit binary number for ‘space’, instead we will just leave a gap in between the two words we are
using as follows:
Page | 32
4 diamonds with binary numbers of
8 diamonds representing the word
0101, 0111, 0100, 0101 which is the
‘even’
word ‘We’
The first word in the quote we are using is the word “We” or in binary, 01010111 &
01000101. As we can see from the above screenshot, starting from the top left corner and reading from
left to right, the first four sprites that we see are represented by the binary digits 0101, 0111, 0100 &
0101. The next word which is the word “will” is next which is also represented through the sprites by its
binary equivalent as we can see from the above. The remainder of the screenshot spells out (in binary):
Page | 33
“We will not prematurely or unnecessarily risk the costs of a worldwide nuclear war in which
even the fruits of victory would be ashes in our mouth – but neither shall we shrink…”
The next screenshot shows the remainder of the message, with some ‘dangerous’ sprites added
to fill out the rest of the level, and to reduce suspicion.
=> Enemy Sprite
0100, 0110, 0101, 0010, 0100, 111, 0100, 1101 => ‘from’
0101, 0010, 0100, 1001, 0101, 0011,
0100, 1011 => ‘risk’
Page | 34
As we can see from the above screenshot, the last of the message can be decoded from
the remaining sprites that the receiver recognises to be part of the message:
“….from that risk any time it must be faced.”
As you can see from the above level, we still had a lot of space in which to add more
information, such is the size of the maze level.
Aside:
=> Wall
=> Finish
3.3.2 Paths – Basic Text Example
Next we implemented the paths in a text example of our game.
Page | 35
Red Sprite moving up & left
=> 0100 0001/ ‘A’
Green Sprite moving up & down
=> 0101 0011/ ‘S’
Red Sprite, circular motion
=> 0100 1111/ ‘O’
Aside:
=> Path ‘ read line’
=> Diamond
=> Finish Line
=> Door (must be opened by collecting all diamonds to reach finish line, used to lessen
suspicion)
Page | 36
The above message translates to “A message using paths to say hello!!”. Once again, to
maximise the potential out of the size of the level, and to get the most out of the amount of information
we are transmitting over the level, we decided to use the sprites in correspondence with the paths. For
example, as we can see from the ASCII chart in section 3.3.1, the characters that we require for the
demonstration of this project begin with only four different combinations of the first four digits in the
binary number. The four combinations we need are as follows: 0010, 0011, 0100 & 0101.
We decided to let these four binary sets as the colour of the sprites as follows:
=> 0010
=> 0011
=> 0100
=> 0101
So now that we know that the first four digits of our binary number are represented by
the colour of the sprite, we will now look at the paths to determine the last four digits of the binary
number.
Because this is a still room, i.e. the enemies do not leave the screen, we had to have the
enemies on a loop so as not to arouse suspicion. We realised that this might cause some confusion to
the receiver as they might not know where the starting point is. For example, lets take the first enemy at
the top left of the above screenshot. This enemy is meant to go up and left which has the binary
numbers 0001 allocated to it. However, this in reverse is right and down which could be misinterpreted
by the receiver as 0110. To balance this out and make sure the receiver knows where to start the path
from, we have decided to put in red blocks in the normal wall and in a straight line across the level, so as
the receiver has a starting point to read the path from. For example, take the first enemy that we talked
about earlier. If the enemy goes right and then down, then it is entering the line of red blocks so we
know that this can not be the correct path for decoding. However, if the path begins by going up, out of
the red blocked line, then we know that this path is correct, and we can decode it according to our key.
Now that we know how to decode the hidden information, we can start to translate it
into binary code and then into characters. As we now know, the first enemy is coloured red, and is
following a path up & left. This corresponds to the binary number 0100 0001 which is the letter A.
The rest of the message should be decoded easily in the same manner, ending with the
white enemies following the path up & left which leaves us with ‘!!’.
3.3.3 Sound – Basic Text File Example
The next think we looked at as a means of hiding information was the use of a freeware
Steganography tool to hide a text file in a sound that we will be using in our game. The use of sounds in
Gamemaker is endless, from background music to collecting a diamond, from getting killed by an
enemy, to crossing the finish line. In this case we will be using the sound file door.wav which will be
used when a door is opened after a certain action is performed, i.e. all the diamonds in the level being
collected.
Page | 37
To hide a text file within this sound, we will use a Steganography tool called S-Tools
which is freely available at many Steganography sites online. This software is nicely constructed and very
user friendly.
To start the process of hiding a text file in the sound file, once the S-Tools program has
been downloaded and opened, we click and drag our text file across to the main actions window of the
program which then shows us the sound wave form which visually allows us to check the shape of the
wave so that when it is combined with our text file, we can see if it looks different or similar to the
original sound file:
Screenshot of the original shape of the wave file
Next we click and drag the text file that we want to hide, and drop it on the above
window. This then prompts us with a window for entering a passphrase or password for the
encoding/decoding of the text file and a selection of algorithms for the encryption:
After we verify our password and press OK, we are shown the new shape of the wave
with our text file hidden in it:
Page | 38
To save the new sound, the user must right click on the above wave and save.
Once the receiver receives the game, to decode the sound file, they must open it in
Gamemaker and have S-Tools at the ready. To save the sound file with the hidden text file, knowing
which sound it is hidden in, the receiver must open the sound in Gamemaker and save the file. They
then must click and drag it into S-Tools as before. They must then right click on the shape of the wave
and click on reveal. The receiver will then be prompted to enter the password or passphrase and select
the correct encryption algorithm. Once the program recovers the file from the sound, it will be available
for saving by right clicking on the name.
Page | 39
3.3.4 Message Box – Basic Text & Space Example
For the message boxes implementation we looked at two aspects, firstly using a text
key/template, and secondly using the spaces between the words to send a short message.
We have inserted this message box at the end of our paths text example and it goes as
follows:
“Congratulations, you have successfully passed the first level by escaping the evil army.
Now you must keep travelling and extinguishing the fires at the south east of every room so you
can stop the fires from hurting our people again ! “
We have spaced out the words in such a pattern where two spaces represent the binary digit 0
and one space represents the binary digit 1. Using this information to analyse the above paragraph
leaves us with the binary numbers 0100100001000101010011000100110001001111 which spells the
word “Hello”.
We also created a key for the intend receiver. This key would be placed over the above
paragraph and pick out words relevant to the sender and more importantly, the receiver:
you have
army
passed
travelling
the
south
This in a certain scenario could be an effective way of transmitting secret information without anyone
knowing exactly what is being sent.
Message prompted at the end of a level
Page | 40
3.3.5 Sprites – Basic, Intermediate & Advanced Text Example demonstrating Hidden Rooms,
Logic Circuits & Huffman Coding
We decided next to look at ways of using sprites in a more Intermediate way to transmit
more information on a larger scale. Our first idea we decided to look at was a way of looking at using
sprites to transmit logic circuits in our computer game.[18]
A logic gate performs a logical operation on one or more logic inputs and produces a
single logic output. The logic normally performed is Boolean logic and is most commonly found in digital
circuits. [17]
We felt again that because of the size of the levels we are using, we could mask circuits
such as a half adder and a full adder quite easily.
Half Adder circuit where:
=> XOR Gate
&
=> AND Gate
Page | 41
Full Adder Circuit where:
=> OR Gate
(XOR Gate & AND Gate are as above)
We first began by allocating a particular sprite to each Logic gate that we needed in both
of the circuits. Because of the reason that in a maze game, the user generally collects items such as
diamonds and other bonus sprites to boost things such as ‘score’ and ‘health’, we began to look at the
possibility of using sprites to mask the path of the inputs and the outputs of each of the circuits.
Firstly, for the half adder, we let the input ‘A’ be represented by the sprite
and the
input ‘B’ be represented by the sprite
. Next, we need to allocate sprites to the logic gates that we
are using in this logic gate which will be as follows:
=>
&
=>
Now that we had our sprites allocated, it was time to draw the logic gate in our level of the game:
Page | 42
Half Adder Screenshot
AND Gate
Output ‘C’
Output ‘S’
XOR Gate
As we can see from the above screenshot, the half adder is blended into the level by
adding a few monsters and diamonds that are there to lessen suspicion. We decided also to allow the
outputs to be the same colour as the main input. For example, we can see from the above that the input
‘A’ goes into the purple diamond/XOR Gate. Because the input ‘B’ is splitting off into ‘A’, we decided
that the output of the XOR Gate be the same colour as the input of ‘A’. The same applies for the input of
‘B’ where, as we can see from the above screenshot, we can see that the blue input is splitting and
entering the red diamond at the bottom of the level. Because the blue input is the input that split, we
will let the output be the red input which did not split.
This method maybe a small bit confusing to a person who it has not been explained to,
but the intended receiver will be well aware of the methods that will be used to transmit this kind of
logic circuit covertly.
Page | 43
These same methods also apply for the Full Adder logic circuit which will be
implemented as follows:
Full Adder Screenshot
Input ‘A’
Input ‘Cin’
Output ‘S’
Input ‘B’
Output ‘Cout’
Also:
=>
&
(XOR Gate & AND Gate are as above)
As we can see from the Full Adder screenshot, there is a lot more going on in this level
than in the half adder level. There are three different types of monsters/enemies as well as yellow
diamonds. These extra items, once again, are added to fill up the level and not make it obvious what is
Page | 44
going on. To enforce this, all diamonds must be collected before the fire disappears and the user can get
to the finish line.
Again to explain the logic circuit we will start by following the input ‘A’, or the trail of
blue sprites. As we can see, the blue trail splits from its original path, and goes down and then right. We
can then see that it connects with the red diamond/AND Gate. We will then let the output of this gate
become the green trail, which as we can see goes on to enter the green diamond/OR Gate. Going back
to the top right hand corner of the level, we start again with the blue trail, but this time we do not take
the first split. Instead we see that the trail enters the purple diamond/XOR Gate, this is combined with
the red trail, ‘B’, which also enters the gate. We let the resulting output of this combination remain the
colour blue which then continues on, firstly into an XOR Gate to be combined with the input ‘Cin’/green
trail which gives us the resulting output ‘S’, and secondly into the red diamond/AND Gate to be
combined again with the green trail which continues into the OR gate to be combined with the first trail
that we described above. The final combination gives us the resulting output, ‘Cout’. This gives us the
description of the full adder logic circuit:
[17]
The next think we decided to do was to use the Basic hidden rooms method, using
sprites, in between the Half Adder & Full Adder Logic Circuits. For this to work, we would need to firstly,
make a secret way of accessing these hidden rooms. We came up with the idea of having, in the Half
Adder level, secret blocks that the user can pass through, but that are identical to the ones that the user
can’t pass through. Using this technique will allow the intended receiver to access these rooms, with the
unintended receivers carrying out the game as normal. So let’s take a look at the level containing the
hidden Half Adder again:
Page | 45
Walk through blocks
Secret finish line taking the user to the secret room
`
Finish Line taking the user to
the Full Adder level
As we can see from the above screenshot, if we look at the position of the user, we see
that the next obvious step to an unsuspecting user is to continue going left, then back right collecting all
the items, and then entering the finish line taking them to the next level, the Full Adder level, skipping
all secret rooms. To an intended receiver in this position however, moving the user down would be their
next step, through the walk through blocks, and crossing the secret finish line.
Page | 46
Our next step in this part of the implementation process was to decide what to put in
the secret rooms that we have created. After much pondering, we decided to combine the methods of
using sprites to create a more advanced method to represent various combinations of binary digits with
Huffman compression to transmit, over three secret levels, the following paragraph:
“I’m not an atheist and I don’t think I can call myself a pantheist. We are in the position of a little
child entering a huge library filled with books in many different languages. The child knows someone
must have written those books. It does not know how. The child dimly suspects a mysterious order in the
arrangement of the books but doesn’t know what it is. That, it seems to me, is the attitude of even the
most intelligent human being toward God.”
-Albert Einstein
As you can see this is a very large paragraph which shows that this method of
Steganography is very useful for transmitting large amounts of information.
Firstly however, we needed to devise a Huffman tree to come up with a table of binary
numbers than could represent our letters that we are using in the above paragraph. In order to do this,
we first came up with a Huffman tree using the method described previously in this report:
Page | 47
So this allows us to come up with the following list of characters and their Huffman representations:
Letter
Huffman
A
B
C
D
E
F
G
H
I
1110
000001
0000001
01110
010
100010
11110
1001
0001
--------------------000011
00111
01111
0010
110
00000001
-------------------00110
0110
101
11111
00001000
10000
-----------------------0000101
------------------------100011
00001001
00000000
K
L
M
N
O
P
R
S
T
U
V
W
Y
full stop
comma
apostrophe
Note there are some characters missing in this chart as they do not appear in our
paragraph and hence can be omitted.
Now that we have the binary representations using Huffman for our letters, we can
decide which combinations of binary numbers we need to allocate to our sprites.
We decided that for the most efficient way of transmitting the information we would
need:
2 Sprites representing 1 binary digit (i.e. 0 & 1),
Page | 48
4 Sprites representing 2 binary digits (i.e. 00, 10, 01 & 11),
and 2 Sprites representing 4 binary digits (I.e. 0000 & 1111).
Next we allocated those digits to sprites:
=> 00
=> 0
=> 1
=> 01
=> 10
=> 0000
=> 1111
=> 11
We decided to have the two sprites representing four digits be enemies that move up
and down, once again to lessen suspicion (by adding enemies that move to distract the unintended
receiver).
Next we began placing the sprites from left to right in order corresponding to the
characters in the paragraph we are transmitting:
Page | 49
Screenshot of Secret Room 1 (containing the words ““I’m not an atheist and I don’t think I can
call myself a pantheist. We are in the position of a little child entering a huge library filled with
books in many…”)
Word ‘AND’ (using 7 sprites)
Letter ‘A’ (using two sprites)
Page | 50
Screenshot of Secret Room 2 (containing the words “….different languages. The child knows
someone must have written those books. It does not know how. The child dimly suspects a
mysterious order in the…”)
Page | 51
Screenshot of Secret Room 3 (containing the words “the arrangement of the books but doesn’t know
what it is. That, it seems to me, is the attitude of even the most intelligent human being toward God.”)
Page | 52
3.3.6 Advanced Sprites Example – Eulerian Path
So now that we had shown the amount of information we were able to transmit over
the game, we decided to try something more advanced. Instead of the actual size of the information
being transmitted, we began to look more towards the discreetness of what we could transmit. We felt
that transmitting something such as an Eulerian path would prove that some things transmitted over a
medium available for everyone to see could prove invisible to the unsuspecting eye.
We began by creating a level that was similar to the bridges of Königsberg, as previously
explained in this report:
Image of a hidden graph where an Eulerian path is not possible (binary digit 1)
Vertices/Nodes
Path/Edge
Page | 53
As we stated earlier, an Eulerian path is not possible here as an Eulerian path is one
where exactly two nodes have an odd number of edges. In the Königsberg problem, all four nodes have
an odd number of edges. We decided to let this scenario where an Eulerian path is not possible
represent the binary digit 1.
Also as we stated earlier an Eulerian path is possible by adding a path so that exactly two
nodes have an odd number of edges. We decided to let this scenario represent the binary digit 0.
Image of a hidden graph where an Eulerian path is possible (binary digit 0)
As we can see from the pair of screenshots, we decided to add enemies and diamonds to the
level so as the user does not become suspicious to anything going on.
Page | 54
3.3.7 Advanced Sprites Example – Hamiltonian Cycle
Again, as with the Eulerian Path example, we decided to use the Hamiltonian Example as
a more advanced example of how something can be transmitted without suspicion from anyone other
than the intended receiver.
We began again by implementing Hamiltonian Cycles into our game by creating levels in
which included cycles that were Hamiltonian and that were not Hamiltonian, and allocated a binary digit
to each:
Image of a hidden graph where a Hamiltonian Cycle is possible (binary digit 0)
Page | 55
Image of a hidden graph where a Hamiltonian Cycle is not possible (binary digit 1)
Page | 56
Chapter 4 – Evaluation
4.1 Introduction
The aim of Steganography and its associated techniques is to transfer information
covertly. The most common stego techniques involve placing information at the end of a file or in the
least significant bits of the data. There are many applications freely available that allow the user to hide
information in various media, such as images, audio files and text files.
There are now also many applications available which can detect information that has
been hidden using conventional stego methods. This is why it is important that the science of
steganography continues to evolve and to branch into other media, like computer games.
Computer games are an ideal medium for steganography. There are many computer
games freely available, so games containing hidden information would be unlikely to cause suspicion.
We also feel that, using statistical analysis, it would not be possible to detect a message hidden using
the techniques we have created.
In this section, we will analyse the techniques we have created, outlining the main
advantages and disadvantages of each.
4.2 Project Goals
When we began this project, we gave defined a set of project goals which we felt
needed to be achieved.
The first of these goals was to research the background of steganography. We spent a
good deal of time studying both the history of and the techniques used in steganography. We feel that
this gave us an excellent understanding and insight into steganography which proved invaluable to us
throughout the rest of the project.
The second goal we set out was to choose an appropriate platform on which to create
our game environment. We researched some different game creation tools, as well as considering write
a game in a non-game specific language. In the end we choose Game Maker as we felt that it best suited
our needs.
The third goal we had to achieve was to develop steganography techniques with which
to hide information in our game. We were able to develop several different techniques for this. Some of
our techniques were relatively basic, while some of them were more advanced.
The fourth goal was the creation of the game itself using the techniques we had
developed. We created several different games, each using the different steganography techniques we
Page | 57
had created. The design of these techniques and how we implemented them were described in detail in
the previous chapter.
The final goal we defined was the techniques we had developed, and the advantages
and disadvantages of each. This was carried out and our conclusions are presented later in this chapter.
4.3 Hiding Information - Sprite Technique
We found the sprite hiding techniques to be very effective. Given the amount of sprites
we were able to include in each room, we managed to hide a significant amount of information in every
level of our maze. We used one sprite to represent 4 bits, meaning that we only needed 16 different
sprites to represent any 8-bit binary representation of an ASCII character. By opting to simply leave a
space between sprites, rather than using the binary representation, we were able to fit even more bits
into each level. The information hidden can still be retrieved if the game is converted into an executable
file. The main disadvantages of this technique are the amount of time required to encode the message
and the time required for the recipient to decode the message again. This method would be ineffective
to encode large messages, or documents, as it would require a suspiciously large game.
4.4 Hiding Information - Paths Technique
The paths technique is quite similar to the sprites technique. We used 16 different
paths, each representing 4 bits. The colour of the sprite was used to signify the first four bits of a letter,
with the path of that sprite representing the second four bits. Like with sprites, path hiding is not suited
to hiding large amounts of text. Also, the decoding of the information is more difficult than in the sprite
example, as the recipient has to follow the path of each sprite to determine its meaning.
4.5 Hiding Information – Message Box Technique
The message box option in Game Maker is not particularly useful for hiding information,
as any message of significant length would look out of place and draw attention. We were, however,
able to use a message box to send messages in two ways. Firstly, we were able to encode a small
message using the template method. We also encoded a single word in binary format, using extra
spaces between words to represent the difference between 1 and 0. Both of these worked well, but
would not be suitable for a large message. The inclusion of information in this manner also increases the
likelihood of the message being deciphered. One major problem with the use of spacing to represent
bits is that it is not possible to tell how many space characters are present when the text wraps to the
next line.
Page | 58
4.6 Hiding Information - Sound Technique
There are many different sounds within Game Maker, which makes it possible to hide a
lot of information in a level. For our example, we decided simply to add a text file to a single sound to
illustrate how this works. While the text file can be added, and retrieved, with relative ease using the
steganography application S-Tools, it can be detected using widely available steganalysis software.
Another problem with this method is that it is very difficult to extract the sound file from the game
when the game is in the format of an executable file.
4.7 Hiding Information - Room Technique
Hiding information within rooms proved to be the weakest technique as none of the
room functions can be utilised for hiding information. While the rooms themselves offered very little in
the way of options for hiding information, we decided that we would use hidden rooms, which would
contain information hidden using various other techniques. We felt that this worked well as it offered an
added level of security for especially sensitive information. Entry to the hidden room is achieved by
passing through a seemingly solid wall object. This meant that it would be highly unlikely that a player
who was unaware of the room’s existence would find it accidentally, and in the unlikely case the room
was found, the player would still need to know how to decode the hidden information.
4.8 Hiding Information – Huffman Coding
The Huffman coding approach is very similar to the sprite approach, except that it is
possible to fit more information into each level. We used only sprites to hide the information, and we
only needed 8 different sprites. Once we had created a Huffman tree for the message we wanted to
hide, it was easy to encode the message. This technique proved very effective, as it improved further
upon the amount of information we were able to hide in each level. As with sprites and paths, the
information can still be retrieved even if the game is converted to an executable file.
4.9 Hiding Information – Logic Circuit
We felt that this technique worked very well. We used different coloured sprites to
represent the different types of gates in our circuit, as well as coloured sprites to represent the different
inputs and outputs of the circuit. When the player has the key to decoding the circuit, it is very easy to
decipher, but someone without the key would have great difficulty deciphering it, or even knowing what
it was they were trying to decipher.
4.10 Hiding Information - Eulerian Graph
Unlike the other methods we utilised for concealing information within our game, the
Eulerian Graph approach focused on the quality of information hiding rather than the quantity. This
technique worked well. We feel that it would be nearly impossible for anyone to notice the presence of
an Eulerian graph without having been aware that this technique had been used. Even if an Eulerian
graph was detected, the detector would not know what it represented. The obvious downside of this
Page | 59
technique is that it can only be used to represent one bit (0 or 1), or a TRUE or FALSE response in each
level.
4.11 Hiding Information – Hamiltonian Graph
This technique also worked well. It works on the same principle as the Eulerian Graph
approach. As with that method, the main downside of this technique is that it can only be used to
represent one bit (0 or 1), or a TRUE or FALSE response in each level, although this technique is equally
difficult to detect.
4.12 Game Maker Evaluation
We found Game Maker to be an ideal application for our game creation needs. Its
unique drag and drop features let us create games easily and allowed us to position sprites in specific
locations, which aided greatly in the information hiding process. Also, the ability to create specific paths
for our sprites and display message boxes were very useful for hiding information. We did find,
however, that the rooms in Game Maker had very little functionality other than to contain other objects
and that images imported were converted from .gif to .bmp format, thus corrupting any information
hidden within the image. Overall, when taken as a game creation tool, Game Maker is a very useful
program.
4.13 Conclusion
Although we fully met our goals, and in the process exceeding our own expectations to
the extent of the amount of information we could transmit as well as what we could transmit, we did
encounter some problems over the course of this project.
The first problem we encountered was getting to grips as to what Steganography
actually was. As neither of us had heard of it before, it was always going to be a challenge, albeit an
enjoyable one. To overcome this problem, we had to immerse ourselves in the background and
knowledge of Steganography. This involved frequently researching various books as well as gathering
data from the internet about the topic. Although this took time, we eventually came to a point where
we were comfortable talking and discussing the topic of Steganography.
Once we had the background of the topic covered, our next problem that we
encountered was getting to grips with the software we were using to create the game that we would be
transmitting the information over, which of course was Game Maker. This piece of software can be very
frustrating to use at first and some tutorials available online are not very straight forward. Solving this
problem took many hours of hard work getting to know Game Maker inside out for the specific tasks
that we required it to perform for our project. Although it was frustrating at times, we saw at the end
that even though it caused us some problems, we got through them and produced the results that we
wanted.
Once we had Game Maker cracked, our next difficulty was coming up with ideas of ways
of transmitting information over this medium. This took much brainstorming, as well as consulting with
Page | 60
our supervisor for potential ideas, before we actually did come up with some solid ideas that we could
use to take our project to the next level.
Along with other minor problems that we encountered, we felt that we dealt with all
our problems well and solved them accordingly. For us, this project was very enjoyable and we would
not feel half as satisfied as we do now if we did not have problems such as the above to overcome.
Page | 61
Chapter 5 – Conclusion
5.1 Conclusion
The aim of this project was to explore the relatively untouched area of using
steganography with computer games.
There are several different approaches a novice game programmer can use to go about
creating a computer game. We considered creating a game using established programming languages,
like Java or C#, but we opted instead to use a game creation tool. We decided on this option because
the main goal of this project was information hiding, as opposed to game creation, and creating a game
from scratch would take up a considerable amount of our project time. After researching several
different applications, we found that Game Maker would be an ideal choice for our requirements.
The type of game we chose to create was a maze. We felt that creating an environment
for effective and efficient information hiding was more important than creating an overly complex
game. After exploring various options with regard to the type of game we might create, we decided that
the maze might be the most suitable. We chose the maze due to the amount of information that we
would be able to hide within each level.
Our research gave us a clear understanding of the theory behind steganography and the
various techniques involved in its implementation. As part of this project, we also developed several
new methods for hiding information, which were specific to games and, in some cases, to our game in
particular. With these techniques we have developed, we believe that without the specific encoding
information, it would be nearly impossible for anyone to decipher the hidden message, should it be
discovered.
We feel that we have set a good platform upon which future work can be built,
hopefully leading to the creation of improved stego techniques.
5.2 Future Work
For future work in this area, we believe that the weaknesses in the techniques we
created could be addressed.
The main weakness with these techniques is that it requires any messages to be
manually encoded into the game. This can take a great deal of time, even for a relatively short message.
The user would also be required to create a new game from nothing each time they wanted to send a
new message. Likewise, there is a significant amount of effort required from the intended recipient to
decode the message once the game has been received.
Page | 62
We believe that the next step would be to create applications for encoding and decoding
this information, which would make it possible to encode and decode messages much more quickly and
also allow for much bigger messages to be sent using this medium.
Another possible improvement would be the addition of digital watermarking within the
game. This would allow a recipient to be certain that the game, and the information it contained, had
not been tampered with or altered.
Page | 63
References
[1] 2006 CSI/FBI Computer Crime and Security Survey
[2] An Overview of Steganography for the Computer Forensics Examiner http://www.fbi.gov/hq/lab/fsc/backissu/july2004/research/2004_03_research01.htm
[3] Keeping Secrets Secret: Steganography with .NET –
http://www.devx.com/dotnet/Article/22667
[4] Cole, Eric. - "Hiding in Plain Sight: Steganography and the Art of Covert Communication".
[5] Steganography: Hiding Data Within Data http://www.garykessler.net/library/steganography.html
[6] Steganalysis – Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Steganalysis
[7] Steganalysis of Images Created Using Current Steganography Software http://www.jjtc.com/ihws98/jjgmu.html
[8] History of Computer Games – Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/History_of_computer_games
[9] Entertainment Software Association- Facts & Research http://www.theesa.com/facts/index.php
[10] Video Game Industry – Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Video_game_industry
[11] Entertainment Software Association- Sales & Genre Data http://www.theesa.com/facts/sales_genre_data.php
[12] Game Maker Pages http://www.gamemaker.nl
[13] Game Maker – Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Game_Maker
[14] A quick tutorial on generating a huffman tree http://www.siggraph.org/education/materials/HyperGraph/video/mpeg/mpegfaq/huffman_tutorial.ht
ml
[15] Huffman coding - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Huffman_coding
Page | 64
[16] Seven Bridges of Königsberg - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg
[17] Logic gate - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Logic_gate
[18] Exploring Steganography as a means of Transferring Circuit Diagram Information http://geminga.it.nuigalway.ie/~0051305u/
[19] Graph Theory Open Problems http://dimacs.rutgers.edu/~hochberg/undopen/graphtheory/graphtheory.html
[20] Math 118 – Information about Midterm #2 http://www.math.sunysb.edu/~sorin/118/E2info.html
[21] Steganography & Games 2005, Fitzgerald and Gallagher
[22] Steganography & Games 2006, Murray and O'Connor
Page | 65
Download