From: Yury Stankevich <urykhy@gmail.com>
To: linux-crypto@vger.kernel.org
Subject: AF_ALG data chunk size
Date: Wed, 11 Jun 2014 20:02:41 +0400 [thread overview]
Message-ID: <53987DA1.5020407@gmail.com> (raw)
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>
reply other threads:[~2014-06-11 16:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53987DA1.5020407@gmail.com \
--to=urykhy@gmail.com \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).