Use BoringSSL instead of mincrypt to speed up package verification.

This changes the verification code in bootable/recovery to use
BoringSSL instead of mincrypt.

Cherry-pick of 452df6d99c81c4eeee3d2c7b2171901e8b7bc54a, with
merge conflict resolution, extra logging in verifier.cpp, and
an increase in the hash chunk size from 4KiB to 1MiB.

Bug: http://b/28135231
Change-Id: I1ed7efd52223dd6f6a4629cad187cbc383d5aa84
diff --git a/Android.mk b/Android.mk
index 6c3ce56..65d123a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -23,7 +23,7 @@
 
 LOCAL_MODULE := libfusesideload
 
-LOCAL_STATIC_LIBRARIES := libcutils libc libmincrypt
+LOCAL_STATIC_LIBRARIES := libcutils libc libcrypto_static
 include $(BUILD_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -71,12 +71,12 @@
     libminzip \
     libz \
     libmtdutils \
-    libmincrypt \
     libminadbd \
     libfusesideload \
     libminui \
     libpng \
     libfs_mgr \
+    libcrypto_static \
     libbase \
     libcutils \
     libutils \
@@ -136,6 +136,7 @@
     asn1_decoder.cpp \
     verifier.cpp \
     ui.cpp
+LOCAL_STATIC_LIBRARIES := libcrypto_static
 include $(BUILD_STATIC_LIBRARY)
 
 include $(LOCAL_PATH)/minui/Android.mk \