From: Stephan Mueller <smueller@chronox.de>
To: Alex Cope <alexcope@google.com>
Cc: linux-crypto@vger.kernel.org,
Michael Halcrow <mhalcrow@google.com>,
Eric Biggers <ebiggers@google.com>
Subject: Re: Moving from blkcipher to skcipher
Date: Mon, 03 Oct 2016 19:36:20 +0200 [thread overview]
Message-ID: <3528786.X6pky90e93@tauon.atsec.com> (raw)
In-Reply-To: <CA+cSK1134BGVm7FprZcrDxVoU7P33GkJP17itLGvTpc8ECB9zw@mail.gmail.com>
Am Montag, 3. Oktober 2016, 10:06:23 CEST schrieb Alex Cope:
Hi Alex,
> I'm currently working on implementing HEH encryption, and am in the
> process of switching from the blkcipher interface to the skcipher
> interface. All the examples I have found that use skcipher are
> wrapping another mode of operation I.E. cts in cts(cbc(aes)) rather
> than being directly above the block cipher I.E. ctr in ctr(aes). Are
> there any existing examples of the latter type that I could use as a
> reference? If not, is there an estimate on when that work will be
> available?
The issue is that a blkcipher is a synchronous version of the skcipher. So,
you could easily move from blkcipher to skcipher and just rename the invoked
API, provided you change the initialization to the following which triggers a
synchronous operation:
tfm = crypto_alloc_skcipher(kccavs_test->name, 0, CRYPTO_ALG_ASYNC);
Note, you can only use ciphers marked as blkcipher or cipher in /proc/crypto
with that.
If you want to use all symmetric cipher implementation, you must use the async
skcipher operation which is identical to the previous ablkcipher API. An
example is given in the crypto API documentation, such as http://
www.chronox.de/crypto-API/Code.html#id-1.8.2
Ciao
Stephan
next prev parent reply other threads:[~2016-10-03 17:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 17:06 Moving from blkcipher to skcipher Alex Cope
2016-10-03 17:36 ` Stephan Mueller [this message]
2016-10-03 17:58 ` Alex Cope
2016-10-03 19:22 ` Stephan Mueller
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=3528786.X6pky90e93@tauon.atsec.com \
--to=smueller@chronox.de \
--cc=alexcope@google.com \
--cc=ebiggers@google.com \
--cc=linux-crypto@vger.kernel.org \
--cc=mhalcrow@google.com \
/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