You’ve Never Balanced the Security Trade-off, Have You?

By: Max van der Horst, Security Officer

The fact that you’re reading this right now probably means that you’re either curious or that I was right. Both possibilities are fine with me! Of course, what I’m about to write here is only a fraction of what is really going on in the world of cyber security, but I will be discussing a little data security. Many people seem to think that, as long as they use their huge key sizes for encryption, they will be safe. While they are partly correct, there are more things to this monster than maximum security.

Wind of Change

Bruce Schneier already discussed long ago how encryption of data today deviates from the historical use of cryptography. In modern cryptography, different techniques have moved from only private communication towards inclusion of assuring content integrity and identity verification along with some other niche applications. One of Schneier’s key points at that moment was that for data in motion, cryptographic keys can be volatile, whereas for data at rest, the keys must be stored for as long as the data must be kept decryptable. It is pointed out that the keys do not assist in lowering the number of things that must be stored secretly and that they only make these things smaller as a key file is significantly smaller than a data file. According to Schneier, this is where the model falls apart because inherently, keys are meant to be used by computers and not by people. If you are able to memorize all your private keys, let me know and I would love to have a conversation with you. I know I certainly can’t. The fact that people generally can’t memorize their private keys makes that these keys need to be stored on the same computer, or at least the same network, which makes its use riskier (especially in cloud environments). This is confirmed by the many attempts that different security appliances have made to address this issue.

It’s not only about 128 or 256-bit security

Of course, if you reveal your secrets to the wind, you can’t blame the wind for revealing them to the trees. You can also consider that a wind of change, but rather a forced one. There is a very important nuance between implementing maximum security and understanding it. In a cloud-only environment, even though everything is remote, it’s very easy to goof up the entire idea of separating the key and data. If data needs to be accessed often, the service accessing this data would need access to the key. This implies that the key is on the same network or even the same computer. If that is the case, then what is the point of encrypting it? While having to find the key with the data poses a harder problem to break, it is only harder from computer-security perspective instead of from a cryptographic perspective. Hence the header of this paragraph; data security is not only about maximum security and the highest number of bits in the encryption algorithm. Good data security should be achieved using a combination of well-vetted cryptographic implementations (so refrain from making your own, this is generally a very bad idea) and a well thought through Access Control scheme. Furthermore, besides having to deal with secrets management, attacks on services are getting increasingly sophisticated. One of the domains in which this sophistication is taking place is on the area of memory security and that raises a question; how do we protect secrets from being exposed when data is in use?

Hands off my data, I’m using this!

People are always talking about data at rest and data in motion. A lot less people seem to be talking about the third state of data, which is data in use (data that is currently being used or read). Even common and important information security certification norms such as ISO27001 and ISAE3402 seem to have skipped over this state while malware authors seem to be more and more capable of extracting secrets from memory. A very simple example of this is a vulnerability from 2019 that allows Master Passwords to be extracted from memory used by 1Password 4. This definitely shows that data that is currently being read or used by the CPU or kept in RAM memory also requires protection. In the case of 1Password, this can be solved by the programmers, but how does this work in cloud environments? Is it even necessary?

When looking at securing data in use for cloud environments, eventually you’re going to start looking at encrypting memory. A few well-known tools for achieving this are Intel SGX, AMD SME and IBM Z Pervasive Encryption. The fact is, though, that the servers on which the cloud platform is running requires hardware support for this type of security. This is because the implementation relies on additions to the server’s processor to allow both user-level and operating system processes to define so-called enclaves. Enclaves are private memory regions whose contents are protected and thus cannot be read or saved by any process outside of the enclave. This also includes processes at a higher privilege level. The memory encryption is how the processor ensures other processes cannot spy on this memory region and these regions are decrypted on the fly. To me, this sounds like using a bazooka to kill flies if you’re not Amazon, Google or Microsoft running their respective platforms. I still think it is something worth considering, but in the end, your protection should meet the threat you’re facing.

Wrapping up: It’s still not all about maximum security

Now that we’ve seen an example of overkill, I think it’s safe to say that implementing as much security features as possible is not always going to be the best fit. Besides researching the options, it is just as important to model threats and adjust the implemented security measures according to this model. After all, it’s unlikely for you to become target of attacks so sophisticated that you need this level of security if you’re not managing a global platform. This doesn’t mean that security is not important, though. Since data is becoming increasingly valuable, securing it should be one of the top priorities for a company. You may not need encryption for memory regions using enclaves, but you sure do need sufficient protection for your own, customer’s and employee’s data.

If you need someone to spar about how to manage the gold mine of data you’re sitting on, feel free to reach out! We’ll be happy to assist you in coming up with the most efficient way of protecting your data without all the nonsense that comes with shopping for security products and so prevent the pitfall of overkill.

Sources

https://www.schneier.com/blog/archives/2010/06/data_at_rest_vs.html

https://blog.securityevaluators.com/recovering-the-master-password-from-a-locked-password-manager-1password-4-5d32cd569907



//Let's talk about your next big project.

 

Adress: Nevelgaarde 6, 3436ZZ
City: Nieuwegein

Phone: 088 - 8765678
Mail: info@digitalsurvivalcompany.com