Re: DES Key & IV
From: Pieter Philippaerts (Pieter_at_nospam.mentalis.org)
Date: 08/06/03
- Next message: Pieter Philippaerts: "Re: DES Key & IV"
- Previous message: Keith Patrick: "Re: Code Security against DISSASSEMBLING! How to protect intelectual property."
- In reply to: Kun: "DES Key & IV"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 6 Aug 2003 08:18:51 +0200
"Kun" <sokun@seila.gov.kh> wrote in message
> I have code bellow:
> myKey = System.Text.Encoding.UTF8.GetBytes("Testing");
> myIV = System.Text.Encoding.UTF8.GetBytes("Something else");
> cs = new CryptoStream(ms, des.CreateEncryptor(myKey,myIV),
DES can only use 64 bit key and block sizes. The key and block size you're
passing to the CreateEncryptor method are 56 and 112 bits respectively and
this is what the DES instance is complaining about. Try using strings of 8
characters instead.
Also, DES is not exactly the algorithm you want to use in new applications.
The recommended algorithm to use is Rijndael [look at the RijndaelManaged
class]. Rijndael takes key and block sizes of 128, 192 and 256 bits.
Regards,
Pieter Philippaerts
Managed SSL/TLS: http://www.mentalis.org/go.php?sl
- Next message: Pieter Philippaerts: "Re: DES Key & IV"
- Previous message: Keith Patrick: "Re: Code Security against DISSASSEMBLING! How to protect intelectual property."
- In reply to: Kun: "DES Key & IV"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|