....the art/science of hiding confidential information so that, although essentially in full view, it is not perceived by any third party.


In the hexdump shown, the text 'steganography' is hidden in the image of my face. If you do not know it is there, you do not notice it in the image, and no investgator knows it is there. You can also, of course, do simple EOR encrypting to make it harder to spot. A related way is to append the text to be hidden tagged on to the end of another file, such as an image. And another possibility is to EOR your text into an image of random noise- only if the recipient has the SAME random noise pattern can it be decrypted or even its presence detected. And with a seeded PRNG like LB's the recipient can re-generate that random string/image without it ever having to be transmitted ( and hence, possibly, intercepted).


WindowWidth = 480
WindowHeight =250

graphicbox #w.gb1, 40, 20, 80, 80
graphicbox #w.gb2, 340, 20, 80, 80

button #w.b1, "Embed text", [EmbedText], LR, 266, 120

textbox #w.tb1, 140, 20, 160, 24

statictext, "", 20, 130, 440, 80

open "Demo of steganography" for window as #w

#w "trapclose [quit]"

#w.tb1 "!font courier 12 bold"
#w.tb1 "!setfocus" "!font arial 10"

#w.gb1 "down"
loadbmp "scr", "johnfb.bmp"
#w.gb1 "drawbmp scr 0 0 ; flush"
#w.gb2 "down ; fill white ; flush" "Enter text to be hidden in the textbox. Click [Embed Text] and the" +chr$( 13)_
+"changed file is displayed and has replaced the original saved file." +chr$( 13)_
+"Can you see the difference? Examine the file with a hexeditor." +chr$( 13)_
+"One particular entry gets special treatment!"


open "johnfb.bmp" for input as #pi ' This is actually my gravatar, a file of length 19322 bytes.
pixel$ =input$( #pi, lof( #pi))
close #pi

if mid$( pixel$, 19301, 14) ="tenochtitlanuk" then notice "Bingo! Special measures for you!!"

#w.tb1, "!contents? text$"
lenTxt =len( text$)
if lenTxt >14 then text$ =left$( text$, 14)
pixel$ =left$( pixel$, 19300) +text$ +mid$( pixel$, 19301 +lenTxt)

open "johnfb.bmp" for output as #po
#po pixel$;
close #po

loadbmp "scr", "johnfb.bmp"
#w.gb2 "drawbmp scr 0 0 ; flush"

close #w