[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR20MB297372F8FB158C59BF4F6F2FCAD90@MN2PR20MB2973.namprd20.prod.outlook.com>
Date: Fri, 2 Aug 2019 00:24:04 +0000
From: Pascal Van Leeuwen <pvanleeuwen@...imatrix.com>
To: Corentin Labbe <clabbe.montjoie@...il.com>,
"herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: Need help with failling gcm_base(ctr,ghash-generic) selftest
> -----Original Message-----
> From: linux-crypto-owner@...r.kernel.org <linux-crypto-owner@...r.kernel.org> On Behalf Of
> Corentin Labbe
> Sent: Thursday, August 1, 2019 9:43 PM
> To: herbert@...dor.apana.org.au; linux-crypto@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Subject: Need help with failling gcm_base(ctr,ghash-generic) selftest
>
> Hello
>
> I am writing the Allwinner sun8i-ce driver and when running tcrypt I got
> [ 30.201739] alg: aead: gcm_base(ctr-aes-sun8i-ce,ghash-generic) decryption failed on test
> vector 3; expected_error=0, actual_error=-74, cfg=\"random: may_sleep use_digest
> src_divs=[100.0%@...14] dst_divs=[5.90%@...gnmask+3015, 60.56%@...96, 17.92%@...5,
> 15.62%@+10]\"
> or
>
The decryption reports only an -EBADMSG here, which means the decryption itself went
fine, but the authentication tag mismatched.
> [ 148.613537] alg: aead: gcm_base(ctr-aes-sun8i-ce,ghash-generic) encryption test failed
> (wrong result) on test vector 2, cfg=\"random: may_sleep use_final src_divs=[100.0%@+0]
> iv_offset=20\"
>
Can't say for sure, but considering the decrypt error, this is most likely just a
mismatch on the appended authentication tag.
> Since ctr-aes-sun8i-ce is passing the ctr(aes) selftest, I dont understand what could be
> wrong.
>
That is possible, as this appears to be a problem with the authentication part,
not the encryption part. So possibly a problem with the way you setup the
authentication key (which is actually derived from the encryption key, but I don't
know if your hardware does this autonomously, mine doesn't) and/or operation?
> Thanks
> Regards
Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com
Powered by blists - more mailing lists