Re: C# Rijndael encryption. When decrypting I get junk data in the first block



Marc and Rossum, thank you!

Now it all works like a charm. IV is configured and used - the IV is
made public in a bin file.
And I also tried with another Mode. It then worked without IV.
Also thanx for the explanation about the first corrupted block.

Thanx,
Fritjolf.




On Dec 11, 11:22 am, Fritjolf <Morten.Jacob...@xxxxxxx> wrote:
Hi and thank you very much for your quick response.

No, I didn't set the IV.
Why? I see that the IC must (can) be generated in the encryption
procedure and then that IV must be passed to the decryption procedure.
Then another problem is raised. In addition to sending the encryption
key to a customer, must I also send the IV ???

Another input is that if I have a file smaller than the blocksize
(lets say the file is 6 bytes), I get an error message trying to
decrypt the message telling me that "Padding is invalid and cannot be
removed". I can't understand why...

I will try and set the IV and see what happens...

Thanx,
Fritjolf

On Dec 11, 10:54 am, Marc Gravell <marc.grav...@xxxxxxxxx> wrote:



Are you setting the IV?

Perhaps look at the MSDN example:http://msdn2.microsoft.com/en-us/library/system.security.cryptography...

Marc- Hide quoted text -

- Show quoted text -

.



Relevant Pages

  • Re: C# Rijndael encryption. When decrypting I get junk data in the first block
    ... Hi and thank you very much for your quick response. ... I see that the IC must be generated in the encryption ... procedure and then that IV must be passed to the decryption procedure. ... , I get an error message trying to ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Resetting secrets
    ... Error Message: ... The maximum number of secrets that may be stored in a single system ... Although YOU may not have installed encryption or encrypted software on your ... they have an explanation. ...
    (microsoft.public.windows.vista.general)
  • Re: Error in data cyphering
    ... 323497 - Error Message: ... ENCRYPTION" Detected an Error... ... MCSE,CCEA, Microsoft MVP - Terminal Server ... >> Vera Noest ...
    (microsoft.public.win2000.termserv.clients)
  • Re: Error encrypting identity element in web.config
    ... I got this to work by using DPAPI encryption instead of RSA. ... The command for that should be something like this (although ... Error message from the provider: The RSA key container could not be ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Permissions for Decrypting files
    ... How To Remove File Encryption in Windows XP ... "Access is Denied" Error Message When Encrypting or Decrypting Files or ... MS-MVP Windows Shell/User ...
    (microsoft.public.windowsxp.security_admin)