Securing Data in the Cloud with BoxCryptor*: Impact on Device Power

Introduction

Today many take their tablets or smartphones everywhere.  They take pictures and videos and upload  them to the cloud so that they can be accessed anywhere and shared with friends and family.  Storing pictures and video clips in the cloud is convenient.  However, if someone gains access to your cloud storage accounts, they can view all the files you stored, so you must encrypt sensitive files in order to secure them.  In this blog I will discuss using Boxcryptor* to encrypt your files in the Google drive*, cloud storage, and show how encrypting the files will affect the performance and battery life of the tablets/smartphones, and how this might affect your decisions to encrypt data in the cloud.

What is Google Drive?

Google Drive is a cloud storage system that allows users to store their music, pictures, videos and other files so that they can be accessed anywhere.  More information about Google Drive can be found here.

What is BoxCryptor?

Boxcryptor is encryption software used in cloud storage like Google Drive, Microsoft SkyDrive and Dropbox.  Boxcryptor was chosen due to its popularity and cross-platform availability.
More information about Boxcryptor and how to get it can be found here.

Performance and Power Tests

I made a 10-minute video clip using an Android* tablet.  The testing procedure was as follows:
   1) We used a Motorola* Xoom tablet to upload and download the video clip to Google Drive and recorded how long it took to transfer the file, and collected the power consumption of these operations.
   2) We ran Boxcryptor to encrypt the video clip, then repeated the process in step one.

   Hardware:
   Motorola*: Xoom* tablet  with Android version 4.1.2
   Intel internal software development platform – Ultrabook i7-3667U CPU at 2.00GHz, 4GB RAM, 120GB SSD with Microsoft* Windows 8.0
   Software on Tablet:
   Google Drive version 1.2.228.32
   Boxcryptor version 2.0.402.16

    Note: All software was downloaded from the Google Play Store.
 
   Video Clip:
   Duration: 9’56”
   Size: 43MB
   Picture Size: 256x144
   Frame Rate: 23.97fps
   Audio Codec: aac
   Video Codec: mpeg4
   Video Bit Rate: 504kbps
   Audio Bit Rate: 96kbps

   Cloud Storage: Google Drive

   Measuring Time:
      We used a stopwatch to measure how long it took to upload and download the file.

   Measuring Power:
   We used the following script to collect power data on the Xoom while uploading and downloading the file:

      while true;
      do
         cat /sys/class/power_supply/battery/uevent
         sleep 10    
      done

The power data was collected by reading the file uevent every 10 seconds.  Be aware that reading this file more often will affect the power measurement process.  The power data was collected using a TCP/IP connection, not a USB cable connection to collect power data.  The USB cable provides a charge and skews the data.  Use the following commands to collect power data through tcpip:

      adb tcpip 5555
      adb connect <tablet-ip-address>

The power data collected will look something like this:

POWER_SUPPLY_NAME battery
POWER_SUPPLY_STATUS Not charging
POWER_SUPPLY_HEALTH Good
POWER_SUPPLY_PRESENT 1
POWER_SUPPLY_TECHNOLOGY Li-ion
POWER_SUPPLY_CYCLE_COUNT 100
POWER_SUPPLY_CAPACITY 85
POWER_SUPPLY_VOLTAGE_NOW 8022720
POWER_SUPPLY_TEMP 308
POWER_SUPPLY_CURRENT_NOW -341400
POWER_SUPPLY_CURRENT_AVG -384600
POWER_SUPPLY_CHARGE_COUNTER 2744000
POWER_SUPPLY_NAME battery
POWER_SUPPLY_STATUS Not charging
POWER_SUPPLY_HEALTH Good
POWER_SUPPLY_PRESENT 1
POWER_SUPPLY_TECHNOLOGY Li-ion
POWER_SUPPLY_CYCLE_COUNT 100
POWER_SUPPLY_CAPACITY 84
POWER_SUPPLY_VOLTAGE_NOW 8003200
POWER_SUPPLY_TEMP 308
POWER_SUPPLY_CURRENT_NOW -312900
POWER_SUPPLY_CURRENT_AVG -380700
POWER_SUPPLY_CHARGE_COUNTER 2739200
POWER_SUPPLY_NAME battery
POWER_SUPPLY_STATUS Not charging
POWER_SUPPLY_HEALTH Good
POWER_SUPPLY_PRESENT 1
POWER_SUPPLY_TECHNOLOGY Li-ion
POWER_SUPPLY_CYCLE_COUNT 100
POWER_SUPPLY_CAPACITY 84
POWER_SUPPLY_VOLTAGE_NOW 8003200
POWER_SUPPLY_TEMP 308
POWER_SUPPLY_CURRENT_NOW -312900
POWER_SUPPLY_CURRENT_AVG -380700
POWER_SUPPLY_CHARGE_COUNTER 2739200

 

We are only interested in the average current, POWER_SUPPLY_CURRENT_AVG,  and voltage values so that we can calculate the average energy consumption.  Note that Xoom did not provide the counter to collect the average voltage.  It did provide the instantaneous voltage, POWER_SUPPLY_VOLTAGE_NOW, instead. We need to take the average of the instantaneous voltage to calculate the average voltage.  The average current unit is in micro-amperes (uA) and the instantaneous voltage unit is in micro-volts (uV).  Other tablets might provide the counter to collect the average voltage.

The power was calculated as follows:

      Average Power = (Average voltage) * (Average current)
     
The energy consumption was calculated as follows:

      Average Energy = (Average power) * Time 
  

Results:

 

From the table we can see that uploading the encrypted file took 164 seconds comparing to 118 seconds when uploading the un-encrypted version of the same file. 

From the table we can see that uploading the encrypted file took 3391.38 mW comparing to 3215.08 mW when uploading the un-encrypted version of the same file.

From the table we can see that uploading the encrypted file took 154.49 mWh comparing 105.38 mWh when uploading the un-encrypted version of the same file. 

Analysis:

In this case, we can see that it takes an extra 46 seconds and 3 seconds to upload and download an encrypted file, respectively.  Similarly, it consumes an additional 49.11 mWh and 2.49mWh to upload and download an encrypted file using Boxcryptor, respectively.  To make it easier to understand, let’s convert the energy into battery life.  The tablet battery is rated at 3950mAh 3.7VDC or 14615mWh.  Assuming during normal operation this battery lasts up to 10 hours.  Each time uploading the encrypted file will reduce the battery life by 0.0336 hours or 2 minutes comparing to that of the un-encrypted file.  Similarly, downloading the encrypted file will reduce the battery life by 0.0017 hours or 0.1 minutes.


Conclusion

Encrypting files stored in the cloud will help prevent unauthorized persons from being able to look at your data.  Fortunately there are multiple applications that exist on both Windows and Android that allow you to encrypt data on your mobile clients and access them from other clients.     However, uploading encrypted files to cloud storage will increase the time it takes to transfer the data, resulting in more power consumed, and a decrease in battery life of your mobile device.  Although there are other factors that we have not tested, with the data we have seen, we recommend that you consider encrypting your more sensitive documents (as opposed to everything). 

Einzelheiten zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Tags: