Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2007

Tip: Looking for answers? Try searching our database.

Question regarding ICryptoTransform resuability

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fredo - 30 Dec 2007 21:24 GMT
Can someone explain the CanResuseTransform property of this interface to me?

I have an app that communicates over the network and I encrypt the
individual UDP packets which are sent and received from multiple clients.
Each has the same key and IV.

I guess my question is, do I need to create new encryptors and decryptors
for every packet?

Part of my concern is that the state of the encryptor/decryptor might change
as packets are encrypted. If that's the case, then if I encrypt a packet and
send it to client A and then encrypt an identical packet for client B, the
two packets will be different and only the first recipient will be able to
decrypt it.

I use the CryptoStream.FlushFinalBlock, so I'm assuming this resets the
states and will allow me to do what I want. I'd like to avoid the cost of
recreating the encryptor and decryptor for every packet.

Thanks.
Göran Andersson - 30 Dec 2007 22:40 GMT
> Can someone explain the CanResuseTransform property of this interface to me?
>
[quoted text clipped - 16 lines]
>
> Thanks.

The CanReuseTransform property tells you exactly that. If it returns
true, you can reuse the transform.

Signature

Göran Andersson
_____
http://www.guffa.com

Fredo - 30 Dec 2007 22:56 GMT
>> Can someone explain the CanResuseTransform property of this interface to
>> me?
[quoted text clipped - 20 lines]
> The CanReuseTransform property tells you exactly that. If it returns true,
> you can reuse the transform.

Okay, that's what I suspected. Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.