how can we encrypt images using AES algorithm

how can we encrypt images using AES algorithm

  • (2 Pages)
  • +
  • 1
  • 2

22 Replies - 14036 Views - Last Post: 14 January 2010 - 03:24 PM Rate Topic: -----

#1 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

how can we encrypt images using AES algorithm

Post icon  Posted 10 January 2010 - 01:57 AM

i am working on major project i am done with encryption of text but i am stuck on encryption of images using AES algorithm please help me.......
Is This A Good Question/Topic? 0
  • +

Replies To: how can we encrypt images using AES algorithm

#2 Anarion  Icon User is offline

  • The Persian Coder
  • member icon

Reputation: 387
  • View blog
  • Posts: 1,663
  • Joined: 16-May 09

Re: how can we encrypt images using AES algorithm

Posted 10 January 2010 - 10:07 AM

It's the same as working with text, except that you read blocks of data (not human readable), then do the encryption with the algorithm of your choice. Like:
  • read a block from the file (x bytes)
  • perform encryption algorithm on the block of data (in memory of course)
  • write this block to output location
  • read the next block
...
this loop continues till there is no more data. (Note that the last block might be smaller than other blocks)

This post has been edited by Anarion: 10 January 2010 - 10:08 AM

Was This Post Helpful? 0
  • +
  • -

#3 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 05:52 AM

thanks for replying.......
plz elaborate m still confused.........
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 06:07 AM

What are you confused about?
Was This Post Helpful? 0
  • +
  • -

#5 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 10:33 AM

1. how to input images
2. how to convert them into bytes and input them.
Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 10:44 AM

What code do you have to read the images?
Was This Post Helpful? 0
  • +
  • -

#7 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 10:54 AM

i have code for text not for images. that is the main prob.
Was This Post Helpful? 0
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 11:25 AM

What's your code to read TEXT then?

Listen...if you're looking for someone to write your code for you, you've come to the wrong place. You've got to show some sort of effort, or I will close this topic.
Was This Post Helpful? 0
  • +
  • -

#9 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 12:10 PM

should i send u my code for text encryption......
m attaching a copy of it...
it has few errors but just tell how to input images in it............

Attached File(s)

  • Attached File  2ND.TXT (6.91K)
    Number of downloads: 996

Was This Post Helpful? 0
  • +
  • -

#10 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 12:53 PM

i have presentation to give in morning so atleast tell me wether we can encrypt images with it, if yes how?
plz
Was This Post Helpful? 0
  • +
  • -

#11 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 01:08 PM

Cool...you've totally demonstrated your copy and paste ability, so here's a clue: bytes are bytes. Read the bytes from the file with fread and encrypt them.
Was This Post Helpful? 0
  • +
  • -

#12 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 01:28 PM

even the image files also.......
plz dude help me here m not asking for code........
Was This Post Helpful? 0
  • +
  • -

#13 Anarion  Icon User is offline

  • The Persian Coder
  • member icon

Reputation: 387
  • View blog
  • Posts: 1,663
  • Joined: 16-May 09

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 01:36 PM

View PostJackOfAllTrades, on 14 Jan, 2010 - 10:38 PM, said:

Cool...you've totally demonstrated your copy and paste ability, so here's a clue: bytes are bytes. Read the bytes from the file with fread and encrypt them.

Dude, ^he already told you how (even I told you in earlier posts too)... Just open the file like you do with a text file... read them as you like, change them with an encryption algorithm (there are many variety of them), then write this to another file.

This post has been edited by Anarion: 14 January 2010 - 01:37 PM

Was This Post Helpful? 1
  • +
  • -

#14 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 01:41 PM

so as we save encrypted .text files we can save image files like .JPEG and others..........
Was This Post Helpful? 0
  • +
  • -

#15 vishawdeep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 10-January 10

Re: how can we encrypt images using AES algorithm

Posted 14 January 2010 - 02:01 PM

sir plz atleast you can say YES or no......
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2