Re: Newbie question about AES encryption



On 30 Oct 2006 16:47:39 -0800, Mark <mminnie@xxxxxxxxxxxxxx> wrote:
I download some free code to create SHA1 hashes and AES encryption.
Using this code I created a program to encrypt strings by first
initializing the cipher with a SHA1 hash of the password, and then
encrypting the data with the password. It seems to work great by
encrypting a string such as "Encrypted String" and a password of
"password" to a resulting string of "J4lgK+NgpWWtXTyWmeNgow==". Now if
I try and decrypt ONLY PART of the encrypted string, say
"J4lgK+NgpWWtXT" with the password "password", part of the string is
decrypted successfully. I get a decrypted result of "Encrypted". This
seems odd. I would think by truncating part of the decrypted string, I
would get a bunch of garbage in the decrypted string.

Is this a cause for concern?

1. Remember that secrecy and authentication are independent
aspects of cryptography. Were you hoping for authentication?

2. You'd probably profit from a look at Wikipedia's article
on block cipher modes of operation:
http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation

--
To email me, substitute nowhere->spamcop, invalid->net.
.



Relevant Pages

  • Re: Trial period for app
    ... or in a field in a Table and compare it with Nowin startup code, ... encrypted string in the Registry and the other in a Table field. ... decrypt identically, do the time check as before. ...
    (microsoft.public.access.modulesdaovba)
  • Re: How can I encrypt the password stored in a database table ?
    ... "Alex Nitulescu" wrote in message ... > produces an encrypted string for use in a config.xml file. ... > Anyway, even if I wanted to use this one, how do I reverse it (decrypt it) ... > The second question would be how do I get my application's name? ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Decryption using private key from cert store failing with err
    ... >also do not know why you recommended adding the cryptencrypt call. ... And if you have encrypted string as the input for your code, ... CryptDecrypt with proper key or hash value should work as expected. ... decrypt a plain string which has 128 'A's. ...
    (microsoft.public.platformsdk.security)
  • Re: Newbie question about AES encryption
    ... initializing the cipher with a SHA1 hash of the password, ... I try and decrypt ONLY PART of the encrypted string, ... If you encrypt in ECB mode, you can decrypt each block seperately ...
    (sci.crypt)
  • Rijndael decryption with wrong key fails
    ... when I try to decrypt an encrypted string using a wrong ... key and the Rijndael algoritm I get a strange error. ...
    (microsoft.public.dotnet.framework.aspnet.security)