Encryption question

Discussion in 'ASP .Net Security' started by Steve Kallal, Mar 14, 2005.

  1. Steve Kallal

    Steve Kallal Guest

    I need to find a form of encryption that always encrypts a given plain text
    string to the exact same encrypted string every time. I want to use a form of
    output caching in my ASP.NET application that will use a cached version of a
    web page if the query string parameters are exact each time. If the encrypted
    query string varies each time, even with the same plain text string, the
    cache likely will not work.

    Every encryption algorithm I have tried so far using the System.Security
    namespace, produces a different encrypted string each time I try it.

    Thanks in advance!

    Steve Kallal
    Steve Kallal, Mar 14, 2005
    #1
    1. Advertising

  2. Steve Kallal

    Alek Davis Guest

    Steve,

    Every encryption algorithm when used with the same key (and initialization
    vector, IV, if applicable) will produce the same ciphertext value from the
    same plaintext value. Are you saying that you cannot find a sample code that
    would allow you to encrypt the same value (with the same key and IV) and
    generate the consistent result? If this is the case, you may not be doing it
    correctly. Please forget about your application for a moment and just try to
    solve the problem with a simple text string. There are many examples online
    explaining ho to do this. If this is not the case, and you cannot achieve
    consistent results for your particular application (not really sure what you
    are doing regarding caching of the ASP.NET pages), then you need to focus on
    the inputs. Make sure that plaintext converted to byte arrays, and key
    characteristics (key bytes, or password, IV, salt, password iterations,
    hashing algorithm) are the same.

    Alek

    "Steve Kallal" <> wrote in message
    news:...
    > I need to find a form of encryption that always encrypts a given plain

    text
    > string to the exact same encrypted string every time. I want to use a form

    of
    > output caching in my ASP.NET application that will use a cached version of

    a
    > web page if the query string parameters are exact each time. If the

    encrypted
    > query string varies each time, even with the same plain text string, the
    > cache likely will not work.
    >
    > Every encryption algorithm I have tried so far using the System.Security
    > namespace, produces a different encrypted string each time I try it.
    >
    > Thanks in advance!
    >
    > Steve Kallal
    >
    Alek Davis, Mar 15, 2005
    #2
    1. Advertising

  3. Steve Kallal

    Alek Davis Guest

    Try http://www.obviex.com/samples/encryption.aspx or
    http://dotnet.org.za/deon/articles/2998.aspx (if you do a Google search, you
    will find many more; I was too lazy to go through more than the first dozen
    of the returned result).

    Alek

    "Steve Kallal" <> wrote in message
    news:...
    > Thanks Alek,
    >
    > Can you point me to an online sample where the ciphertext output is always
    > produced the same with the same inputs.
    >
    > Thanks,
    >
    > Steve
    >
    > "Alek Davis" wrote:
    >
    > > Steve,
    > >
    > > Every encryption algorithm when used with the same key (and

    initialization
    > > vector, IV, if applicable) will produce the same ciphertext value from

    the
    > > same plaintext value. Are you saying that you cannot find a sample code

    that
    > > would allow you to encrypt the same value (with the same key and IV) and
    > > generate the consistent result? If this is the case, you may not be

    doing it
    > > correctly. Please forget about your application for a moment and just

    try to
    > > solve the problem with a simple text string. There are many examples

    online
    > > explaining ho to do this. If this is not the case, and you cannot

    achieve
    > > consistent results for your particular application (not really sure what

    you
    > > are doing regarding caching of the ASP.NET pages), then you need to

    focus on
    > > the inputs. Make sure that plaintext converted to byte arrays, and key
    > > characteristics (key bytes, or password, IV, salt, password iterations,
    > > hashing algorithm) are the same.
    > >
    > > Alek
    > >

    >
    Alek Davis, Mar 21, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Acebravo

    About Encryption Question

    Acebravo, Mar 28, 2005, in forum: Perl
    Replies:
    1
    Views:
    2,682
    J├╝rgen Exner
    Mar 28, 2005
  2. =?Utf-8?B?Sg==?=

    Encryption Question

    =?Utf-8?B?Sg==?=, Nov 12, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    372
  3. Daniel

    encryption question

    Daniel, Mar 3, 2004, in forum: Java
    Replies:
    1
    Views:
    4,166
    John Davison
    Mar 3, 2004
  4. Replies:
    2
    Views:
    450
    Walter Roberson
    Jul 5, 2005
  5. Replies:
    2
    Views:
    328
    Walter Roberson
    Jul 5, 2005
Loading...

Share This Page