65.9K
CodeProject is changing. Read more.
Home

Cryptography with symmetric key using bitmaps

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.18/5 (10 votes)

Oct 19, 2003

1 min read

viewsIcon

51950

downloadIcon

900

Cryptography with symmetric key using bitmaps

 

 Download sourcecode

This is an ideea of cryptography
  with symmetric keys, using bitmaps.

  The cryptography with symetric key works:
    You have a text in clear M and a key K, for code.
    Apply the key K to text in clear M and obtain
    a coded message C.
    Transfer coded message through a public line.
    At receiver apply key K to coded message C
    and obtain text in clear M.
    Nobody can decode coding messages C if he
    doesn't have key K.

  The key is a bitmap.
  The message in clear is a text file.
  The coded message is a bitmap.


How application works:
  An Ascii character is between 0 and 255.
  And a pixel in a bitmap is RGB(0:255,0:255,0:255)
  The basic ideea was to replace a component of a
    RGB element from a pixel (let's say blue) with ASCII
    character code. But in this case the photo
    is altered.
  So the ideea is to broke ascii character code into three
    parts. Example: 128 -> 1, 2, 8.
    First part (1) is added to a pixel, over red component.
    Second part (2) is added to the next pixel, over green component.
    Third part (8) is added to the pixel, over blue component.
  Using this method pixels are very little altered. 

  Limitations of application:
  1.Application works only with bitmap files.
  2.The text in clear file size must be smaller than
    the size of bitmap key file.
  3.Application is written in visual basic .net so you need
    to have installed .net framework (free download from microsoft site).