Bug 13027

Summary: Use stronger hash in index file (Packages[.gz])
Product: [Yocto Project Subprojects] opkg Reporter: Haris Okanovic <haris.okanovic>
Component: opkgAssignee: Alejandro del Castillo <alejandro.delcastillo>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided    
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Haris Okanovic 2018-11-16 16:28:13 UTC
Opkg index files (Packages and Packages.gz) presently include an MD5 checksum of each IPK. This checksum is used to validate package integrity after download, before upack/install occurs.

MD5 is considered broken by NIST as of ~2005. We should modify opkg to use a stronger hash algorithm, e.g. one of the "Secure Hash Standard" algorithms recommended by FIPS 180-4.

https://csrc.nist.gov/projects/hash-functions
https://csrc.nist.gov/publications/detail/fips/180/4/final
Comment 1 Alejandro del Castillo 2018-12-20 23:58:28 UTC
Opkg already has support for SHA256 via the configure option --enable-sha256.