Thread: encryption algorithm

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    3

    encryption algorithm

    hello sir:
    i need any encryption algorithm source code in c++
    which encrypt & decrypt data...
    any simple algorithm with name...
    i want to run & check...
    plz...
    i shall be thank ful 2 u...

    HAMZA!

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    What is the purpose of this encryption?

    Also, please read the homework policy.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    3
    actually there is no purpose...
    m trying to watch how it works in c++
    that y...
    i need any type of simple encryption algo.....
    c++

  4. #4

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Code:
    char Encrypt(char Data){
       return Data+1;
       }
    
    char Decrypt(char Data){
       return Data-1;
       }
    Anything more advanced you will have to be more specific and show us what you have already tried.

  6. #6
    Registered User
    Join Date
    Dec 2009
    Posts
    3
    u people really disapointed me...
    actualy m new user of this forum..
    today i joi it first time...
    m from pakistan....
    & i really hurt....
    i never got my ans my source code...
    anyhow....
    thank u very much.....
    TC..

  7. #7
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    If the above posts have "disappointed" you, then you have also probably disappointed those who have tried to help you. When you post, write intelligent, coherent, grammatically correct, and complete sentences and words. If you cant do all of those, then do at least one (it appears you havent done any of those). No one is trying to "hurt" you, and you shouldnt be taking anything on here personal.

    Nothing in this world comes easy (let alone easy and free). If you want help, you have to work for it. That is, you have to put at least some effort into describing what you are asking and require.

    Did you look at the above link that was posted earlier? If not then do so, and there should be at least a few examples that satisfy youre requirements. If you cant find any, then do a simple search yourself. If its the actual terms/keywords that you arent sure about, then we can help you if you describe what the problem is.

    The algorithm described above is an example of encryption/decryption, even if its trivial.

    If you are unwilling to take the time to explain exactly what you need, then its unlikely you will understand any non-trivial algorithm given to you.

  8. #8
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    Quote Originally Posted by hamza_bse View Post
    u people really disapointed me...
    actualy m new user of this forum..
    today i joi it first time...
    m from pakistan....
    & i really hurt....
    i never got my ans my source code...
    anyhow....
    thank u very much.....
    TC..
    all of the top hits answer your question.

  9. #9
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Not to mention the fact that now that you have stated that you are from Pakistan, noone here (from the US) can help you with out violating federal laws prohibiting export of munitions. Strong encryption is considered a munition in the US. 5 years, $50,000 fine.

  10. #10
    Registered User slingerland3g's Avatar
    Join Date
    Jan 2008
    Location
    Seattle
    Posts
    603
    Try this on for size as this can easily be implement in code.

    Scytale - Wikipedia, the free encyclopedia

    There are earlier roman encryption techniques as well that can easily be put to code. Certain SSL encryption techniques are protected I am sure that even if you had such source code getting to decipher it is another matter. So more details on what you are really after is needed to guide you in the right direction.

  11. #11
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    My suggestion would be to implement TEA. It's extremely simple and effective.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  12. #12
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Strong encryption is considered a munition in the US. 5 years, $50,000 fine.
    Most of the strong encryption stuff is top secret and not available to the general public. A simple Google will turn up lots of answers for research on the topic. However since these encryption techniques are public the decryption techniques are also public. As I stated most of the high-tech encryption algos are a closely guarded secret and for good reason and we couldn't give them to you if we wanted to b/c we don't know them. Those who do are probably bound by security clearances and couldn't give out the information and wouldn't give out the information if their life depended on it.

    All encryption is doing is taking one representation of data, either human readable or machine readable, and converting it into a representation that is not easily human or machine readable without first being decrypted.
    Last edited by VirtualAce; 12-12-2009 at 01:15 AM.

  13. #13
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    If you just want to see how it works and run Linux you can look at the library source for OpenSSL. This is a common and well supported encryption method...and should be exportable everywhere IIRC...

    Jeff

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. RSA Encryption Algorithm help
    By gL_nEwB in forum C++ Programming
    Replies: 2
    Last Post: 04-27-2008, 04:14 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. abt encryption algorithm
    By purIn in forum C Programming
    Replies: 9
    Last Post: 12-22-2003, 10:16 PM
  4. What's wrong with my Stream Cipher Encryption?
    By Davros in forum C++ Programming
    Replies: 3
    Last Post: 04-18-2002, 09:51 PM