Some Basic Concepts in Image Steganography

转载自:http://thelivingpearl.com/2014/04/07/some-basic-concepts-in-image-steganography/
(Note: I am by no means an expert on this matter, I am simply expressing my personal experience with the subject. For more information Wikipedia Steganography or Google would be a good start)

Steganography is the art of hiding message in such way that no one beside the intended receiver will find (if done correctly). This is by no means a new idea, the history of Steganography can be traced back to the 15 century. For our purposes, I am going to discuss Steganography in the general sense in the computer world, mostly done in Images, but not limited to them. For this example I am only going to consider 256 gray and colored images for simplicity of example, this can be done however with other images and data as well.
How information is stored?

Any computer data today consists of bits of data, 0 or a 1. A bunch of them constitute a byte, which is normally 4 bits. The length of a bit depends on a number of things such as implementation, system, usage and other factors. An image is usually stored as one of two options:

  1. Black & White (Grayscale)
  2. RGB colors (Normal)

In both cases the image is built from pixels, or a dot in a 2 dimensional array that has a certain value. In case of option 1 it would be on a scale from 0-255, 0 being black. For option 2 there aren three values that constitute one color as output, Red - Green - Blue, each with the same scale of values from 0 - 255, 0 being black. So if we have a Grayscale image with all values equal to 255, we will end up with a white image.
How to hide?

So lets say we have the following image (Grayscale) stored in memory:

basic_image

This would give us an empty 4 X 4 pixel white image. Keep in mind that any of these cell blocks is actually stored in memory as 255 = 11111111 in binary. Now you would agree that the character ‘A’ is equivalent to 65 in ascii which in binary is equal to 01000001. You would also agree that if we change one of these cell values to 254 it would be unnoticeable to the naked eye.
The ‘Magic’ bit…

We are going to store the individual values of A’s binary representation in the least significant bits of the image values. This means we would go over the cell or pixels of the image and change only the last bit of the value, changing the color by only 1. The cells of an image are numbered as follow:

cell_numbers

In order for to be stored in memory we will used the first 8 bits, changing the values in the LSB to match to ‘A’. The result will still be a seemabliy white page, stored in memory like this:

image_with_info
Color and Extraction

The same idea we applied to this example could be applied to an RGB file or any other data type. One could also encrypt the message hidden so even if it is found by anti-Steganography software it would be useless. Based on how you hide the memory you would also need an extraction code. For our example we would simply need to extract and concatenate the first 8 LSB and convert them back to a character, which would give us ‘A’. In other cases, like in RGB images, you will need to figure out how the information is hidden. RGB adds 3 dimensions and can get complicated really fast. All that is another topic all together fo

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
《编程语言概念》是一本关于编程语言基本概念的电子书。这本书系统介绍了编程语言的重要概念,包括语法、语义、语言设计和实现等方面的内容。 首先,这本书介绍了编程语言的语法。它详细解释了如何定义和组织编程语言的基本元素,如变量、运算符、控制结构等。读者可以通过了解不同编程语言的语法规则,更好地理解代码的结构和意义。 其次,这本书讨论了编程语言的语义。它解释了编程语言中代码的含义和行为。读者可以学习如何准确地编写代码,并理解代码在计算机中的执行过程。通过掌握语言的语义概念,读者可以编写出高效、准确的程序。 此外,这本书展示了语言设计的原则和模式。它介绍了不同编程语言的设计思路和方法,帮助读者了解如何设计出具有良好可读性和易用性的编程语言。这对于那些希望自己设计新的编程语言的读者尤为重要。 最后,这本书还涵盖了语言的实现过程。它讲解了编程语言如何被解释器或编译器转化为机器代码。读者可以了解到编程语言的执行原理和底层工作机制,从而更好地优化和调试代码。 总而言之,《编程语言概念》这本电子书通过全面、系统地介绍编程语言的各个方面,帮助读者建立起对编程语言的深入理解。无论是初学者还是有一定经验的开发者,都可以从中学习到有关编程语言的重要概念和技术,进一步提高自己的编程水平。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值