Re: Moving from blkcipher to skcipher

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was unclear in my initial message. I'm implementing a block cipher
mode of operation. I'm hoping there is a another block cipher mode of
operation that already uses skcipher, so I can use it as a reference
and avoid re-inventing the wheel. In particular, it would be helpful
if there is some implementation of a block cipher mode of operation
that is directly above the underlying block cipher, like CTR or CBC,
rather than something like CTS or rfc3686 which wrap around another
block cipher mode of operation.

On Mon, Oct 3, 2016 at 10:36 AM, Stephan Mueller <smueller@xxxxxxxxxx> wrote:
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux