Multimobile Development: Building Applications for any Smartphone
Weak Key...
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.


Ciro Fonseca
GOOD ANSWER
Hi guys...

I'm having some problems to use the DES class to
encrypt things...

When i pass a Key to the CreateEncryptor method of the
DES class, i get
a "System.Security.Cryptography.CryptographicException:
Specified key is not a valid size for this algorithm."

Well this is the Key that i'm using to Criptography the
text: "s2@$vKT,-_0~`L+lo*&^(lo)[*k]<0xb q]>|!^<kjf ]>[<?/1"

is this a weak key..? if it is... what is the rules to
make a "strong" key..?

Thanks in advance...

[]'s
Ciro Fonseca
Reply to this message...
Vote that this is a GOOD answer... (5 votes from other users already)
 
 
    
Jun Su [MS]
GOOD ANSWER
Hi,

The key of the DESCryptoServiceProvider must be 64 bytes. You can get the
valid key size from the property LegalKeySizes.

I hope this helps. If you have any questions, please reply to this post.

Best Regards,

Jun Su
Microsoft Support

---
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Content-Class: urn:content-classes:message
From: "Ciro Fonseca" <Click here to reveal e-mail address>
Sender: "Ciro Fonseca" <Click here to reveal e-mail address>
Subject: Weak Key...
Date: Tue, 1 Jan 2002 19:45:32 -0800

Hi guys...

I'm having some problems to use the DES class to
encrypt things...

When i pass a Key to the CreateEncryptor method of the
DES class, i get
a "System.Security.Cryptography.CryptographicException:
Specified key is not a valid size for this algorithm."

Well this is the Key that i'm using to Criptography the
text: "s2@$vKT,-_0~`L+lo*&^(lo)[*k]<0xb q]>|!^<kjf ]>[<?/1"

is this a weak key..? if it is... what is the rules to
make a "strong" key..?

Thanks in advance...

[]'s
Ciro Fonseca

Reply to this message...
Vote that this is a GOOD answer... (4 votes from other users already)
 
 
 
System.Security.Cryptography.CryptographicException
System.Security.Cryptography.DESCryptoServiceProvider




Multimobile Development: Building Applications for any Smartphone
Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734