wood burning stoves 2.0*
The moose likes I/O and Streams and the fly likes how to encrypt data into an image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how to encrypt data into an image" Watch "how to encrypt data into an image" New topic
Author

how to encrypt data into an image

abhi ram challapalli
Greenhorn

Joined: Feb 11, 2010
Posts: 5
I need some help.I want to know how encrypt the data into an image using java,
that is reading an image pixel by pixel and writing back the data pixel by pixel.

Thanks in advance,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
Are you talking about steganography? If so, searching for "steganography java" should find all kinds of code, e.g. DIIT on SourceForge. If you meant something else, please provide more detail.


Ping & DNS - my free Android networking tools app
abhi ram challapalli
Greenhorn

Joined: Feb 11, 2010
Posts: 5
Hey !thanks for responding,
I am uploading my abstract and other details of my project...
can you give me overview on the project.any reference etc.

Thank you.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
I can't tell from your post whether you're talking about steganography or not.
abhi ram challapalli
Greenhorn

Joined: Feb 11, 2010
Posts: 5

Abstract — Several methods have been proposed for
encrypting images by shared key encryption mechanisms since
the work of Naor and Shamir. All the existing techniques are
applicable to primarily non-compressed images in either
monochrome or color domains. However, most imaging
applications including digital photography, archiving, and
internet communications nowadays use images in the JPEG
compressed format. Application of the existing shared key
cryptographic schemes for these images requires conversion
back into spatial domain. In this paper we propose a shared
key algorithm that works directly in the JPEG domain, thus
enabling shared key image encryption for a variety of
applications. The scheme directly works on the quantized DCT
coefficients and the resulting noise-like shares are also stored
in the JPEG format. The decryption process is lossless
preserving the original JPEG data. The experiments indicate
that each share image is approximately the same size as the
original JPEG image retaining the storage advantage
provided by JPEG compression standard. Three extensions,
one to improve the random appearance of the generated
shares, another to obtain shares with asymmetric file sizes,
and the third to generalize the scheme for n>2 share cases,
are described as well.

Index Terms — Image Encryption, JPEG Images, Shared Key
Encryption, Visual Cryptography

pdf link:http://www.easy-share.com/1909272930/shared_key_encr_jpeg_color_images.pdf

thank you,


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
So this isn't about steganography, nor about compressing image files in general, but about a specific way to encrypt JPEG files that preserves certain characteristics of JPEGs even when encrypted. It also looks like the abstract of a paper about this topic that you could read to find out all the details. Do you have a specific question about this that isn't answered in the paper? This is rather arcance stuff, though, making it unlikely that anyone who hasn't read the paper would be able to answer questions.
abhi ram challapalli
Greenhorn

Joined: Feb 11, 2010
Posts: 5
hey,
sorry i am out for a while.
my doubt exactly is:
IN Proposed schemes...

A. Monochrome Images
The lossy version of JPEG image compression uses discrete
cosine transforms (DCT) [9]. A monochrome image is first
split into 8×8 non-overlapping blocks of pixels. An 8×8 DCT
is applied to each block and the resulting coefficients are
scalar quantized using a quantization matrix. The quantized
coefficients are then converted from a two-dimensional
representation to a one-dimensional vector by a process known
as zig-zag scanning and sent to an entropy coder that uses
either Huffman or arithmetic coding.


doubt:
how do i split an image into 8 by 8 pixels and convert them into 1-dimensional vector and i am in an idea of using the matlab
for computational purposes,can i use the end result in java?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
I'm not sure how data exported from MatLab might be usable in Java, but I'm sure you can find detailed descriptions of the DCT and/or JPEG algorithms through Wikipedia and Google.
abhi ram challapalli
Greenhorn

Joined: Feb 11, 2010
Posts: 5
hey,
you forgot to tell me how to split the image.

Thanks.
Chris Brooking
Greenhorn

Joined: Sep 13, 2010
Posts: 1
You can code data into an image in various ways. This program encodes data into a square png inage:



The attached .png is generated from the text of this message using the command:




To decode





[Thumbnail for test.png]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to encrypt data into an image
 
Similar Threads
reading an image file
updating an image with a new color and or content
Image manipulation question
how to display in swing?
Create BufferedImage