Skip to contentSkip to conversation

Question about ctr mode 3des-ede IV len

DISCUSSION Longpeng (Mike) 3 participants 5 messages Dec 7, 2016 – Dec 8, 2016

lore
Share & tools
lore
#0 lore raw

Hi Jussi and Herbert,

I saw serveral des3-ede testcases(in crypto/testmgr.h) has 16-bytes IV, and the libgcrypt/nettle/RFC1851 said the IV-len is 8-bytes.

Would you please tell me why these testcases has 16-bytes IV ?

Thank you. :)

Signature · 2 lines
Regards,
Longpeng(Mike)
#1 lore raw
Quoted 6 lines · Longpeng (Mike)

Hi Jussi and Herbert,

I saw serveral des3-ede testcases(in crypto/testmgr.h) has 16-bytes IV, and the libgcrypt/nettle/RFC1851 said the IV-len is 8-bytes.

Would you please tell me why these testcases has 16-bytes IV ?

I think they were automatically generated. Only the first eight bytes are actually used so the IV size is still 8.

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
Quoted 6 lines · Herbert Xu
Quoted 5 lines · Longpeng (Mike)

Hi Jussi and Herbert,

I saw serveral des3-ede testcases(in crypto/testmgr.h) has 16-bytes IV, and the libgcrypt/nettle/RFC1851 said the IV-len is 8-bytes.

Quoted 6 lines
Quoted 1 line

Would you please tell me why these testcases has 16-bytes IV ?

I think they were automatically generated. Only the first eight bytes are actually used so the IV size is still 8.

Cheers,

Cool, thank you very much! :)

Signature · 2 lines
Regards,
Longpeng(Mike)
#3 lore raw
In reply to Longpeng (Mike)

Hello,

07.12.2016, 14:43, Longpeng (Mike) kirjoitti:

Quoted 6 lines

Hi Jussi and Herbert,

I saw serveral des3-ede testcases(in crypto/testmgr.h) has 16-bytes IV, and the libgcrypt/nettle/RFC1851 said the IV-len is 8-bytes.

Would you please tell me why these testcases has 16-bytes IV ?

Because I used same tool to create test-vectors which I had previously used to create AES/Camellia/Serpent/Twofish test-vectors. So, I must have forgotten to change 16-byte IV generation to 8 bytes and thus those testcases in crypto/testmgr.h have wrong length. The extra trailing 8 bytes are not used and can be removed.

-Jussi

Quoted 3 lines

Thank you. :)

#4 lore raw

Hi Jussi,

Quoted 12 lines · Jussi Kivilinna

Hello,

07.12.2016, 14:43, Longpeng (Mike) kirjoitti:

Quoted 6 lines

Hi Jussi and Herbert,

I saw serveral des3-ede testcases(in crypto/testmgr.h) has 16-bytes IV, and the libgcrypt/nettle/RFC1851 said the IV-len is 8-bytes.

Would you please tell me why these testcases has 16-bytes IV ?

Because I used same tool to create test-vectors which I had previously used to create AES/Camellia/Serpent/Twofish test-vectors. So, I must have forgotten to change 16-byte IV generation to 8 bytes and thus those testcases in crypto/testmgr.h have wrong length. The extra trailing 8 bytes are not used and can be removed.

Thank you very much. :)

Quoted 8 lines

-Jussi

Quoted 3 lines

Thank you. :)

.

Signature · 2 lines
Regards,
Longpeng(Mike)