Repetable encryption values

Posted on 2011-04-21
Last Modified: 2012-05-11
Hi everyone,
I am looking for a solution to the following problem...
I have 2 machines each with the same initial string value (aka key).  On each of the systems I want to encrypt the strings on both machines in such a way that after the encryption their values are the same, and to be able to encrypt each of them over and over again with equivelent results on both machines.  

So, I guess my fundamental question is - "given the same plain text starting point, does any specific encryption algorithm encrypt to the same value each time?"

Thanks very much for your help.
Question by:edc
    LVL 16

    Accepted Solution

    Most of them do. Given a plain text and a key, most encryption algorithms will produce the same result every time. DES, Blowfish, Twofish, Skipjack are all like that.

    Expert Comment

    I’m not sure what your application is, but you may not necessarily require encryption.  Consider hashing the plain text “key.”  You can use either SHA1/MD5 (or others, but these are the “Golden” standards) algorithms.  If you don’t already know this, hashing allows you to go from KEY to HASH but not backwards, from HASH to KEY.  Like most encryption already mentioned, the same hashing algorithm on n different machines will give the same result given the same clear text input.
    LVL 1

    Author Comment

    @imladris: Thank you for your answer.  I appreciate you sharing your knowledge.

    @mbmast: Thank you as well for your answer.  We had originally looked at hashing specifically for that reason, however it left us hanging on a couple of other points that we needed to fulfill.  I appreciate you taking the time to share your knowledge.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

      Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
    Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
    The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
    The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now