idsig: less copies when creating the merkle tree

This change improves the merkle tree generation routine so that we don't
do unnecessary data copies. Previously, hashes for level N is written
to a temporary store and then copied into the tree. Even worse, the
hashes written to the tree is copied into another buffer when they are
used as the inputs for the next level.

With this CL, the hashes are directly written to and read from the tree.
This is done by having two (non-overlapping) slices on the hash tree.

Bug: N/A
Test: cargo test
Change-Id: I34be81ece6941eba78980c8bc4697ed5d523ed53
1 file changed
tree: e10b4ff14615828bc2f0d9fcf13dbb0e9ebdb4d8
  1. apex/
  2. apkdmverity/
  3. apkverify/
  4. authfs/
  5. compos/
  6. demo/
  7. docs/
  8. idsig/
  9. javalib/
  10. launcher/
  11. microdroid/
  12. microdroid_manager/
  13. tests/
  14. virtualizationservice/
  15. vm/
  16. vmconfig/
  17. zipfuse/
  18. .clang-format
  19. Android.bp
  20. OWNERS
  21. PREUPLOAD.cfg
  22. README.md
  23. TEST_MAPPING
README.md

Virtualization

This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.