Thursday, January 7, 2016

We continue discussing the paper "Shielding applications from an untrusted cloud with Haven,” written by Andrew Baumann, Marcus Peinado, and Galen Hunt. We saw that the cloud has a huge trusted computing base comprising of privilegd software, hypervisor, management tools, staff and law enforcement. Although there is a hierarchical security model, essentially any data can be observed and modified and even if encrypted on disk/net.  The current approaches in cloud computing include hardware security modules comprising of dedicated crypto hardware which is expensive, limited set of APIs that provide key storage and crypto operations. These are not general purpose and used only for sensitive data. From the hierarchical security model, the trusted hypervisors suffer the following problems : 1) System administrators have access to these 2) memory snooping and other physical attacks are possible and 3) the hypervisor can be tampered.
Some mitigation in this regard is to use trusted hardware such as a TPM chip where the Basic idea is that there is a signed measurement (hash) of privileged software, remote user checks measurement, and an incorrect attestation implies compromised software. However, the cloud provider merely applies patches and updates and must trust provider for current hash value.
Let us now look at Shielded execution: this is one which enables protection of  a specific program from the rest of the system say using sandboxing, doesn't require the program to be modified which is naiive to threats, ensures confidentiality and integrity of the program and its intermediate state, control flow etc such that input and output may be encrypted and lastly one where the host may deny service but cannot alter-behaviour.
The paper assumes a malicious cloud provider which is a convenient proxy for all real threats. This means all the providers software is malicious- hypervisor, firmware, management tools, etc. All hardware besides the cpu is untrusted - DMA attacks, DRAM snooping, cold boot etc. Denial of service and side channel attacks are out of scope because they can be mitigated with billing.
Intel SGX provides hardware isolation for what is called an enclave -  a trusted boundary.  These come with new instructions to establish, protect and gate must be called to enter. This processor supports remote attestation.Even the virtual address space has a earmarked enclave for code/data and page table mappings are checked to map only to an encrypted and integrity protected portion of physical memory. Registers are also protected and controls are transferred securely.
#codingexercise
You have a N*N matrix of 0 or 1. The 0 means cell is empty and 1 means cell is full. The matrix is such that the occupied cells have to be on top of each other from the bottom as if being acted upon by gravity. This matrix can be rotated clockwise by 90 degrees. And all the elements will then slide down by gravity. Perform the rotation and gravitation pull on the matrix

int[,] RotateAndDrop(int[, ] matrix, int N)
{
var newMatrix = new int[N,N];
for (int p = N-1; p >=0; p--)
  for (int q = 0; q <N; q++)
      newMatrix[q, N-p-1] = Matrix[p,q];
for (int j = 0; j < N; j++)
  for (int i = N-1; i >= 0; i--)
      if (newMatrix[i,j] == 0 && i-1 >=0){
newMatrix[i,j] = newMatrix[i-1,j];
newMatrix [i-1,j] =0;
}
return newMatrix;
}

No comments:

Post a Comment