Palette Stenography

15
SecureSteganographicMethodsforPaletteImages JiriFridrich,DuRui CenterforIntelligentSystems,Dept.ofSS&IE,SUNYBinghamton,Binghamton,NY 13902-6000 {fridrich,bh09006}@binghamton.edu Abstract. In this paper, westudynon-ad apti ve and adap tive steg anog raph ic techniquesforimageswithlownumberofcolorsinpaletteimageformats.We haveintroducedtheconceptofoptimalparityassignmentforthecolorpalette and design ed an effic ient algorit hm thatfinds the optimal parity assignment. Theoptimalparityisinde pende ntoftheimage histogramanddepend sonlyon the image pale tt e. Thus , it ca n be us ed for incr easing the secu ri ty of stegan ograph ic techn iques thatembed messag e bits into theparity of palette colors. We have furth er deve loped two adaptiv e ste ga nog ra phic me tho ds design edtoavoidareasofunifo rmcolor andembedmessagebitsintotexture - ric h por tionsof the car rie r ima ge. Bot h tech niqu esweretested oncompu ter genera tedimage swithlargeareasofuniformcolor andwithfonts onuniform background.Noobviousartifactswereintroducedbyeithertechnique.Thelast, emb edd ing- whil e-ditherin g, tech nique has bee n des igned for pale tte image s obtaine dfromtruecolor imagesusingcolor quantizatio nanddithering.Inthis technique, both the color quanti zati on error and the er ror due to me ssa ge embe dding are di ffu sed throu gh the image to avoid intro ducing ar ti fact s inconsistentwiththeditheringalgorithm. 1 Introduction The purpose of steg anogra phy is to hide mes sag es in oth erwise innoc ent looking carriers.Thepurposeistoachievesecurityandprivacyby maskingtheverypresence ofcommunication.Historically,thefirststeganographictechniquesincludedinvisible writingusingspecialinksorchemicals.Itwasalsofairlycommontohidemessagesin text.Byrecoveringthefirstlettersfromwordsorsentencesofsomeinnocentlooking text, a secre tmessage wascommunicated. Today,itseemsnatur altousebinaryfiles with ce rt ain deg ree of irr el evan cy and redundancy to hide da ta. Dig it al images , videos,andaudiotracksareidealforthispurpose. Eachsteganographictechniqueconsistsofanembeddingalgorithmandadetector function.Theembeddingalgorithmisusedtohidesecretmessagesinsideacover(or carrie r)document.Theembedd ingproces sis usua llyprotecte dbya key wordsothat on ly tho se who posses the secret keyword ca n access the hi dden messag e. The detec torfunctio nis appli edto thecarrierandretur nsthehiddensecretmessag e.For securecovertcommunication,itisimportantthatbyinjectingasecretmessageintoa carrierdocumentno detectablechangesareintroduced.Themaingoalistonotraise

Transcript of Palette Stenography

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 1/15

SecureSteganographicMethodsforPaletteImages

JiriFridrich,DuRui

CenterforIntelligentSystems,Dept.ofSS&IE,SUNYBinghamton,Binghamton,NY13902-6000

{fridrich,bh09006}@binghamton.edu

Abstract. In this paper, westudynon-adaptive and adaptive steganographic

techniquesforimageswithlownumberofcolorsinpaletteimageformats.We

haveintroducedtheconceptofoptimalparityassignmentforthecolorpaletteanddesignedan efficient algorithm thatfinds theoptimal parity assignment.

Theoptimalparityisindependentoftheimagehistogramanddependsonlyon

the image palette. Thus, it can be used for increasing the security ofsteganographic techniques thatembedmessage bits into theparity of palette

colors. We have further developed two adaptive steganographic methodsdesignedtoavoidareasofuniformcolorandembedmessagebitsintotexture-

rich portionsof the carrier image. Both techniquesweretested oncomputergeneratedimageswithlargeareasofuniformcolorandwithfonts onuniform

background.Noobviousartifactswereintroducedbyeithertechnique.Thelast,

embedding-while-dithering, technique has been designed for palette images

obtainedfromtruecolorimagesusingcolorquantizationanddithering.Inthistechnique, both the color quantization error and the error due to message

embedding are diffused through the image to avoid introducing artifactsinconsistentwiththeditheringalgorithm.

1 Introduction

The purpose of steganography is to hide messages in otherwise innocent lookingcarriers.Thepurposeistoachievesecurityandprivacyby maskingtheverypresenceofcommunication.Historically,thefirststeganographictechniquesincludedinvisiblewritingusingspecialinksorchemicals.Itwasalsofairlycommontohidemessagesintext.Byrecoveringthefirstlettersfromwordsorsentencesofsomeinnocentlookingtext,asecretmessagewascommunicated.Today,itseemsnaturaltousebinaryfileswith certain degree of irrelevancy and redundancy to hide data. Digital images,videos,andaudiotracksareidealforthispurpose.

Eachsteganographictechniqueconsistsofanembeddingalgorithmandadetector

function.Theembeddingalgorithmisusedtohidesecretmessagesinsideacover(or

carrier)document.Theembeddingprocessisusuallyprotectedbya keywordsothat

only those who posses the secret keyword can access the hidden message. Thedetectorfunctionisappliedto thecarrierandreturnsthehiddensecretmessage.For

