mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-10-30 20:37:26 +01:00 
			
		
		
		
	dpp-util: fix incorrect ASN1 compressed public key encoding
The prefix to the X coordinate was incorrect when using compressed points. This has been modified to match the ANSI X9.62 spec.
This commit is contained in:
		
							parent
							
								
									b7180d4d29
								
							
						
					
					
						commit
						2ba88f05e9
					
				| @ -751,11 +751,11 @@ uint8_t *dpp_point_to_asn1(const struct l_ecc_point *p, size_t *len_out) | ||||
| 
 | ||||
| 	/*
 | ||||
| 	 * Set the type to whatever avoids doing p - y when reading in the | ||||
| 	 * key. Working backwards from l_ecc_point_from_data if Y is odd and | ||||
| 	 * the type is BIT0 there is no subtraction. Similarly if Y is even | ||||
| 	 * key. Working backwards from l_ecc_point_from_data if Y is even and | ||||
| 	 * the type is BIT0 there is no subtraction. Similarly if Y is odd | ||||
| 	 * and the type is BIT1. | ||||
| 	 */ | ||||
| 	if (l_ecc_point_y_isodd(p)) | ||||
| 	if (!l_ecc_point_y_isodd(p)) | ||||
| 		point_type = L_ECC_POINT_TYPE_COMPRESSED_BIT0; | ||||
| 	else | ||||
| 		point_type = L_ECC_POINT_TYPE_COMPRESSED_BIT1; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 James Prestwood
						James Prestwood