1. 21 Jan, 2015 1 commit
    • Paul Lawrence's avatar
      Make encryption configurable · 6a69cfc4
      Paul Lawrence authored
      Add maybeenabledefaultencryption function, that encrypts based
      on the encryption flag and appropriate environment variable
      
      Bug: 18764230
      Change-Id: Id9a1967d09a7ae63a51240c0a5f3c41505af0e9a
      6a69cfc4
  2. 02 Dec, 2014 5 commits
  3. 21 Nov, 2014 2 commits
    • Iliyan Malchev's avatar
      fall back to dm-crypt if device already encrypted · bb7d9afe
      Iliyan Malchev authored
      
      Devices already encrypted with aes-cbc-essiv:sha256 will continue to be
      decrypted in software, until a factory data reset.  New devices that
      implement CONFIG_HW_DISK_ENCRYPTION will switch to aes-xts.
      
      b/17475056 Enable hardware crypto for userdata encryption
      
      Change-Id: I62d1583bdaf7ff06b87e386e758fa3b18c719bca
      Signed-off-by: default avatarIliyan Malchev <malchev@google.com>
      bb7d9afe
    • Ajay Dudani's avatar
      Adding support of dm-req-crypt · 87701e27
      Ajay Dudani authored
      
      Currently Android provides disk encryption support using dm-crypt
      which is based on bios. dm-crypt uses 512 bytes packet size for
      crypto operations. While 512 bytes size packet is ok for SW based
      disk encryption, it is inefficient for HW based crypto engines.
      dm-req-crypt is similar to dm-crypt except it uses block requests
      rathe bios for crypto operations. block requests when unpacked
      carries data upto 512KB. Hence, HW based crypto engine can be used
      more efficiently.
      
      Also move create disk encryption key before framework start as
      HW based disk encryption creates key in secure side. Key creation
      can take sometime to create the key securely. If framework is
      started before creating the key, it is possible that framework
      requests service from secure side. Secure side can serve mostly one
      request at a time. Secure side may reject framework request if key
      creation request is still going on. This may cause problem in the
      system
      
      b/17475056 Enable hardware crypto for userdata encryption
      
      Change-Id: I5480ab72a37c02532218a18faaba598a824589fd
      Signed-off-by: default avatarIliyan Malchev <malchev@google.com>
      87701e27
  4. 04 Nov, 2014 1 commit
    • Shawn Willden's avatar
      Modify vold to check for hardware keymaster. · 7c49ab0a
      Shawn Willden authored
      vold should only use hardware keymaster implementations to protect the
      disk encryption key, because there's little value in using the software
      implementation.  More importantly, if we allow vold to use softkeymaster
      in the absence of a HW keymaster and (somehow) a HW keymaster is added
      to a device, the HW version will be loaded, and will be unable to use
      the softkeymaster key found in the crypto footer, forcing a factory
      reset.
      
      This CL will not break devices without HW keymaster, because
      softkeymaster currently reports its keys as non-standalone (which isn't
      correct).  After this CL is in, I will fix softkeymaster.
      
      Bug: 17362157
      Change-Id: I98b169e7a59ff7d44b72069b87743463ec823ea2
      7c49ab0a
  5. 29 Oct, 2014 1 commit
  6. 24 Oct, 2014 1 commit
  7. 17 Oct, 2014 2 commits
  8. 16 Oct, 2014 1 commit
  9. 11 Oct, 2014 2 commits
  10. 10 Oct, 2014 1 commit
  11. 06 Oct, 2014 1 commit
    • Paul Lawrence's avatar
      Remove possibility of zero chars from passwords · fc615041
      Paul Lawrence authored
      scrypt pads the password with zeros. Our patterns use 0 to represent
      the top left dot. So patterns that end there are equivalent to ones
      that end one short.
      
      After much thought, the best solution is to change the way we
      represent patterns in keyguard. This, however, is a big change.
      
      The short term solution is to change the pattern representation in vold
      so that we are storing the correct thing. Later we will change keyguard
      to handle patterns correctly and remove quite a few hacks from vold
      (use of hex, this code). b/17840293 created to track this.
      
      Bug: 17751714
      Change-Id: I30cdffb0f0db406d2e2b6c54d4153d120d975318
      fc615041
  12. 05 Oct, 2014 2 commits
  13. 03 Oct, 2014 1 commit
    • Greg Hackmann's avatar
      cryptfs: kill processes with open files on tmpfs /data · 6e8440fd
      Greg Hackmann authored
      
      cryptfs will fail to remount /data at boot if any processes (e.g.
      dex2oat) have files open on the tmpfs /data partition.  Since these
      files are about to be destroyed anyway, just kill the offending
      processes: first with SIGHUP and finally with SIGKILL.
      
      Also remove a stray i++ that effectively cut the number of retries in
      half.
      
      Bug: 17576594
      
      Change-Id: I76fb90ce2e52846ffb9de706e52b7bde98b4186a
      Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
      6e8440fd
  14. 30 Sep, 2014 1 commit
    • Paul Lawrence's avatar
      Use monotonic clock for cryptfs progress · 9c58a871
      Paul Lawrence authored
      Otherwise we get strange results when the time changes. Worst
      effect is that the encryption takes a lot longer since we are
      calling the logging code far more frequently.
      
      Bug: 17625981
      Change-Id: Ice29f28b3720e9e4a1ea28e45eeab574d1959ec1
      9c58a871
  15. 24 Sep, 2014 5 commits
  16. 22 Sep, 2014 1 commit
  17. 12 Sep, 2014 1 commit
  18. 10 Sep, 2014 1 commit
    • Paul Lawrence's avatar
      Don't worry about battery levels when encrypting · 7e17e2d2
      Paul Lawrence authored
      This is a deliberately minimalistic change. There is another
      defect to remove all this code - removing some of it will (IMO)
      simply confuse the issue.
      
      Bug: 16868177
      Bug: 17180951
      Change-Id: I57d7a4fb3a881d62eb73419cd639a6e3ca567f91
      7e17e2d2
  19. 09 Sep, 2014 1 commit
  20. 08 Sep, 2014 1 commit
  21. 05 Sep, 2014 1 commit
    • Shawn Willden's avatar
      Pad object to proper size before signing. · 47ba10d6
      Shawn Willden authored
      Correct implementations of keymaster should reject using an n-bit
      RSA key to sign less than n bits of data, because we specify that
      keymaster should not perform padding.
      
      Change-Id: Ibdff1bbfbee84fd5bdbfb3149a124dbbaa7827fc
      47ba10d6
  22. 02 Sep, 2014 1 commit
    • Paul Lawrence's avatar
      Correctly remove asecs for full disk encryption · 60dec16c
      Paul Lawrence authored
      Previously this would fail if the framework wasn't stopped. The failure
      would then stop full disk encryption. The fact that the unmount worked,
      however, would then stop the second attempt from achieving anything.
      
      Fix in line with current retry philosophy
      
      We still need to figure out why Devmapper::destroy() fails at first.
      
      Bug: 17301843
      Change-Id: I405a36c832ccdebf2d904bef77f15eea174a6bfb
      60dec16c
  23. 29 Aug, 2014 1 commit
  24. 25 Aug, 2014 2 commits
  25. 22 Aug, 2014 1 commit
    • Jeff Sharkey's avatar
      ASEC resize tweaking, allow read-write mounting. · 43ed123d
      Jeff Sharkey authored
      Resize is no-op when sector count is unchanged; the caller can't
      anticipate how vold does its sector calculations.
      
      After resizing, we need to mount the container read-write, so allow
      the caller to request "ro" or "rw" mode.
      
      Handle ENOTSUP when trying to fallocate() on some filesystems
      
      Bug: 16514385
      Change-Id: I0d3a378280d4c36d14f8108ff428102283d583fa
      43ed123d
  26. 18 Aug, 2014 1 commit
  27. 15 Aug, 2014 1 commit