Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Help with Encryption Library

Reply
Thread Tools

Help with Encryption Library

 
 
Mike Carr
Guest
Posts: n/a
 
      04-06-2004
I followed the Guide "How To: Create an Encryption Library" of Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication. I kept getting an error here:

decStream.FlushFinalBlock() whenever the text to Decrypt was under 7 characters. Is there a minimum text length that TripleDes can Encrypt/Decrypt?
public byte[] Decrypt(byte[] bytesData, byte[] bytesKey)
{
.... decStream.FlushFinalBlock(); <=== HERE...
} //end Decrypt

--
MICHAEL CARR
 
Reply With Quote
 
 
 
 
Hernan de Lahitte
Guest
Posts: n/a
 
      04-07-2004
Michael,

The minimum text lengh for decryption depends on the algorithm block size
expressed in bytes in case you where using a block cipher algorithm like
DES, 3DES, RC2 or Rijndael. If you take for example 3DES with a defualt
blocksize of 64 bits (8 bytes), the minimum length will be 8 bytes. If your
encrypted data size is less then 8 bytes, the encription process will apply
padding to complete the 8 bytes (or a multiple of size. So on every block
ci[her your encrypted data size will always be a multiple of the blocksize
algorithm.

Cheers,
Hernan
--
Hernan de Lahitte
Lagash Systems S.A.
http://weblogs.asp.net/hernandl
Shadowfax Dev Team

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

"Mike Carr" <> wrote in message
news:...
I followed the Guide "How To: Create an Encryption Library" of Building
Secure ASP.NET Applications: Authentication, Authorization, and Secure
Communication. I kept getting an error here:

decStream.FlushFinalBlock() whenever the text to Decrypt was under 7
characters. Is there a minimum text length that TripleDes can
Encrypt/Decrypt?
public byte[] Decrypt(byte[] bytesData, byte[] bytesKey)
{
....
decStream.FlushFinalBlock(); <=== HERE
....
} //end Decrypt


--
MICHAEL CARR


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which hard drive encryption program has the strongest tested encryption & security? =?iso-8859-1?Q?-=3D|__=28=BAL=BA=29__|=3D-____o=3D=5B:::::::::::::::=BB?= Computer Security 6 02-20-2008 01:35 PM
Encryption library recommendation request Sudo Nim Javascript 1 02-19-2008 08:53 AM
Enterprise Library June 2005 - DAAB Encryption Problem Jules ASP .Net 0 07-18-2007 09:56 AM
encryption library Joe Van Dyk Ruby 12 08-31-2006 01:52 AM
help with encryption =?Utf-8?B?ZG90bmV0dGVzdGVy?= ASP .Net 4 08-12-2005 05:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57