Page 1 of 1

Which algorithm is applicable for hashing iOS binaries

PostPosted: Mon Apr 15, 2019 11:19 am
by Morena2K
What algorithm does codesign use to compute the CDs hashes? CD is a collection of hashes for different part of the binary. Which is the signed binary hash. The signature lives in the binary under the field CDHas

Re: Which algorithm is applicable for hashing iOS binaries

PostPosted: Tue Apr 16, 2019 2:44 am
by csftech
codesign uses SHA-1 before iOS 11, and uses SHA-256 after that.
I suggest you to view the xerub's ldid2 source code.

Re: Which algorithm is applicable for hashing iOS binaries

PostPosted: Tue Apr 16, 2019 11:04 am
by morpheus
more accurately,

SHA-1 (default)
SHA-256 (newer)
SHA-384 (emerging)


http://newosxbook.com/images/figure5-4.png