2023-04-13 06:42:48

by Herbert Xu

[permalink] [raw]
Subject: Re: Did the in-kernel Camellia or CMAC crypto implementation break?

On Thu, Apr 13, 2023 at 07:36:25AM +0100, David Howells wrote:
.
> krb5: Running camellia128-cts-cmac key
> alg: No test for cmac(camellia) (cmac(camellia-asm))
> krb5: Running camellia128-cts-cmac enc no plain
> alg: No test for cts(cbc(camellia)) (cts(cbc-camellia-asm))
>
> I'm guessing not.

Oh OK.

So when did these last work for you?

Cheers,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


2023-04-13 09:07:28

by David Howells

[permalink] [raw]
Subject: Re: Did the in-kernel Camellia or CMAC crypto implementation break?

Herbert Xu <[email protected]> wrote:

> So when did these last work for you?

Okay, this branch works:

https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-rxgk

That's based on 5.10.0-rc4. dmesg excerpt attached below. This was before I
extracted the krb5 stuff out into its own lib.

On the other hand, I dug back through my crypto-krb5 branch to something based
on 5.16.0 and that doesn't work.

I can try forward porting my rxrpc-rxgk branch to try and find where it stops
working.

David
---
rxrpc: Running selftests
rxrpc: Running aes128-cts-hmac-sha256-128 prf
rxrpc: Running aes256-cts-hmac-sha384-192 prf
rxrpc: Running aes128-cts-hmac-sha256-128 key
rxrpc: Running aes256-cts-hmac-sha384-192 key
rxrpc: Running camellia128-cts-cmac key
alg: No test for cmac(camellia) (cmac(camellia-asm))
rxrpc: Running camellia256-cts-cmac key
rxrpc: Running aes128-cts-hmac-sha256-128 enc no plain
rxrpc: Running aes128-cts-hmac-sha256-128 enc plain<block
rxrpc: Running aes128-cts-hmac-sha256-128 enc plain==block
rxrpc: Running aes128-cts-hmac-sha256-128 enc plain>block
rxrpc: Running aes256-cts-hmac-sha384-192 enc no plain
rxrpc: Running aes256-cts-hmac-sha384-192 enc plain<block
rxrpc: Running aes256-cts-hmac-sha384-192 enc plain==block
rxrpc: Running aes256-cts-hmac-sha384-192 enc plain>block
rxrpc: Running camellia128-cts-cmac enc no plain
alg: No test for cts(cbc(camellia)) (cts(cbc-camellia-asm))
rxrpc: Running camellia128-cts-cmac enc 1 plain
rxrpc: Running camellia128-cts-cmac enc 1 plain
rxrpc: Running camellia128-cts-cmac enc 9 plain
rxrpc: Running camellia128-cts-cmac enc 13 plain
rxrpc: Running camellia128-cts-cmac enc 30 plain
rxrpc: Running camellia256-cts-cmac enc no plain
rxrpc: Running camellia256-cts-cmac enc 1 plain
rxrpc: Running camellia256-cts-cmac enc 9 plain
rxrpc: Running camellia256-cts-cmac enc 13 plain
rxrpc: Running camellia256-cts-cmac enc 30 plain
rxrpc: Running aes128-cts-hmac-sha256-128 mic
rxrpc: Running aes256-cts-hmac-sha384-192 mic
rxrpc: Running camellia128-cts-cmac mic abc
rxrpc: Running camellia128-cts-cmac mic ABC
rxrpc: Running camellia256-cts-cmac mic 123
rxrpc: Running camellia256-cts-cmac mic !@#
rxrpc: Selftests succeeded