securecovertcommunication,itisimportantthatbyinjectingasecretmessageintoa

carrierdocumentnodetectablechangesareintroduced.Themaingoalistonotraise

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 2/15

2

suspicionandavoidintroducingstatisticallydetectablemodificationsintothecarrier

document.Theembeddedinformationisundetectableiftheimagewiththeembeddedmessageisconsistentwiththemodelofthesourcefromwhichthecarrierimagesare

drawn.Wepoint out that the ability todetect the presencedoes not automatically

imply the ability to read the hiddenmessage.We further note that undetectability

should not bemistaken for invisibility− a concept tied to human perception. Atpresent, the formal theoretical framework for steganography similar to Shannon

informationtheoryisstillmissing.Foracomprehensivetreatmentofthistopic,see

[1].

Theundetectabilityisdirectlyinfluencedbythesizeofthesecretmessageandthe

formatandcontentofthecarrierimage.Obviously,thelongerthemessage,thelarger

the modification of the carrier image and the higher the probability that the

modificationscan be statistically detected. The choice of the carrier image isalso

important.Naturalphotographswith 24bits perpixelprovidethe best environment

for message hiding. The redundancy of the data helps to conceal the presence ofsecretmessages.Imageformatsthatutilizecolorpalettesprovideefficientstoragefor

imageswithlimitednumberofcolors,suchascharts,computerart,orcolorquantized

truecolorimages.ThepaletteimageformatGIFisrecognizedbyallbrowsersandis

widelyusedovertheInternet.PostingaGIFfileonone'swebpagewillundoubtedly

raise less suspicion than sending an image in the BMP format. Despite their

usefulness and advantages, palette images provide a hostile environment for the

steganographer. The limited number ofpalette colors makes the process of secure

messagehidingadifficultchallenge.Themostcommonsteganographictechnique−theleastsignificantbitembedding(LSB)cannotbedirectlyappliedtopaletteimagesbecause too many new colors would be created. Most current steganographic

algorithmsfor paletteimagesintroduceeasilydetectableartifactsin thepaletteor in

theimagedata[8,9].

On the highest level, the typical palette image format consists of three parts: aheader,apalette,andimagedataorpointerstothepalette.Thepalettecontainsthe

RGB tripletsofall colors that occur inthe image. Secretmessagescan behidden

eitherinthepaletteitselforintheimagedata.Gifshuffle[10]isaprogramthatuses

the paletteorder tohideuptolog2(256!)=210bytesinthepalettebypermutingits

entries.While thismethod does not change the appearanceof the image, whichis

certainlyanadvantage,itssecurityisweakbecausemanyimageprocessingsoftware

productsorderthepaletteaccordingto luminance,frequencyofoccurrence,orsome

otherscalarfactor.Arandomlyorderedpaletteis suspicious,whichgoesagainstthe

basicrequirementofsecuresteganography.Also,displayingtheimageandresavingit

mayerasetheinformationbecausethepalettemaybereordered.Analternativeand

perhapsmore secure approach is to hide encrypted messages in the LSBs of the

palettecolors.Inordertomakethemessagereadablefromanimagewithareordered

palette, care needs to be taken during message embedding so that the message is

readableatthereceivingend.Thecommondisadvantageofalltechniquesthatembedmessagebitsintothepaletteisaratherlimitedcapacityindependentoftheimagesize.

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 3/15

3

Practical methods should have capacity proportional to the image size, or the

numberofpixels.Manycurrentlyavailablesoftwaretools[3,4,7,10 −13]decreasethecolordepthoftheGIFimageto128,64,or32beforetheembeddingstarts.Thisway,

whentheLSBsofone,twoorthreecolorchannelsareperturbed,thetotalnumberof

newlycreatedcolorswillbeatmost256.Thus,itwillbepossibletoembedone,two,

or three bits per pixel without introducing visible artifacts into the carrier image.

However,aspointedoutbyJohnson[8,9],thenewpaletteswillhaveeasilydetectable

groupsofclosecolors.Itisthusrelativelyeasytodistinguishimageswithandwithout

secretmessages.Itappearsthatsecureschemesshouldnotmanipulatethepalettebut

ratherembedmessagebitsintheimagedata.In the next section,wediscussmethods that embedmessage bits asparities of

colors.InSect.3,wedefinetheenergyofdistortionsduetomessageembeddingand

introduce theconcept of optimal parity assignmentthat minimizes thisenergy.An

efficientalgorithmfortheoptimalparity ispresentedand theproofof optimality is

given.Thetechniqueisfurtherextendedtomultiplepixelembedding.Itisshownthattheoptimalparityassignmentisalsooptimalformultiple-pixelembedding.InSect.4,

westudyadaptivesteganographictechniques.Twomethodsare introducedandtheir

performance is tested oncomputer generated fractal images. A new technique for

paletteimagesobtainedthroughcolorquantizationandditheringoftrue-colorimages

isdescribedinSect.5.Inthisnewdithering-while-embeddingtechnique,theimage

modificationsduetomessageembeddingarediffusedthroughtheimageinthesame

wayasthequantizationerrorduringdithering.FinallyinSect.6,wesummarizethe

newtechniquesandconcludethepaperbyoutliningfutureresearchdirections.

2 Messagehidingusingtheparityofpalettecolors

