simple file encryption library

Discussion in 'C' started by akaash19, Feb 10, 2010.

  1. akaash19

    akaash19 New Member

    Joined:
    Feb 8, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hello Friends,
    I need simple file encryption library to encrypt files with symmetric key and decrypt them.
    I went through open ssl and its too confusing.I just need simple library to perform just file encrypt and decrypt.
    I am new in C, just done programming in java/php before.

    Thanks all
    Akaash
     
  2. Gene Poole

    Gene Poole New Member

    Joined:
    Nov 10, 2009
    Messages:
    93
    Likes Received:
    5
    Trophy Points:
    0
    For simplicity of code and understanding, I'd go with a simple stream cipher like RC4. What are your requirements? How secure does it need to be? Is it to be platform independent (Windows has had a cryptoAPI for some time now which makes things much easier)?
     
  3. akaash19

    akaash19 New Member

    Joined:
    Feb 8, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    THanks for the reply,
    security is not primary concern.First i need a library.
    I need to use encryption code in linux environment.
    Regards
    sumit
     
  4. Gene Poole

    Gene Poole New Member

    Joined:
    Nov 10, 2009
    Messages:
    93
    Likes Received:
    5
    Trophy Points:
    0
    Well, RC4 is very simple to code in C. It's a stream cipher so once it is initialized, just grab a byte one at a time and XOR it with your plaintext.

    There's a complete example here:

    http://en.wikipedia.org/wiki/Rc4
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice