php中如何实现隐写术

发布于 2024-08-14 05:30:58 字数 109 浏览 11 评论 0原文

我在某个地方发现了隐写术..在另一个信息中存储或隐藏信息的方式..有时某些图像也被用来隐藏信息..我可以得到一个例子或任何进一步的东西来了解更多关于它是如何实现的。 ..或者如果有可能在 php 中使用它

Somewhere I found out steganography .. the way of storing or hiding information within another information.. at times certain images are also used to hide the information.. Can i get an example or any thing further to know more about how this is implemented... or if at all is it possible to use this in php

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

旧情勿念 2024-08-21 05:30:58

一般来说,如果您谈论隐写术,那么基本上您是将信息填充到图像文件的角落和缝隙中。您可以使用几乎任何图像库,只要图像库不严格根据架构验证图像文件即可。您几乎可以使用任何您喜欢的编程语言。

有许多技术。以下是一些易于编程的内容。

  • 使用存储图像的格式
    图像成块。您可以移动
    块以允许文件中存在间隙。你
    然后可以隐藏信息字符串
    在间隙中。
  • 将图像转换为索引图像
    图像。声明一个大于
    颜色的数量。现在你可以
    隐藏调色板中的额外信息
    图像中未使用的颜色。
  • 如果您使用的是图像格式
    它有层,你可以声明一个
    alpha 通道所在的层
    最大限度。这会导致该层
    完全透明。您可以使用
    另一个颜色通道来隐藏你的
    数据。

还有许多其他技术。请记住使用大量压缩和随机误导性数据以使图像文件看起来合法。

Generally , if your talking about steganography, then basically you are stuffing information into the nooks and crannies of the image file. You can use nearly any image library out there as long as the image library doesn't validate the image file strictly against a schema. You can use nearly any programming language you fancy.

There are numerous techniques. Here are some which are easy to program.

  • Use an image format which stores the
    image in chunks. You can move the
    chunks to allow gaps in the file. You
    can then hide strings of information
    in the gaps.
  • Convert the image to an indexed
    image. Declare a pallete larger than
    the number of colors. Now you can
    hide extra information in the pallete
    colors not used in the image.
  • If you are using an image format
    which has layers, you can declare a
    layer in which the alpha channel is
    maximum. This causes the layer to be
    fully transparent. You can use
    another color channel to hide your
    data.

There are numerous more techniques. Remember to use generous amounts of compression and random misleading data to make the image file look legitimate.

吻风 2024-08-21 05:30:58

您希望 PHP 中的 GD 库能够操作 JPG 图像:
http://php.net/manual/en/book.image.php

要了解隐写术和隐写分析,请阅读本文:
http://www.securityfocus.com/infocus/1684

You want the GD library in PHP to manipulate JPG images:
http://php.net/manual/en/book.image.php

For an understanding of Steganography and Steganalysis, read this article:
http://www.securityfocus.com/infocus/1684

水水月牙 2024-08-21 05:30:58

进行隐写术的一种常见方法:

考虑一个 1024 x 768、24 位颜色(即 8 位红色、8 位黄色、8 位蓝色)图像。现在,图像中最不重要的颜色并不重要。因此,每个像素可以隐藏三位信息。

这使得 1024 * 768 * 3 / 8 或 294,912 字节的信息可以隐藏在大图像中,而不会对图像造成太大影响。

One common way to do steganography:

Think about a 1024 x 768, 24-bit color (i.e. 8 bits of red, 8 bits of yellow, 8 bits of blue) image. Now, the least-significant bit of the colors in the image doesn't matter much. Therefore, one can hide three bits of information in each pixel.

That makes for 1024 * 768 * 3 / 8, or 294,912 bytes of information that can be hidden in a large image without degrading the image much.

穿越时光隧道 2024-08-21 05:30:58

这里是来自 phpclasses.org 的一个类

使用隐写术隐藏图像中的加密数据

维基百科的隐写术页面 中的一些有用链接

最后一个更多演示和源代码位于此处

Here is a class from phpclasses.org for

Hide encrypted data in images using steganography

Some useful links from Steganography page at wikipedia

At last one more demo & source code over here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文