Hi,
I am developing a minifilter for encryption/decryption.
I wrote a function which encrypts data. But its encrypting data which is
multiple of block size.
When the input data is not in multiple of block size it gives error
(0xc0000023) STATUS_BUFFER_TOO_SMALL.
Though I am allocating the size in multiple of block size only.
What could be the problem?
and also tell me how to give padding info for symmetric block encryption
algorithms?
thanks in advance.
–
Kapil Bhadke
Post Graduate student
IIT Kanpur
You cannot pad the blocks which are not a multiple of cipherblock
size. You would need to add some data to the file in a form of a header
or footer, which would be invisible to the applications - and that task
will take a lot of time (not to mention it is extremely easy to screw
up).
Your choice is to leave the last few bytes unencrypted (align
encrypted area to cipherblock size) or use a non-block cipher mode, such
as Counter Mode (CTR).
Dejan.
kapil bhadke wrote:
Hi,
I am developing a minifilter for encryption/decryption.
I wrote a function which encrypts data. But its encrypting data which
is
multiple of block size.
When the input data is not in multiple of block size it gives error
(0xc0000023) STATUS_BUFFER_TOO_SMALL.
Though I am allocating the size in multiple of block size only.
What could be the problem?
and also tell me how to give padding info for symmetric block
encryption
algorithms?
thanks in advance.
–
Kapil Bhadke
Post Graduate student
IIT Kanpur
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
–
Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.