mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
g10: Fix symmetric cipher algo constant for ECDH.
* g10/ecdh.c (kek_params_table): Use CIPHER_ALGO_AES192 for ECC strength 384, according to RFC-6637. -- Reported-by: Trevor Bentley Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
9f37e93dd7
commit
af3efd149f
@ -39,7 +39,7 @@ static const struct
|
|||||||
/* Note: Must be sorted by ascending values for QBITS. */
|
/* Note: Must be sorted by ascending values for QBITS. */
|
||||||
{
|
{
|
||||||
{ 256, DIGEST_ALGO_SHA256, CIPHER_ALGO_AES },
|
{ 256, DIGEST_ALGO_SHA256, CIPHER_ALGO_AES },
|
||||||
{ 384, DIGEST_ALGO_SHA384, CIPHER_ALGO_AES256 },
|
{ 384, DIGEST_ALGO_SHA384, CIPHER_ALGO_AES192 },
|
||||||
|
|
||||||
/* Note: 528 is 521 rounded to the 8 bit boundary */
|
/* Note: 528 is 521 rounded to the 8 bit boundary */
|
||||||
{ 528, DIGEST_ALGO_SHA512, CIPHER_ALGO_AES256 }
|
{ 528, DIGEST_ALGO_SHA512, CIPHER_ALGO_AES256 }
|
||||||
|
@ -1448,8 +1448,8 @@ ecdh_params (const char *curve)
|
|||||||
/* See RFC-6637 for those constants.
|
/* See RFC-6637 for those constants.
|
||||||
0x03: Number of bytes
|
0x03: Number of bytes
|
||||||
0x01: Version for this parameter format
|
0x01: Version for this parameter format
|
||||||
KDF algo
|
KDF hash algo
|
||||||
KEK algo
|
KEK symmetric cipher algo
|
||||||
*/
|
*/
|
||||||
if (nbits <= 256)
|
if (nbits <= 256)
|
||||||
return (const unsigned char*)"\x03\x01\x08\x07";
|
return (const unsigned char*)"\x03\x01\x08\x07";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user