[Android] Package verification with signature.

Domain/Android 2015.02.02 21:52

/libcore/luni/src/main/java/java/util/jar/JarVerifier.java


Here is steps for verifying package with it's signature at META-INF in Android system.

- Find files ends with '.RSA', '.DSA' or '.EC'(Certification file) and then find '.SF' file(Signature File) that has same basename.

  (In case of Android, 'CERT.RSA' and 'CERT.SF' file)

- Verifying Signature File by using Certification file => Signature File is verified.

- Read '-Digest' values from CERT.SF file. => Valid hash value for files are read.

- Then, when parsing package(Apk), all file entries except for files in 'META-INF' directory, are scanned and compared with corresponding hash value in CERT.SF.


Interesting point is, in Android, verification is processed based on file entries in APK.

That is, removing some entries from APK doesn't make any problem in terms of signature verification. :)

신고
Trackback 0 : Comment 0
◀ PREV : [1] : ... [24] : [25] : [26] : [27] : [28] : [29] : [30] : [31] : [32] : ... [299] : NEXT ▶

티스토리 툴바