All of lore.kernel.org
 help / color / mirror / Atom feed
* AF_ALG data chunk size
@ 2014-06-11 16:02 Yury Stankevich
  0 siblings, 0 replies; only message in thread
From: Yury Stankevich @ 2014-06-11 16:02 UTC (permalink / raw)
  To: linux-crypto

Hello,

i'm playing a bit with AF_ALG and found a strange problem: it looks like
big data chunks (64K) can lead to error.


what i do:
1. take a file, read some data (8 or 64K), encrypt, write to
crypted-file, repeat until EOF.
2. read crypted-file, with the same chunk size, decrypt, write to
result-file, repeat until EOF.
3. compare results, and they equal for 8K block size, but differ for 64K
block size. to feed data - i use sendmsg/read calls.


steps to reproduce:
1. clone code from [1]
2. vim crypto.cpp
3. edit read_size to `64 * 1024`
4. make
5. ./test.sh
6. show bug place: xxd crypto X-1; xxd L-decrypt X-2; vimdiff X-1 X-2


system information:
kernel 3.15/x86_64
gcc 4.8.2

[1] - https://github.com/urykhy/avoidSSL

ps: please, CC'me on reply

-- 
Linux registered user #402966 // pub 1024D/E99AF373 <pgp.mit.edu>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-11 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 16:02 AF_ALG data chunk size Yury Stankevich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.