• Subject: Re: cipher length
  • From: "Phil Hall" <hallp@xxxxxxxx>
  • Date: Mon, 17 Jan 2000 22:39:42 -0600

Gene,

----- Original Message -----
From: <Gene_Gaunt/ReviewWorks@reviewworks.com>

> What is the rationale for limiting CIPHER source length to only 64
bytes?

I actually missed this the first time around, I just spotted it while
archiving my mail folders, so I apologise for the delay !

DES is a  classic block cipher. The block size for DES is 64, i.e it
encrypts blocks of data in 64 block chunks and thus this is why CIPHER
'limits' the source data to 64. This can however cause encryption
problems if your data doesn't pad to fit exactly within a multiple of
the block size. If this is the case, and you're real paranoid about the
data, you should set the chaining flag in the CIPHER template (to add
feedback from the last encrypted block) and set padding to be on, too.

Also by using chaining, you will not see the performance issues you
suggested.

Cryptographic Support/400 (if it uses DES, and my guess is it does) will
still limit you to 64 blocks, but there probably be a wrapper for the
encryption API that will do the chaining of plaintext larger than 64, to
save you having to do it yourself programmatically.

Not setting the options (or just selecting padding, or even padding the
data yourself) can reveal some information about the encryption - and
given today's CPU power it *might* be enough information to discover the
plaintext.

Hope this helps,

--phil

+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.