Re: Two questions about DES
Date: 01/18/05

Date: 18 Jan 2005 10:52:04 -0800

Hello Valery,

Thanks for the reply.

>1). use PaddingMode.None; Standard PKCS7 padding mode adds extra 8
bytes to
> your cipher text.

Looks like you are talking about .NET implementation. I'm not sure how
managed implementation works and whether it uses CryptXXXX unmanaged
calls, but there is not such padding as NONE for CryptSetKeyParam.
WinCrypt.h has three padding constants: PKCS5_PADDING, RANDOM_PADDING
and ZERO_PADDING. An attempt to use ZERO_PADDING leads to NTE_BAD_DATA

> So, any reason for implementing crypt?

It has to be done for backward compatibility.
Sincerely yours,

Kirill Kovalenko
Softerra LLC