Oneofthemostpopularmessagehidingschemesforpalette-basedimages(GIFfiles)hasbeenproposedbyMachado[11].In hermethodcalledEZStego, thepalette isfirst sorted by luminance. In the reordered palette, neighboringpalette entries aretypicallyneartoeachotherinthecolorspace,aswell.EZStegoembedsthemessageinabinaryformintotheLSBofrandomlychosenpointerstothepalettecolors.Onecansay thatthismethodconsists ofthree steps:parity assignment topalettecolors(ordering the palette), random, key-dependent selection of pixels, and embeddingmessage into color parities of the selected pixels. Message recovery is simplyachievedby selectingthe samepixelsandcollecting theLSBsof all indices totheordered palette. This algorithm is based on the premise that close colors in theluminance-orderedpalettearecloseinthecolorspace.However,sinceluminanceisalinearcombinationofthreecolors,occasionallycolorswithsimilarluminancevaluesmayberelativelyfarfromeachother.Toalleviate this problem, Fridrich [6]has proposed to hidemessage bits into the

parity bits of closest colors1

. For the color of each pixel, into which we embed

1 Using parityfor message embedding haspreviously been proposed byPetitcolas[1] and

Crandall[5].

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 4/15

4

messagebits,theclosestcolorsinthepalettearesearchedtillapaletteentryisfound

withthedesiredparity bit.Theparity ofeach color couldbeassigned randomlyorsimply by calculating  R+G+ B mod 2. Because the parity bits are randomly

distributed,wewillneverhavetodepartfromtheoriginalcolortoomuch.Thisway,

we avoid the problem of occasionally making large changes in color, whichwillcertainlycontributetotheundetectabilityofthemessage.Intheabsenceofarigorous

security definition for steganography, the following quantities were accepted as

measuresofsecurity:

1. Thedistance Dbetweentheoriginalandthestego-image

,,

1,

22 ∑ ==

N  M 

 jiijd  D

