• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

how to encrypt data into an image

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
abhi ram challapalli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't tell from your post whether you're talking about steganography or not.
 
abhi ram challapalli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey,
you forgot to tell me how to split the image.

Thanks.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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



test.png
[Thumbnail for test.png]
 
Don't MAKE me come back there with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic