Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Maximum length of encoded 20-character string

Posted on 2008-06-15
1
Medium Priority
?
483 Views
Last Modified: 2008-06-26
I am using DESCryptoServiceProvider to encrypt strings of various length. The key I'm using is a byte[8] and the iv is a byte[8].
I am wondering what the maximum length of a 20-character string encrypted this way would be?
Or in other words, is there some function that would say what the maximum length of the encryptred string would be for a given string length?

Also, would it be the same if I used DESX instead?

Thanks!
0
Comment
Question by:PapaparaTudu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 33

Accepted Solution

by:
Dave Howe earned 2000 total points
ID: 21790289
ok. you need to include the iv (at one block, or eight bytes), and one eight byte data block per eight bytes of data. 20 is not a multiple of 8, so the next biggest multiple would be 24, giving you 24+8 or 32 bytes. overhead is the 8 byte iv, plus rounding your date up to the next multiple of 8. This will be binary data (regardless of how it started) so you may need to further expand that (using bin64 or similar) if you need it 7 bit clean for email purposes.

desx is xor (key1, des (key 2, xor (key 3, data ) ) )  and has the same block size as straight des - so no further data will be needed. the same is true of 3DES.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Ransomware is a growing menace to anyone using a computer or mobile device. Here are answers to some common questions about this vicious new form of malware.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question