Re: [PATCH 6/8] crypto: caam - Convert GCM to new AEAD interface

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

 



On 6/15/2015 11:09 AM, Herbert Xu wrote:
> This patch converts the caam GCM implementations to the new AEAD
> interface.  This is compile-tested only.
> 
> Note that all IV generation for GCM algorithms have been removed.
> The reason is that the current generation uses purely random IVs
> which is not appropriate for counter-based algorithms where we
> first and foremost require uniqueness.
> 
> Of course there is no reason why you couldn't implement seqiv or
> seqniv within caam since all they do is xor the sequence number
> with a salt, but since I can't test this on actual hardware I'll
> leave it alone for now.
> 
> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> ---

Testing on P2041RDB I see the following failures:

caam_jr ffe301000.jr: 40000f10: DECO: desc idx 15: Invalid Sequence
Command. A SEQ IN PTR OR SEQ OUT PTR Command is invalid or a SEQ KEY,
SEQ LOAD, SEQ FIFO LOAD, or SEQ FIFO STORE decremented the input or
output sequence length below 0. This error may result if a built-in
PROTOCOL Command has encountered a malformed PDU.
alg: aead: encryption failed on test 1 for rfc4106-gcm-aes-caam:
ret=-1073745680

caam_jr ffe301000.jr: 40000e10: DECO: desc idx 14: Invalid Sequence
Command. A SEQ IN PTR OR SEQ OUT PTR Command is invalid or a SEQ KEY,
SEQ LOAD, SEQ FIFO LOAD, or SEQ FIFO STORE decremented the input or
output sequence length below 0. This error may result if a built-in
PROTOCOL Command has encountered a malformed PDU.
alg: aead: encryption failed on test 1 for rfc4543-gcm-aes-caam:
ret=-1073745424

alg: aead: Test 2 failed on encryption for gcm-aes-caam
00000000: ab 6e 47 d4 2c ec 13 bd f5 3a 67 b2 12 57 bd df
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I'll check why this is happening.

Regards,
Horia


--
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