whered ij2=( Rij− Rij')

2+(Gij−Gij')

2+( Bij− Bij')

2forthe(i, j)-thpixeloftheoriginal

andthestego-image.

2. Themaximalcolorchange ij jid 

,max .

Boththeaveragepowerperpixelandthemaximalcolorchangeforthenewtechnique

[6]havedecreased4−5timeswhencomparedtotheEZStego,whichisasignificantperformanceimprovement.

Inthenextsection,weinvestigatetheproblemofoptimalparityassignmentforthe

paletteinordertofurtherimprovetheschemedescribedinthissection.

3 Optimalparityassignment

Theparityassignment directlyinfluences theenergyof imagemodificationsdueto

message embedding. Obviously, if close colors are assigned opposite parities, the

energyofthemodificationswillbesmaller.Anaturalquestiontoaskiswhetheritis

possible to further improve the performance by using an optimized palette parity

assignment.Forapracticalmethod,whichdoesnothaveaccesstotheoriginalimage,

thepaletteparityassignmenthastobereconstructablefromthemodifiedimageatthe

receivingend.

Lettheimagepalettecontain N colorsc1,c2,…,c N withparitiesPi,Pi∈{0,1}.Theparityassignmentdeterminesanisolation siforthei-thcolor(siisthedistancefrom

colorci tothe closest colorwithdifferentparity).The colorsoccur inthe original

imagewithfrequencies p1,…, p N , p1+…+ p N=1.Providedthemessagecarryingpixelsareselectednon-adaptively,foramessageoflengthk ,approximatelykpipixels

ofcolorciwillcontainmessagebits.Theaveragesquareofthedistancebetweentheoriginalandthestego-imagecanbeexpressedas:

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 5/15

5

∑==

i ii N  s pk PPkE  1

2

1 2

1

),...,(2

1

.

Thequantity E doesnotdependonthemessagelengthandwillbecalledtheenergy

oftheparityassignment .Theoptimizationproblemistoassignparities P1,…,P N  to

colors c1,…, c N  so that E  isminimal. The following algorithm always finds the

optimalparityassignmentthatminimizes E :

3.1 Algorithmforoptimalparityassignment

1. Calculatethedistancesbetweenallpairsofcolors d ij=ci− c j.ThedistancecanbecalculatedeitherintheRGBortheYUVspace.SetC =∅.

2. Orderthedistancesstartingfromthesmallesttothelargest,{d }=d i(1) j(1)≤d i(2)j(2)≤….

3. IterativelyrepeatstepNo.4untilC containsall N colors.

4. Choosethenextdistanced klintheorderedsequence{d }suchthateitherck∉C orcl∉C .Ifmorethanoned klisthesmallest,randomlychooseone.Ifthereisnosuchd klthismeansthatC containsall N colorsandwearedone.Ifboth ck∉C orcl∉C ,assigntwooppositeparitiestobothk and l.Ifck∉C andcl∈C ,setPk =

1−Pl.UpdateC =C ∪{ck }∪{cl}.

Itisclearthatonceaparityofacolorisdefined,itcannotbechangedlaterbythe

algorithm.Itisalsoclearthatattheendallcolorswillhaveassignedparities.What

needstobeprovedisthattheparityassignmenthastheminimalenergy E .Wepoint

outthattheminimalvalueof E canoccurformorethanoneparityassignment(see

Fig.1).

Fig. 1. Example of two different optimalparityassignments

Fig.2.

Each parity assignment induces a structure of anorientedgraphwith anarrow

pointingfromeachcolor(anode)toitsclosestcolorwithdifferentparity.

Propertiesofthegraph:Thereisexactlyonearrowgoingoutofeverynode.One

node may have more than one incoming arrow. Some nodes may not have anyincoming arrows (end nodes). Note that for an optimal parity assignment, when

followingasequenceofarrows,thedistancescanneverincreasebecauseonecould

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 6/15

6

simplyflipthearrowofthelargerdistancebacktothepreviousnodeanddecreasethe

energy E (seeFig.2).

Proof of the optimality: Suppose that we have a parity assignment P that is

optimal.Wewillshowthatbyfollowingouralgorithm,itispossibletoreassigntheparitytoadifferentparityobtainablewithouralgorithmwhilepreservingtheenergy.

Letusassumethatwhilefollowingouralgorithmwefindadistanced ijwithPi=P j,

suchthateitherci∉C orc j∉C .Let usassumethatc j∉C .Wewillshowthatitispossibletochangetheparityofthiscolorandothercolorspointingtothiscolorwhile

the energy E  stays the same.Let c1(1), c2

(1),…, c N (1)

(1) be the colors (nodes) with

arrowspointingtoc j.Whileflippingtheparityofc j,wealsofliptheparitiesofc1(1),

c2(1),…,c N (1)

(1).Thenwedothesamethingwithallnodespointingtooneofc1(1),c2

(1),

…,c N (1)(1),etc.Wehavetoshowthatwhileproceedingsinthiswayweneverruninto

aconflictofhavingtoflipthesamenodetoa0and1atthesametime.Thisisnot

possiblebecausesuchanodewouldhavetohavetwooutgoingarrows.Wecanend

upinanendnode,butwealsocanformacycleandgetbackto c jviaanodeck towhichc jpoints(seeFig.2).Ifd  jk >d ij,wecouldcancelthearrowpointingfrom c jto

ck andreplaceitwithanarrowfromc jtoci decreasing theenergy by p j(d  jk −d ij)>0,whichisacontradictionwithPbeingoptimal.Theotherinequality,d  jk <d ijimplies

c j∈C ,whichcontradictsthe assumption.Therefore,d  jk  =d ijandtheenergy E staysunchangedbyreplacingthearrows.Inthecasethatthe"avalanche"ofparityflippingwouldalsofliptheparityof ci,weargueasfollows.Ifd il>d ijwecanreplacethe

arrowpointingfromcitoclwithanarrowfromcitoc janddecreasetheenergy.Ifd il<

d ijwecanfollowthearrowsonthebranchfrom cibacktoc jtoobtainc j∈C ,whichisagaincontradictionwithourassumption.Therefore,wemusthaved kl=d ijandwecan

replacethearrowfromcitoclwithanarrowfromcitoc jwhilepreserving E .

Fig.3.

Asa consequence, wehave shown thatwecan always reassign parities ofPina

mannercompatiblewithouralgorithmwhilepreservingtheenergy  E .Thealgorithm

andourargumentsendwhenC ={c1,…,c N }.Thisconcludestheproof.

Note that the optimal parity assignment does not  depend on the frequency of

occurrence ofpixels, p1,…, p N . Thissomewhatcontradictory andsurprisingresult

enables us to calculate the optimal parity assignment from the modified image

without accessing the original image. We just need to order the palette before

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 7/15

7

applyingthealgorithm(onecanusethealphabeticalRGBorder,forexample).Ifany

randomdecisionsaremadeduringthealgorithmrun,weneedtoseedaPRNGwiththesameseed,aswell.Anotherpossibilitywouldbetoagreeonafixedorderinthe

sequence{d },the parity assignment forthe first pair,anda rule for assigning the

paritywhenbothnewnodesci∉C andc j∉C .Eitherway,theoptimalparitycanbeutilizedfordecreasingtheenergyofmodificationsinimages.

Numericalexperimentsindicatethatwhenusingtheoptimalparityasopposedto

theparity R+G+ B mod 2,theenergy E  isdecreasedby 25−35%depending ontheimage.

3.2 Multiple-pixelembedding

It is possible to further decrease the energy of modifications due to message

embeddingbyusingclustersofqpixelsforonemessagebitratherthansinglepixels.TheimageisfirstdividedusingaPRNGintodisjointclustersofrandom qpixelsand

themessagebitisencodedasaparityofthesumofallqpixelparities.Thishasthe

benefitthatinordertochangetheparityofthewholesumonecanselectapixelwith

the smallest isolation among all q pixels. As a consequence, the energy of

modificationsdue tomessageembeddingmust decrease. Thepreviousmethod isa

specialcaseofthismultiplepixelencodingwithq=1.

Below,weshowthattheoptimalparityforthismethodisthesameasforthesingle

pixel embedding. The energy  E  of the parity assignment is defined in a similar

manner

∑ ==

ii

qi s pq E 

1

)(

2

1)( ,

where pi(q)istheprobabilitythatamongrandomlychosen qpixelsintheimagetheonewith the smallest isolation is the i-th color. If pi

(q) does not depend onsi, the

optimal parity is again only a function of the palette and not of the image. To

calculatetheprobabilities pi(q),werearrangethecolors cisothattheirisolationsform

anon-decreasingsequence.Itcaneasilybeshownthat

.)()()(

q N 

i j

q j

q N 

i j

q j

qi p p p

  

  −

  

  = ∑∑ >≥

Becausetheprobabilities pi(q)donotdependontheisolations,si,theoptimalparityfor

singlepixelembeddingisalsooptimalformultiplepixelembedding.Theenergy E (q)

asafunctionofqisdepictedfortwotestimages"Fox"and"Mandrill"inFigs.4−7.Observethat evenwithq =2, the energy ofmodificationscoulddecreasebymore

thanathird.Forthetestimage"Fox",theenergywentdownto50%ofitsoriginalvalue for q = 3. This observation suggests that the multiple pixel embedding

techniqueisausefulandsignificantsecurityimprovement.

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 8/15

8

Fig.4.Testimage"Fox"

Fig. 5. Energy of modifications as afunctionof the numberofpixelsqforthe

testimage"Fox"

Fig.6.Testimage"Mandrill"

Fig.7.Energyofmodificationsasafunctionofthenumberofpixelsqforthe

testimage"Mandrill"

Inthissection,wehaveshownthatanymethodinwhichpixelsareselectedina

random (non-adaptive) manner and in which the message bits are embedded by

changingtheparityofpixels(theanalogofLSBencodingforpaletteimages),cannotperform better than our method. This is because our method uses the best parity

assignmentpossible.Theresultisgeneralandholdsforbothsinglepixelembedding

andmultiple pixel embedding.Thenext section isdevotedto adaptivemethodsfor

message embedding toavoidareas of uniformcolor and avoidcreating detectable

artifactsinsingularimageswithlargeareasofuniformcolor.

4 Adaptivemethods

In this section, we explore the idea of an adaptive steganographic technique thatwould introduce less detectable artifacts into the carrier image by adapting the

message embedding technique to the content of the carrier image. Non-adaptive

steganographictechniquesaretechniquesinwhichthemodificationsduetomessageembedding are uncorrelated with image features. Examples are LSB encoding in

randomlyselectedpixels,messageembeddingbyrandomlymodulatingpixelvalues

orfrequencybinsinafixedband,etc.In adaptivesteganographythemodifications

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 9/15

9

arecorrelatedwiththeimagecontent(features).Forsteganography,thiscouldmean

thatthepixelscarryingmessagebitsareselectedadaptivelyanddependontheimage.Forexample,wecouldavoidareasofuniformcolorandselectonlypixelswithlarge

localstandarddeviation.Thishowevercreatesaproblemwithmessagerecoveryifthe

originalunmodifiedimageisnotavailable.Wehavetobeabletoextractthesamesetofmessagecarryingpixelsatthereceivingendfromthemodifiedimage.

The capacity ofadaptive schemes is necessarily image dependent and, in some

cases, it isnoteven possibleto calculate thecapacitybefore theactualembedding

starts.But this isa pricewehave topay for increased security.Thereare several

differentwayshowa non-adaptiveschemecanbe turned intoanadaptiveone. For

example,themessagecarryingpartandthepartthatdeterminesthepixelselectiondo

notinteract.Forexample,onecancalculatethelocalstandarddeviation(STD)from

the7most significantbits and embedmessagebits intotheLSB.Thisapproach is

plausibleonlyforhighcolorimagesandcannotbeadoptedforpaletteimages.

Method 1. The imageis divided into disjoint blocks (for example 3×3 blocks)

completelycoveringtheimage.Atmostonebitwillbeassignedtoeachblock(either

theLSBofthemiddlepixelor itsparity, ortheparityof thewholeblock,etc.).A

thresholdforlocalSTDisselected.Apseudo-randomnon-intersectingwalkoverthe

blocks is generated from a secret key. If the local STD of a block is above the

threshold AND stays above the threshold aftermessage embedding, we select the

block for message embedding. If the STD fallsbelow the threshold aftermessage

embedding,wemake thechangeanywaybut donotincludethe block formessage

embedding, and continue message embedding with the samebit inthe next block.

Thisprocesswill guarantee thatatthereceiving end itis enough toregeneratethe

samerandomwalkovertheblocksandreadthemessagebitsonlyfromblockswhose

STDis above the threshold.Note thatthe localstandarddeviation canbereplaced

witha differentquantity, such asthe number of colors inthe block. Actually, our

experimentsshowthatthenumberofcolorsworksbetterthanthestandarddeviationforcomputergeneratedlow-colorimages.

TheadvantageofMethod1isthatanypixel(s)intheblockcanbemodified,which

will generally lead to smaller modifications especially for images with low color

depth.Thedisadvantageisthatitisnotpossibletosaywhetherornotamessageofa

givenlengthwillfitintotheimagebeforeoneactuallystartstheembeddingprocess.

Anotherdisadvantageissomewhatdecreasedcapacity.Atmostonebitisinsertedinto

eachblock,andonlyblockswithlocalSTDabovethe thresholdare considered for

embedding.Itis,however,onlynaturalthatmoresecureschemeswillhavesmaller

capacity,while"greedy"schemesemphasizingthecapacitywillofferlesssecurity.It

willbeuptotheendusertodecideaboutthepriorities.

We testedMethod 1 for several fractal GIF images2 shown in Figs. 8−10. The

imageinFig.8depictsaJuliasetgeneratedonacomputer.Juliasetsarefractalsets

2 Images provided courtesy of J. C. Sprott, Fractal Gallery,

http://sprott.physics.wisc.edu/fractals.htm.

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 10/15

10

parametrized using complex numbers. The image is a bad carrier image for

steganographyforatleastthreereasons:

1. Thereare large areaswith flat color. Suchareas should beavoided otherwise

detectableartifactswillbecreated.2. The image has been computer generated and has a known complicated inner

structure common to all Julia sets. For example, the bands of close colors

gradually changingfromwhiteto dark redform lines ofconstantpotentialand

have toformsimplyconnectedsets.Thereforethe bandboundaries,too,should

beavoidedwhileembeddingamessage.

3. Thetitleoftheimagecontainsfontsandanysubtlechangetothosefontswillbe

easilydetected.

Fig. 8. Fractal carrier

image640×480,195colors

Fig.9.Fractal carrierimage,636×476,236colors

Fig. 10. Fractal carrier

image636×476,183colors

A non-adaptive technique, no matter how good, will always create some easily

detectableartifacts(seeFigs.9 −10).Ontheonehand,wearetemptedtosaythattheimageshouldnotbeusedforsecuresteganography.Ontheotherhand,weintuitively

feel that thoseareaswith complex structure can hold some additional informationwithout causing suspiciousartifacts.A smart adaptive techniqueshould be able to

recognizewhichportionsoftheimagecanbeusedfordatahiding.

A freeware software utility called MandelSteg [7] uses fractal images for

generatingcarrierimages.TheparametersoftheJuliasetformaportionofthesecret

key.Thealgorithmisnaïve,non-adaptive,andprovidesverypoorsecurity.First,the

fact that the softwarethatgenerates the images isavailable toanybody enablesan

efficient search for the parametersof the Juliasetby anybody skilled intheart of

fractals.Second,thefractalimageshavecomplicatedinnerstructurethatfollowsstrict

rules. Any non-adaptive technique must introduce severe and easily detectable

artifacts,suchasthosedepictedinFigs.11−12.

AversionofMethod1hasbeenusedwiththelocalstatisticscorrespondingtothe

numberofdifferentcolorsinapixel'sneighborhood.Weembedabitofinformation

wheneverthereareatleastthreedifferentcolorsinthe3×3neighborhood.Thisinfact

willguaranteethattherewillbenoartifactsinthepotentiallinesaroundtheJuliasetand noartifacts inthe fonts (white characters on uniform background).A detailed

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 11/15

11

inspection of the carrier imagewith over 1000 embedded bits did not reveal any

suspiciousartifacts.

Fig. 11. Artifacts in

equipotentialbands

Fig.12.Artifactsinthefonts

Fig. 13. Fonts on a

complexbackground

Method2.Method1performssatisfactorilyevenfordifficultcarrierimages,such

astheimagesinFigs.8−10.However,thepricewepaidwasacapacitydecreasedbyafactorofmorethan9.Method2hasbeendesignedwiththeintenttoputonaverage

morebits perpixelwhileretainingthe adaptiveproperty.Themessageembedding

processstartswithpseudo-randomlyselectingthemessagecarryingpixels.Beforewe

explaintheselectionprocess,weintroducesomedefinitions.A2×2blockisgoodifithasatleastthreedifferentcolors.Inallothercases,theblockisbad.Apixelistermed

goodifallfour2×2squaresthatcontainthatpixelaregood.Themessagecarryingpixels are selectedpseudo-randomly from the set ofall good pixels in the image.

Then,allpalettecolorsareassignedtheoptimalparityusingthealgorithmfromSect.

3.Finally,wewalkthroughtheselectedpixelsandcomparetheparityofeachpixelto

themessagebit.Ifthereisamatch,wedonotmodifythepixelandmovetothenext

pixel.Ifthereisnomatch,wemodifythepixelcolorbysearchingthroughthepaletteforclosestneighborswiththecorrectparitysothatafterthechangeallfourblocks

containing the pixel P stay good. Then, we again move to the next pixel. The

embedding procedureguarantees thatthe setofgood blocks for theoriginalimageand for the modified image are identical. This enables the detection algorithm to

recoverthemessagefromcolorparitiesbygoingthroughthegoodpixelsinthesame

pseudo-randommannerasduringtheembedding.

The capacity of Method 1 and 2 is compared in Table 1. We ran a series of

experimentsfordifferentseedsforthePRNGthatwasusedtogeneratethepseudo-

random walk and calculated the standard deviation of the capacity. All three test

imagesshowninFigs.8−10wereusedforthisexperiment.Asexpected,Method2hassignificantlyhighercapacitythanMethod1.

Tofindouttheenergy ofmodificationsdue tomessageembedding,we used the

same three test images and for different seeds we calculated the average MSE

distortion per pixel. The resultsare showninTable2.Wehave alsoexperimented

withdifferentcombinationsof theblocksize(2×2and3×3)anddifferentnumberofcolors (2,3 or4)for the goodnesscriterion.Thecombination of2×2pixelsandatleastthreecolorsgaveusthebestresultswithnoperceptibleartifacts.

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 12/15

12

Table1.ComparisonofcapacityforMethod1and2

Capacityasapercentageofthetotalnumberofpixels

Figure8 Figure9 Figure10

Method1 6.51~6.53% 3.16~3.18% 1.11~1.12%

Method22colors 55.64% 25.92% 10.37%

3colors 43.63% 16.94% 1.32%

Themean-square-errorbetweentheoriginalandthestego-imageforallthreefractal

testimageswithembeddeddifferentsizeofdataisillustratedinTables2−4.

Table2.MSEforFig.8anddifferentmessagelength

Sizeofembeddeddata 2371Bytes 1331Bytes 645Bytes 132Bytes

Method1 0.26±0.005 0.15±0.003 0.07±0.002 0.017±0.001

Method2 0.54±0.01 0.30±0.007 0.15±0.015 0.039±0.011

Table3.MSEforFig.9anddifferentmessagelength

Sizeofembeddeddata 1019Bytes 739Bytes 466Bytes 132Bytes

Method1 0.15±0.005 0.11±0.005 0.07±0.003 0.02±0.002

Method2 0.35±0.009 0.25±0.01 0.16±0.006 0.05±0.004

Table4.MSEforFig.8anddifferentmessagelength

Sizeofembeddeddata 376Bytes 285Bytes 192Bytes 132Bytes

Method1 0.05±0.004 0.04±0.003 0.03±0.002 0.02±0.002

Method2 0.40±0.042 0.29±0.02 0.20±0.024 0.15±0.02

Tables2−4showthattheforimagesinFigs.8and9theaveragepowerperpixelduetomessageembedding is about 4−5times bigger forMethod2thanforMethod1.ThiscanbeattributedtothefactthatinMethod1wecanselectthemessagecarrying

pixel as the one with the smallest isolation out ofnine pixels. Also, inMethod 2

occasionallylargemodificationsmayresultduetothefactthatalleight2×2squaresmust stay goodafterembedding.For image inFig.10, thedifference isevenmore

pronounced. Both methods can embed messages into computer generated fractal

imageswithout introducingany artifacts into regions ofuniform color, areaswith

equipotential linesaround theJuliasets, andaliased fontsonuniformbackground.

Method1providesbettersecuritybecauseit introducedsmallerpowerperpixeldue

tomessageembedding.Method2hashighercapacitybutmayoccasionallyintroduce

largechangesincolor.

5 Embeddingwhiledithering

Asthelaststeganographicmethodofthispaper,wedescribeatechniqueappropriate

for message hiding in palette images obtained from true-color images using color

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 13/15

13

quantizationanddithering.Givenatruecolorimage,wefirstderivethecolorpalette

usingsomeofthestandardcolorquantizationalgorithms[2].Ifthetruecolorimageisnotknownandonlyitsquantizedformisavailable,wecouldincreasethecolordepth

using for example the method described in [14].We continue by calculating the

optimal parity assignment for the palette. Then we pseudo-randomly select themessagecarryingpixelsintheimage(inanon-adaptivemanner).Finally,weperform

the quantization and ditheringby scanning the imageby rows.For anon-message

carrying pixel, weperform the standardquantization anddithering step.Whenwe

come toamessagecarrying pixel,wequantize itscolor to theclosestpalettecolor

with the right parity. This way, both the quantization error and the error due to

message embedding will be scattered and diffused through the whole image.We

conjecturethattheartifactsintroducedbythismethodwillbelessdetectablebecause

theyshouldbeconsistentwiththeditheringmechanism.

Wehave tested the method on24bit scansof photographs. As expected, such

imagestypicallyprovideenoughtextureandcolorvariations,andevenwhenasmuchas50%ofallpixelsintheimagehavebeenusedforembedding,wecouldnotidentify

anyvisibleartifactsorsuspiciouspatterns.Themethodperformedsatisfactorilyeven

for"singular"images,suchasthecartoonoftheTweetyBirdshowninFig.14.The

imageisatruecolorcartoononabackgroundthatgraduallychangescolor.Wehave

againembeddedamessageoflengthequaltoonehalfofthenumberofallpixels.Fig.

15isaclose-upoftheoriginalTweety'seyeandbeak,andFigs.16and17showthe

same close-up for the non-adaptive naïve method with non-optimal palette,

respectively.Thenon-optimized,non-adaptivemethodperformspoorlyandonecan

identify a suspicious pattern in Tweety's eye. On the other hand, the edges and

contrastoftheoriginalpicturehasbeenmoreorlesspreserved.Thedithering-while-

embeddingmethoddoesnot introducesuspiciouspatternsbut theimageedges (see

theblacklinesaresomewhatblurredduetothediffusederror.ThecolorvariationsinTweety'sbeakhavealsobeenflattenedout.

6 Conclusionandfuturedirections

In this paper, we study non-adaptive and adaptive steganographic techniques for

images inpalette image formats.Wehave introducedthe conceptof optimalparity

assignment and designed an efficient algorithm that finds the optimal parity

assignment.Theoptimalparity is independent ofthe imagehistogramanddepends

only on the image palette. Thus, it can be used for increasing the security of

steganographictechniquesthatembedmessagebitsintotheparityofpalettecolors.

Wehaveshownthattheoptimalpaletteimprovestheaveragepowerperpixeldueto

messageembeddingby25−35%(formethodintroducedin[6]).Theoptimalparityisalsooptimalformultiplepixelembedding.

Wehavedevelopedtwonewmethodsforadaptivemessageembeddinginpalette

images.Thetechniquestendtoavoidareasofuniformcolorandembedmessagebits

into texture-rich portions of the carrier image. Both techniques utilize the optimal

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 14/15

14

parityassignment.Thefirsttechniqueembedsonemessagebit intoa group of3×3pixels. The second technique has higher capacity, but provides less security whenmeasuredbytheaveragedistortionpowerperpixel.Bothtechniquesweretestedon

computer generated images with large areas of uniform color and with fonts on

uniformbackground.Noobviousartifactswereintroduced byeither technique.An

imagewithsimpleverticalbandsofthicknessofatleast3withdifferentcolorswould

beclassifiedbybothtechniquesasazerocapacityimage.Thisintuitivelycorresponds

to our feeling that such an image should not be used as a carrier image and the

algorithms work as we would expect. At this point, we stress that it is almost

impossible to design an algorithm that wouldworkwell on all low-color images,

especiallycomputergeneratedimagesorimageswithwell-definedinnerstructure.

Fig. 14. Test image TweetyBird

Fig.15.Original

Fig. 16. Non-adaptive non-

optimized

Fig. 17. Dithering-while-embedding

For example, an image with fonts of uniform color on a complex background,

rather thana uniformbackgroundasin Fig.3,willnot behandledby ouradaptive

algorithm correctly (seeFig. 13).Theborder pixelsof fontsmaybe changed.In a

situationlikethis,itbecomesincreasinglydifficulttoautomatizetheprocessofsecure

adaptiveselectionofpixels.Imageunderstandingandinterpretationofimagefeatures

comes into play.While a humancaneasilyrecognizethatapixel isactually adot

abovetheletter" i"andthusmustnotbechanged,itwouldbeveryhardtodesignan

algorithmthatwouldrecognizethisautomatically.

Thelasttechniquedescribed inthispaperhasbeendesignedforembeddinglarge

messagesintopaletteimagesobtainedfromtruecolorimagesusingcolorquantization

and dithering. The basic idea behind this embedding-while-dithering method is to

ditherboththecolorquantizationerrorandthe errordue tomessageembedding to

avoid introducing artifacts inconsistentwith theditheringalgorithm.We argue that

thestego-imagewillcorrespondtoanimageobtainedbyquantizingandditheringaslightly noisier version ofthe original image, thusmakingthe stego-imagefreeof

artifactsincompatiblewithdithering.

8/9/2019 Palette Stenography

http://slidepdf.com/reader/full/palette-stenography 15/15

15

Our future research effort will be directed towards a more formal approach to

adaptivemessageembedding includingestimatesfor capacity.Thedithering-while-embedding method could also be improved by making it adaptive to the image

content.

Acknowledgements

TheworkonthispaperwassupportedbyAirForceResearchLaboratory,AirForceMaterial Command, USAF, under a grant number F30602-98-C-0009. The U.S.Government is authorized to reproduce and distribute reprints for Governmentalpurposesnotwithstandinganycopyrightnotationthereon.Theviewsandconclusionscontainedhereinarethoseoftheauthorsandshouldnotbeinterpretedasnecessarilyrepresentingtheofficialpolicies,eitherexpressedorimplied,ofAirForceResearchLaboratory,ortheU.S.Government.

References

1.Andersen,R.J.,Petitcolas,F.A.P.,Onthelimitsofsteganography.  IEEEJournalofSelected Areas in Communications, Special Issue on Copyright andPrivacy Protection 16 No.4

(1998)474−481.2.Balasubramanian,R.,Bouman,C.A.,Allebach,J.P.:SequentialScalarQuantizationofColor

Images.JournalofElectronicImaging3No.1(1994)45−59.3.BlackW.(anonymous):StegoDos.

ftp://ftp.csua.berkeley.edu/pub/cypherpunks/steganography/stegodos.zip

4.Brown,A.:S-Tools.http://idea.sec.dsi.uimi.it/pub/security/crypt/code/s-tools3.zip5. Crandall, R.: Some notes on Steganography. Posted on Steganography Mailing List,

December(1998).

6.Fridrich,J.: ANewSteganographicMethodfor Palette-Based Images.Proc. of theIS&TPICSconference,April1998,Savannah,Georgia(1998)285−289.

7.Hastur,H.:Mandelsteg.http://idea.sec.dsi.uimi.it/pub/security/crypt/codev(1994)

8.Johnson,N.F., Jajodia,S.: Steganography:SeeingtheUnseen.”IEEEComputer,February

1998(1998)26−34.9. Johnson,N.F., Jajodia, S.:Steganalysisof ImagesCreated UsingCurrent Steganography

Software.Proc.2ndWorkshoponInfoHiding,April1998,Portland,Oregon(1998).

10.Kwan,M.:Gifshuffle.http://www.darkside.com.au/gifshuffle/ 

11.Machado,R.:EZStego.http://www.stego.com/ 12. Maroney, C.: Hide and Seek. ftp://ftp.csua.berkeley.edu/pub/cypherpunks/steganography/hdsk1.0b.zip

13.Nelson,L.:Gif-It-Up.http://www.cs.cf.ac.uk/User/L.Nelson14.Schmitz,B.E., Stevenson,R.L.,ColorPaletteRestoration.GraphicalModels andImage

Processing57No.5(1995)409−419.