DPP: Update PKEX role-specific points

The y coordinates for some of these PKEX role-specific points were
changed in the PKEX specification, so update the implementation to
match.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2018-01-26 17:54:49 +02:00 committed by Jouni Malinen
parent b4cd8b7e1a
commit fe3f81e6a8

View file

@ -101,10 +101,10 @@ static const u8 pkex_resp_x_p256[32] = {
0x59, 0x91, 0x52, 0x33, 0xac, 0x19, 0x9d, 0x76 0x59, 0x91, 0x52, 0x33, 0xac, 0x19, 0x9d, 0x76
}; };
static const u8 pkex_resp_y_p256[32] = { static const u8 pkex_resp_y_p256[32] = {
0x26, 0x04, 0x09, 0x45, 0x0a, 0x05, 0x20, 0xe7, 0xd9, 0xfb, 0xf6, 0xb9, 0xf5, 0xfa, 0xdf, 0x19,
0xa7, 0x27, 0xc1, 0x36, 0x76, 0x85, 0xca, 0x3e, 0x58, 0xd8, 0x3e, 0xc9, 0x89, 0x7a, 0x35, 0xc1,
0x42, 0x16, 0xf4, 0x89, 0x85, 0x34, 0x6e, 0xd5, 0xbd, 0xe9, 0x0b, 0x77, 0x7a, 0xcb, 0x91, 0x2a,
0x17, 0xde, 0xc0, 0xb8, 0xad, 0xfd, 0xb2, 0x98 0xe8, 0x21, 0x3f, 0x47, 0x52, 0x02, 0x4d, 0x67
}; };
/* NIST P-384 */ /* NIST P-384 */
@ -117,12 +117,12 @@ static const u8 pkex_init_x_p384[48] = {
0x81, 0xac, 0x38, 0x5d, 0x41, 0xe6, 0xb9, 0xa3 0x81, 0xac, 0x38, 0x5d, 0x41, 0xe6, 0xb9, 0xa3
}; };
static const u8 pkex_init_y_p384[48] = { static const u8 pkex_init_y_p384[48] = {
0x89, 0xd0, 0x97, 0x7b, 0x59, 0x4f, 0xa6, 0xd6, 0x76, 0x2f, 0x68, 0x84, 0xa6, 0xb0, 0x59, 0x29,
0x7c, 0x5d, 0x93, 0x5b, 0x93, 0xc4, 0x07, 0xa9, 0x83, 0xa2, 0x6c, 0xa4, 0x6c, 0x3b, 0xf8, 0x56,
0x89, 0xee, 0xd5, 0xcd, 0x6f, 0x42, 0xf8, 0x38, 0x76, 0x11, 0x2a, 0x32, 0x90, 0xbd, 0x07, 0xc7,
0xc8, 0xc6, 0x62, 0x24, 0x69, 0x0c, 0xd4, 0x48, 0x37, 0x39, 0x9d, 0xdb, 0x96, 0xf3, 0x2b, 0xb6,
0xd8, 0x44, 0xd6, 0xc2, 0xe8, 0xcc, 0x62, 0x6b, 0x27, 0xbb, 0x29, 0x3c, 0x17, 0x33, 0x9d, 0x94,
0x3c, 0x25, 0x53, 0xba, 0x4f, 0x71, 0xf8, 0xe7 0xc3, 0xda, 0xac, 0x46, 0xb0, 0x8e, 0x07, 0x18
}; };
static const u8 pkex_resp_x_p384[48] = { static const u8 pkex_resp_x_p384[48] = {
0xad, 0xbe, 0xd7, 0x1d, 0x3a, 0x71, 0x64, 0x98, 0xad, 0xbe, 0xd7, 0x1d, 0x3a, 0x71, 0x64, 0x98,
@ -133,12 +133,12 @@ static const u8 pkex_resp_x_p384[48] = {
0xe0, 0xbb, 0xd7, 0xb1, 0x29, 0x20, 0x72, 0xdf 0xe0, 0xbb, 0xd7, 0xb1, 0x29, 0x20, 0x72, 0xdf
}; };
static const u8 pkex_resp_y_p384[48] = { static const u8 pkex_resp_y_p384[48] = {
0x54, 0x58, 0x20, 0xad, 0x55, 0x1d, 0xca, 0xf3, 0xab, 0xa7, 0xdf, 0x52, 0xaa, 0xe2, 0x35, 0x0c,
0x1c, 0x8a, 0xcd, 0x19, 0x40, 0xf9, 0x37, 0x83, 0xe3, 0x75, 0x32, 0xe6, 0xbf, 0x06, 0xc8, 0x7c,
0xc7, 0xd6, 0xb3, 0x13, 0x7d, 0x53, 0x28, 0x5c, 0x38, 0x29, 0x4c, 0xec, 0x82, 0xac, 0xd7, 0xa3,
0xf6, 0x2d, 0xf1, 0xdd, 0xa5, 0x8b, 0xad, 0x5d, 0x09, 0xd2, 0x0e, 0x22, 0x5a, 0x74, 0x52, 0xa1,
0x81, 0xab, 0xb1, 0x00, 0x39, 0xd6, 0xcc, 0x9c, 0x7e, 0x54, 0x4e, 0xfe, 0xc6, 0x29, 0x33, 0x63,
0xea, 0x1e, 0x84, 0x1d, 0xbf, 0xe3, 0x35, 0xf9 0x15, 0xe1, 0x7b, 0xe3, 0x40, 0x1c, 0xca, 0x06
}; };
/* NIST P-521 */ /* NIST P-521 */
@ -154,15 +154,15 @@ static const u8 pkex_init_x_p521[66] = {
0x97, 0x76 0x97, 0x76
}; };
static const u8 pkex_init_y_p521[66] = { static const u8 pkex_init_y_p521[66] = {
0x01, 0x4c, 0x71, 0xfd, 0x1b, 0xd5, 0x9c, 0xa6, 0x00, 0xb3, 0x8e, 0x02, 0xe4, 0x2a, 0x63, 0x59,
0xed, 0x39, 0xef, 0x45, 0xc5, 0x06, 0xfd, 0x66, 0x12, 0xc6, 0x10, 0xba, 0x3a, 0xf9, 0x02, 0x99,
0xc0, 0xeb, 0x0f, 0xbf, 0x21, 0xa3, 0x36, 0x74, 0x3f, 0x14, 0xf0, 0x40, 0xde, 0x5c, 0xc9, 0x8b,
0xfd, 0xaa, 0x05, 0x6e, 0x4e, 0x33, 0x95, 0x42, 0x02, 0x55, 0xfa, 0x91, 0xb1, 0xcc, 0x6a, 0xbd,
0x1a, 0x9d, 0x3f, 0x3a, 0x1c, 0x5e, 0xa8, 0x60, 0xe5, 0x62, 0xc0, 0xc5, 0xe3, 0xa1, 0x57, 0x9f,
0xf7, 0xe5, 0x59, 0x1d, 0x07, 0xaa, 0x6f, 0x40, 0x08, 0x1a, 0xa6, 0xe2, 0xf8, 0x55, 0x90, 0xbf,
0x0a, 0x59, 0x3c, 0x27, 0xad, 0xe0, 0x48, 0xfd, 0xf5, 0xa6, 0xc3, 0xd8, 0x52, 0x1f, 0xb7, 0x02,
0xd1, 0x83, 0x37, 0x4c, 0xdf, 0xe1, 0x86, 0x72, 0x2e, 0x7c, 0xc8, 0xb3, 0x20, 0x1e, 0x79, 0x8d,
0xfc, 0x57 0x03, 0xa8
}; };
static const u8 pkex_resp_x_p521[66] = { static const u8 pkex_resp_x_p521[66] = {
0x00, 0x79, 0xe4, 0x4d, 0x6b, 0x5e, 0x12, 0x0a, 0x00, 0x79, 0xe4, 0x4d, 0x6b, 0x5e, 0x12, 0x0a,
@ -176,15 +176,15 @@ static const u8 pkex_resp_x_p521[66] = {
0x84, 0xb4 0x84, 0xb4
}; };
static const u8 pkex_resp_y_p521[66] = { static const u8 pkex_resp_y_p521[66] = {
0x01, 0xb9, 0x9c, 0xc6, 0x41, 0x32, 0x5b, 0xd2, 0x00, 0x46, 0x63, 0x39, 0xbe, 0xcd, 0xa4, 0x2d,
0x35, 0xd8, 0x8b, 0x2b, 0xe4, 0x6e, 0xcc, 0xdf, 0xca, 0x27, 0x74, 0xd4, 0x1b, 0x91, 0x33, 0x20,
0x7c, 0x38, 0xc4, 0x5b, 0xf6, 0x74, 0x71, 0x5c, 0x83, 0xc7, 0x3b, 0xa4, 0x09, 0x8b, 0x8e, 0xa3,
0x77, 0x16, 0x8a, 0x80, 0xa9, 0x84, 0xc7, 0x7b, 0x88, 0xe9, 0x75, 0x7f, 0x56, 0x7b, 0x38, 0x84,
0x9d, 0xfd, 0x83, 0x6f, 0xae, 0xf8, 0x24, 0x16, 0x62, 0x02, 0x7c, 0x90, 0x51, 0x07, 0xdb, 0xe9,
0x2f, 0x21, 0x25, 0x65, 0xa2, 0x1a, 0x6b, 0x2d, 0xd0, 0xde, 0xda, 0x9a, 0x5d, 0xe5, 0x94, 0xd2,
0x30, 0x62, 0xb3, 0xcc, 0x6e, 0x59, 0x3c, 0x7f, 0xcf, 0x9d, 0x4c, 0x33, 0x91, 0xa6, 0xc3, 0x80,
0x58, 0x91, 0x81, 0x72, 0x07, 0x8c, 0x91, 0xac, 0xa7, 0x6e, 0x7e, 0x8d, 0xf8, 0x73, 0x6e, 0x53,
0x31, 0x1e 0xce, 0xe1
}; };
/* Brainpool P-256r1 */ /* Brainpool P-256r1 */
@ -195,10 +195,10 @@ static const u8 pkex_init_x_bp_p256r1[32] = {
0xac, 0xc7, 0xe9, 0x8d, 0xc2, 0x6f, 0xec, 0xd8 0xac, 0xc7, 0xe9, 0x8d, 0xc2, 0x6f, 0xec, 0xd8
}; };
static const u8 pkex_init_y_bp_p256r1[32] = { static const u8 pkex_init_y_bp_p256r1[32] = {
0x16, 0x30, 0x68, 0x32, 0x3b, 0xb0, 0x21, 0xee, 0x93, 0xca, 0xef, 0xa9, 0x66, 0x3e, 0x87, 0xcd,
0xeb, 0xf7, 0xb6, 0x7c, 0xae, 0x52, 0x26, 0x42, 0x52, 0x6e, 0x54, 0x13, 0xef, 0x31, 0x67, 0x30,
0x59, 0x28, 0x58, 0xb6, 0x14, 0x90, 0xed, 0x69, 0x15, 0x13, 0x9d, 0x6d, 0xc0, 0x95, 0x32, 0xbe,
0xd0, 0x67, 0xea, 0x25, 0x60, 0x0f, 0xa9, 0x6c 0x4f, 0xab, 0x5d, 0xf7, 0xbf, 0x5e, 0xaa, 0x0b
}; };
static const u8 pkex_resp_x_bp_p256r1[32] = { static const u8 pkex_resp_x_bp_p256r1[32] = {
0x90, 0x18, 0x84, 0xc9, 0xdc, 0xcc, 0xb5, 0x2f, 0x90, 0x18, 0x84, 0xc9, 0xdc, 0xcc, 0xb5, 0x2f,
@ -259,14 +259,14 @@ static const u8 pkex_init_x_bp_p512r1[64] = {
0x63, 0xe4, 0xd1, 0x0e, 0x75, 0x45, 0x69, 0x0f 0x63, 0xe4, 0xd1, 0x0e, 0x75, 0x45, 0x69, 0x0f
}; };
static const u8 pkex_init_y_bp_p512r1[64] = { static const u8 pkex_init_y_bp_p512r1[64] = {
0x5a, 0x28, 0x01, 0xbe, 0x96, 0x82, 0x4e, 0xf6, 0x50, 0xb5, 0x9b, 0xfa, 0x45, 0x67, 0x75, 0x94,
0xfa, 0xed, 0x7d, 0xfd, 0x48, 0x8b, 0x48, 0x4e, 0x44, 0xe7, 0x68, 0xb0, 0xeb, 0x3e, 0xb3, 0xb8,
0xd1, 0x97, 0x87, 0xc4, 0x05, 0x5d, 0x15, 0x2a, 0xf9, 0x99, 0x05, 0xef, 0xae, 0x6c, 0xbc, 0xe3,
0xf4, 0x91, 0x4b, 0x75, 0x90, 0xd9, 0x34, 0x2c, 0xe1, 0xd2, 0x51, 0x54, 0xdf, 0x59, 0xd4, 0x45,
0x3c, 0x12, 0xf2, 0xf5, 0x25, 0x94, 0x24, 0x34, 0x41, 0x3a, 0xa8, 0x0b, 0x76, 0x32, 0x44, 0x0e,
0xa7, 0x6d, 0x66, 0xbc, 0x27, 0xa4, 0xa0, 0x8d, 0x07, 0x60, 0x3a, 0x6e, 0xbe, 0xfe, 0xe0, 0x58,
0xd5, 0xe1, 0x54, 0xa3, 0x55, 0x26, 0xd4, 0x14, 0x52, 0xa0, 0xaa, 0x8b, 0xd8, 0x5b, 0xf2, 0x71,
0x17, 0x0f, 0xc1, 0xc7, 0x3d, 0x68, 0x7f, 0x5a 0x11, 0x9a, 0x9e, 0x8f, 0x1a, 0xd1, 0xc9, 0x99
}; };
static const u8 pkex_resp_x_bp_p512r1[64] = { static const u8 pkex_resp_x_bp_p512r1[64] = {
0x2a, 0x60, 0x32, 0x27, 0xa1, 0xe6, 0x94, 0x72, 0x2a, 0x60, 0x32, 0x27, 0xa1, 0xe6, 0x94, 0x72,
@ -279,14 +279,14 @@ static const u8 pkex_resp_x_bp_p512r1[64] = {
0x8e, 0x6e, 0x23, 0x47, 0xd4, 0x4b, 0x70, 0x3e 0x8e, 0x6e, 0x23, 0x47, 0xd4, 0x4b, 0x70, 0x3e
}; };
static const u8 pkex_resp_y_bp_p512r1[64] = { static const u8 pkex_resp_y_bp_p512r1[64] = {
0x2a, 0xbe, 0x59, 0xe6, 0xc4, 0xb3, 0xd8, 0x09, 0x80, 0x1f, 0x43, 0xd2, 0x17, 0x35, 0xec, 0x81,
0x66, 0x89, 0x0a, 0x2d, 0x19, 0xf0, 0x9c, 0x9f, 0xd9, 0x4b, 0xdc, 0x81, 0x19, 0xd9, 0x5f, 0x68,
0xb4, 0xab, 0x8f, 0x50, 0x68, 0x3c, 0x74, 0x64, 0x16, 0x84, 0xfe, 0x63, 0x4b, 0x8d, 0x5d, 0xaa,
0x4e, 0x19, 0x55, 0x81, 0x9b, 0x48, 0x5c, 0xf4, 0x88, 0x4a, 0x47, 0x48, 0xd4, 0xea, 0xab, 0x7d,
0x12, 0x8d, 0xb9, 0xd8, 0x02, 0x5b, 0xe1, 0x26, 0x6a, 0xbf, 0xe1, 0x28, 0x99, 0x6a, 0x87, 0x1c,
0x7e, 0x19, 0x5c, 0xfd, 0x70, 0xf7, 0x4b, 0xdc, 0x30, 0xb4, 0x44, 0x2d, 0x75, 0xac, 0x35, 0x09,
0xb5, 0x5d, 0xc1, 0x7a, 0xe9, 0xd1, 0x05, 0x2e, 0x73, 0x24, 0x3d, 0xb4, 0x43, 0xb1, 0xc1, 0x56,
0xd1, 0xfd, 0x2f, 0xce, 0x63, 0x77, 0x48, 0x2c 0x56, 0xad, 0x30, 0x87, 0xf4, 0xc3, 0x00, 0xc7
}; };