Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Advanced Encryption Standard Process

encryption

  • Please log in to reply
5 replies to this topic

#1 anribalam

anribalam

    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 06 December 2011 - 10:41 PM

Hi All,

this is my first post,
english is not my first language, sorry for my bad english

here, i want to ask about AES algorithm basic from rijndael algorithm
i want to make a program that can encrypt image using AES algorithm. i confused about how AES algorithm process.
please someone give me a clue,

thanks,
  • 0

#2 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 06 December 2011 - 10:45 PM

Rijndael was elected as the advanced encryption standard (AES) if that is one of your questions, they are the same thing.

For your other question, the encryption cipher (its basic functioning) works on blocks of bytes (computer data) and can freely encrypt everything from text to binary to images.

If you have programming for AES then you do not need to change anything, you need only to feed the binary contents (as unsigned chars, or bytes, or characters) to the encryption function.

If you can use an existing encryption library of which supports AES, then you can likely do this in very few steps (I am not sure what exactly you are using at this point, if by hand or by some programming library)

Absolutely feel free to clarify, I will try to better form my reply if it is unclear.

Regards,
Alexander.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#3 anribalam

anribalam

    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 07 December 2011 - 08:20 PM

thanks for answer, :)

i want to create my own library using this algorithm.
i just think, when i want to encrypt a file (jpg, txt,, or anything else). i must convert/get hex of that file right?.

so, i want to try encrypt image file with out using that way.
what if i want to create block of data from image file using pixel of that image.
is that posible?

my main question is, is it true that the important process of AES algorithm is to create block of hex of plaintext?
so when i get the block of hex, i just follow the encryption process from rijndael algorithm.

thanks,

*sorry for my bad english :D
  • 0

#4 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 07 December 2011 - 08:46 PM

so when i get the block of hex, i just follow the encryption process from rijndael algorithm.

ASCII (plaintext, as visual characters) uses the standard byte. It uses specific values from 0 to 127 in binary to display visual characters. Either decimal or hexadecimal is stored in binary (base 2), so you cannot "convert" to a block of hexadecimal.

A string in most languages is simply a "string of bytes", that may be a block of text, but can generally be any sort of data as long as you know the string's length. You can freely read the image in chunks of bytes, and encrypt it, then write all of the chunks together as the encrypted file.

so, i want to try encrypt image file with out using that way.
what if i want to create block of data from image file using pixel of that image.

If you have a bitmap, you could maybe encrypt separate "pixels", however that is a very inefficient means of encryption as each pixel's ciphertext (result) will have to be padded to Rijndael's block size. This would create an abnormally large result. Further, jpeg can be compressed confusing pixel information, SVG can even consist of code (to draw shapes) and various formats do not work directly as pixels (vectors are a notable example)

Do you "require" the image to be broken down and encrypted, or had you just not understood it could be encrypted if read as binary?

As for the actual encryption, the algorithm is a little complex and it may be wise to use an existing library or implementation of Rijndael (especially if it is written in low level programming languages), it can still be used to encrypt images.

I can write a basic draft of how the Rijndael function works if you require it, and find a simple example code from scratch so that you at least know how it is done (unless you have a specific language in mind)

Alexander.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#5 anribalam

anribalam

    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 08 December 2011 - 09:50 PM

I can write a basic draft of how the Rijndael function works if you require it, and find a simple example code from scratch so that you at least know how it is done (unless you have a specific language in mind)

thanks alex, please post that basic draft.

Do you "require" the image to be broken down and encrypted, or had you just not understood it could be encrypted if read as binary?

actually i think i can change pixels of image to hexadecimal with a function that i want create. i dont know it can't done to all image.
thanks for explanation.

So, i just need to get an array of bytes from image then encrypt it to another array of bytes. Then again change thank array bak to image.
just like that right?

i want encrypt using AES from image plaintext to image chipertext. like chaos transformation encryption,

Again, thanks Alexander
  • 0

#6 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 09 December 2011 - 04:31 PM

I am not sure what you are using to realize the theory, C is a good candidate however is complex if you have not learned the basics beforehand.

The main process is the key expansion, and round key selection from Rijndael's key scheduling process. A basic overview of this including steps to create code for yourself can be found here: Rijndael key schedule - Wikipedia, the free encyclopedia

Within the key scheduling process, if you had wanted to apply a method of the chaos theory then you would need to replace Rijndael's S-box implementation with its own. This could be possibly very complex, and I cannot find anything in quick search that would help you. There is in fact a paper (IEEE, pay-walled) that deals with implementing this feature in to AES: http://ieeexplore.ie...rnumber=5595158

As for specifics regarding languages (a draft for a program to implement the original Rijndael cipher) you may wish to look at existing cryptographical libraries. I've had a few that I had drafted in C before, however had lost them and the rough knowledge over time. There was one user asking and creating a simple AES library in C, he had used the steps in the Wikipedia link and made a roughly working draft if you search for it.

I am unsure further than what I have suggested, it has been a long time.

Alexander.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.






Also tagged with one or more of these keywords: encryption

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download