fork download
  1. Steganography is the art and science of
  2. writing hidden messages in such a way that no one
  3. , apart from the sender and intended recipient, suspe
  4. cts the existence of the mess
  5. age, a form of security through obscurity. T
  6. he word steganography is of Greek origin and means "concea
  7. led writing" from the Greek words steganos meaning "co
  8. vered or protected", and graphein meaning "to w
  9. rite". The first recorded use of the term was in 1499 by Joh
  10. annes Trithemius in his Steganographia, a trea
  11. tise on cryptography and steganography disg
  12. uised as a book on magic. Generally, mess
  13. ages will appear to be something else: images, arti
  14. cles, shopping lists, or some ot
  15. her covertext and, classically, the hidden message may be in invi
  16. sible ink between the visible lines of a private letter.
  17.  
  18.  
  19.  
  20. The
  21. advantage of steganography, over cr
  22. yptography alone, is that messages do not attract attention
  23. to themselves. Plainly visible encrypted messages—no matter
  24. how unbreakable—will arouse s
  25. uspicion, and may in themselves be incriminating
  26. in countries where encryption is illegal. Therefore,
  27. whereas cryptography protects the contents of
  28. a message, steganography can be said to protect b
  29. oth messages and communicating parties.
  30.  
  31.  
  32.  
  33. Steganography inclu
  34. des the concealment of information within com
  35. puter files. In digital steganography, electronic communication
  36. s may include steganographic coding insi
  37. de of a transport layer, such as a document file, image fil
  38. e, program or protocol. Media
  39. files are ideal for steganographic transmissio
  40. n because of their large size. As
  41. a simple example, a sender might start with a
  42. n innocuous image file and adjust the color of every 100th pixel
  43. to correspond to a letter in the alphabet, a
  44. change so subtle that someone not specifically looking f
  45. or it is unlikely to notice it.
  46.  
  47.  
  48.  
  49. The
  50. first recorded uses of steganography can be tr
  51. aced back to 440 BC when Herodotus mentions two examples o
  52. f steganography in The Histories of
  53. Herodotus. Demaratus sent a warning about a
  54. forthcoming attack to Greece by w
  55. riting it directly on the wooden backing of a wax tablet bef
  56. ore applying its beeswax surface. Wax tablets were in common use
  57. then as reusable writing surfaces, sometime
  58. s used for shorthand. Another ancient example is that o
  59. f Histiaeus, who shaved the head of his most trusted s
  60. lave and tattooed a message on it. After his hair had g
  61. rown the message was hidden. The purpose was to
  62. instigate a revolt against the Persians.
  63.  
  64.  
  65.  
  66. Steganography has b
  67. een widely used, including in recent historical times and t
  68. he present day. Possible permutations are endless and
  69. known examples include:
  70.  
  71. * Hidden messages within wax ta
  72. blets: in ancient Greece, people wrote me
  73. ssages on the wood, then covered it with wax upon which an innocen
  74. t covering message was written
  75. .
  76.  
  77. * Hidden messages on messenger's body: also used in ancien
  78. t Greece. Herodotus tells the story o
  79. f a message tattooed on a slave's shaved head, hidden by the
  80. growth of his hair, and exposed by shaving his head
  81. again. The message allegedly carried a warning to Greece abo
  82. ut Persian invasion plans. Th
  83. is method has obvious drawbacks,
  84. such as delayed transmission while waiting for the s
  85. lave's hair to grow, and the restrictions o
  86. n the number and size of mess
  87. ages that can be encoded on one person
  88. 's scalp.
  89.  
  90. * In WWII, the French Resistance sent some messages w
  91. ritten on the backs of couriers
  92. using invisible ink.
  93.  
  94. * Hidden messages on paper wr
  95. itten in secret inks, under other messages
  96. or on the blank parts of other
  97. messages.
  98.  
  99. * Messages written in Morse code on knitting yarn and
  100. then knitted into a piece of clothing wor
  101. n by a courier.
  102.  
  103. * Messages written on the back o
  104. f postage stamps.
  105.  
  106. * During and after
  107. World War II, espionage agents used photographically p
  108. roduced microdots to send information back and
  109. forth. Microdots were typically
  110. minute, approximately less than the size of the period prod
  111. uced by a typewriter. WWII microdots needed to be embedded
  112. in the paper and covered with an adhesive (such as collodion). T
  113. his was reflective and thus detectable
  114. by viewing against glancing light. Alternative techniques included
  115. inserting microdots into slits cut into the edge of
  116. post cards.
  117.  
  118. * During World War II, a spy for
  119. Japan in New York City, Velvalee
  120. Dickinson, sent information to accommodatio
  121. n addresses in neutral South Americ
  122. a. She was a dealer in dolls, and
  123. her letters discussed how many of this or that doll
  124. to ship. The stegotext was the doll orders, while the
  125. concealed "plaintext" was itself enco
  126. ded and gave information about ship movements,
  127. etc. Her case became somewhat fa
  128. mous and she became known as the
  129. Doll Woman.
  130.  
  131. * Cold War count
  132. er-propaganda. In 1968, crew membe
  133. rs of the USS Pueblo (AGER-2) intelligence ship held as pr
  134. isoners by North Korea, communicated in sign
  135. language during staged photo opport
  136. unities, informing the United States they
  137. were not defectors but rather were being held ca
  138. ptive by the North Koreans. In other photo
  139. s presented to the US, crew members gave "the finger" to
  140. the unsuspecting North Koreans, in an attempt to
  141. discredit photos that showed them smi
  142. ling and comfortable.
  143.  
  144.  
  145.  
  146. --
  147.  
  148. http://e...content-available-to-author-only...a.org
  149. /wiki/Steganography
  150.  
  151.  
  152.  
Success #stdin #stdout 0.01s 5392KB
stdin
 # Import necessary libraries
from PIL import Image
import stepic

# Open the image within which the secret message is to be stored:
img = Image.open("photo.jpg")
# Specify the secret message:
message = "Hey there! Welcome to CodeSpeedy."
# Convert the message into UTF-8 format:
message = message.encode()
# Pass the image and message into the encode() function.
# This function returns a new image within which the message is hidden:
encoded_img = stepic.encode(img, message)
# Specify the name and extension for the new image generated:
encoded_img.save("encrypted_photo.png")

print("Encryption Completed!")
stdout
Standard output is empty