The MD5 hash is only to verify that there haven't been any errors in downloading, there are other authentication methods implemented, some may not have a name to the general public as they are internal to the OEM.
As stated above: you cannot modify stock firmware and still have it work.
See...