* Parity Error on keys used for DES crypto test
@ 2014-04-23 8:20 leroy christophe
2014-04-23 23:58 ` Kim Phillips
0 siblings, 1 reply; 3+ messages in thread
From: leroy christophe @ 2014-04-23 8:20 UTC (permalink / raw)
To: linux-crypto, Kim Phillips
Hi,
I'm altering the Freescale Talitos Driver in order to support the SEC1
security engine, and I have a big issue with the DES test vectors in
testmgr.h:
The Sec Engine reports key parity error.
Looking at the keys defined in testmgr.h for DES3, it looks like there
is a real parity issue with the test vectors. A DES key is supposed to
have all bytes with an odd number of ones. It is not the case in the key
below. At least the second byte 0xC0 has an even number of ones.
static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
{ /* Generated from openssl */
.key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
"\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
"\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
So, how can this test vector work ?
Christophe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Parity Error on keys used for DES crypto test
2014-04-23 8:20 Parity Error on keys used for DES crypto test leroy christophe
@ 2014-04-23 23:58 ` Kim Phillips
2014-04-24 13:08 ` leroy christophe
0 siblings, 1 reply; 3+ messages in thread
From: Kim Phillips @ 2014-04-23 23:58 UTC (permalink / raw)
To: leroy christophe; +Cc: linux-crypto
On Wed, 23 Apr 2014 10:20:16 +0200
leroy christophe <christophe.leroy@c-s.fr> wrote:
> I'm altering the Freescale Talitos Driver in order to support the SEC1
> security engine, and I have a big issue with the DES test vectors in
> testmgr.h:
>
> The Sec Engine reports key parity error.
>
> Looking at the keys defined in testmgr.h for DES3, it looks like there
> is a real parity issue with the test vectors. A DES key is supposed to
> have all bytes with an odd number of ones. It is not the case in the key
> below. At least the second byte 0xC0 has an even number of ones.
>
> static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
> { /* Generated from openssl */
> .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
> "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
> "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
>
> So, how can this test vector work ?
I'm not going to comment on the validity of the test key vector
other than to say that you can turn off key parity errors in the
SEC1 in the DEU Interrupt Control Register.
Kim
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Parity Error on keys used for DES crypto test
2014-04-23 23:58 ` Kim Phillips
@ 2014-04-24 13:08 ` leroy christophe
0 siblings, 0 replies; 3+ messages in thread
From: leroy christophe @ 2014-04-24 13:08 UTC (permalink / raw)
To: Kim Phillips; +Cc: linux-crypto
Le 24/04/2014 01:58, Kim Phillips a écrit :
> On Wed, 23 Apr 2014 10:20:16 +0200
> leroy christophe <christophe.leroy@c-s.fr> wrote:
>
>> I'm altering the Freescale Talitos Driver in order to support the SEC1
>> security engine, and I have a big issue with the DES test vectors in
>> testmgr.h:
>>
>> The Sec Engine reports key parity error.
>>
>> Looking at the keys defined in testmgr.h for DES3, it looks like there
>> is a real parity issue with the test vectors. A DES key is supposed to
>> have all bytes with an odd number of ones. It is not the case in the key
>> below. At least the second byte 0xC0 has an even number of ones.
>>
>> static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
>> { /* Generated from openssl */
>> .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
>> "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
>> "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
>>
>> So, how can this test vector work ?
> I'm not going to comment on the validity of the test key vector
> other than to say that you can turn off key parity errors in the
> SEC1 in the DEU Interrupt Control Register.
>
> Kim
>
Thanks, it works
Christophe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-24 13:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23 8:20 Parity Error on keys used for DES crypto test leroy christophe
2014-04-23 23:58 ` Kim Phillips
2014-04-24 13:08 ` leroy christophe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).