<div dir="ltr">Just stumbled upon: <a href="https://blog.acolyer.org/2018/07/05/enclavedb-a-secure-database-using-sgx/">https://blog.acolyer.org/2018/07/05/enclavedb-a-secure-database-using-sgx/</a><div><br></div><div>Perhaps using enclaves could be a way to secure in-memory data (especially having in mind that we can use off-heap). Adding mandatory TLS + Authentication would make Infinispan very secure. <br><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 29, 2016 at 10:24 AM Sebastian Laskawiec &lt;<a href="mailto:slaskawi@redhat.com">slaskawi@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">With your explanation I think I get it now...<div><br></div><div>So from my point of view, I would assume that we *can&#39;t* trust the servers. But with TLS we *can* trust the communication channel.</div><div><br></div><div>Does this makes sense now?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 28, 2016 at 4:07 PM, Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-8335795783296053607HOEnZb"><div class="m_-8335795783296053607h5">On 28 November 2016 at 07:21, Sebastian Laskawiec &lt;<a href="mailto:slaskawi@redhat.com" target="_blank">slaskawi@redhat.com</a>&gt; wrote:<br>
&gt; Hey Sanne!<br>
&gt;<br>
&gt; Comments inlined.<br>
&gt;<br>
&gt; Thanks<br>
&gt; Sebastian<br>
&gt;<br>
&gt; On Fri, Nov 25, 2016 at 2:55 PM, Sanne Grinovero &lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Sebastian,<br>
&gt;&gt; you&#39;re opening a very complex (but interesting!) topic.<br>
&gt;&gt;<br>
&gt;&gt; As the paper you linked to also reminds, it&#39;s extremely hard to<br>
&gt;&gt; implement such a thing without &quot;giving away&quot; lots of useful metadata<br>
&gt;&gt; to a potential attacker. It&#39;s an interesting paper as they propose a<br>
&gt;&gt; technique to maintain query capabilities while not having the full<br>
&gt;&gt; data readability, yet as other papers which I&#39;ve seen before it&#39;s both<br>
&gt;&gt; complex to implement, and leaves some questions unanswered; in this<br>
&gt;&gt; case they seem to &quot;just&quot; not being able to camouflage the data access<br>
&gt;&gt; patterns, which is pretty good but according to some experts really<br>
&gt;&gt; not enough to keep the decryption keys safe.<br>
&gt;&gt;<br>
&gt;&gt; The typical problem is that if the server has no clue about the<br>
&gt;&gt; encrypted blobs at all we won&#39;t be able to query it. However there&#39;s<br>
&gt;&gt; ongoing research (like this one?) about being still able to run<br>
&gt;&gt; queries on behalf of key-owning clients, identify a subset of the<br>
&gt;&gt; data, e.g. a *naive* example: if you know the data structure and can<br>
&gt;&gt; tell which section contains the &quot;encrypted surname&quot;, then a client<br>
&gt;&gt; could query for identical matches on the &quot;encrypted surname&quot;; however<br>
&gt;&gt; this naive approach is critically flawed such as you might be able to<br>
&gt;&gt; extract the encryption keys by analysing the statistical frequency of<br>
&gt;&gt; signatures and run a dictionary attack, e.g. you might have a good<br>
&gt;&gt; guess about which surname is expected to be the most commonly used.<br>
&gt;&gt; You&#39;ll need salting techniques combined within the query capabilities,<br>
&gt;&gt; e.g. MAC (message authentication codes) but these either require you<br>
&gt;&gt; to trust the database (are we going in circles?) or expose you to<br>
&gt;&gt; other forms of attack.<br>
&gt;<br>
&gt;<br>
&gt; Yes, you are correct. Not being able to query the server is a very serious<br>
&gt; problem. But preventing a potential attacker from analyzing your<br>
&gt; communication seems very easy to be solved - just use TLS to encrypt<br>
&gt; connection between the client and the server.<br>
<br>
</div></div>Maybe I misunderstood the &quot;requirements&quot; of your proposal. My answer<br>
was based on the assumption that the client wouldn&#39;t trust the<br>
servers, for example a client wanting to store sensible data in a<br>
&quot;database as a service&quot; platform, having a third party provide the<br>
service.<br>
If you use TLS during communication, it implies you don&#39;t trust the<br>
communication channels but somewhat trust the server. You might as<br>
well just use TLS and then not store the data in encrypted form, or<br>
share the encryption access with the servers?<br>
<br>
Thanks,<br>
Sanne<br>
<div class="m_-8335795783296053607HOEnZb"><div class="m_-8335795783296053607h5"><br>
<br>
&gt;<br>
&gt; So I think the main challenge is how to perform a search operation through<br>
&gt; an encrypted data set...<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; While it&#39;s obvious that this introduces some limitations on search<br>
&gt;&gt; capabilities on the fields of the value, you might also have similar<br>
&gt;&gt; problems just on the keys. For example you might not be able to use<br>
&gt;&gt; any form of affinity which takes advantage of some domain specific<br>
&gt;&gt; knowledge, or just about do anything useful beyond the pure<br>
&gt;&gt; &quot;key/value&quot; capabilities which are extremely limited.<br>
&gt;&gt; Besides, even the fact that the &quot;key&quot; doesn&#39;t change over time might<br>
&gt;&gt; be critical: it means you can&#39;t use salting on the key, which again<br>
&gt;&gt; introduces dictionary attacks by merely observing the frequency of<br>
&gt;&gt; operations.<br>
&gt;&gt;<br>
&gt;&gt; Even if you&#39;re prepared to give up on all those features and accept<br>
&gt;&gt; some limitations to just encrypt it all on the client, the &quot;grid&quot;<br>
&gt;&gt; needs nevertheless to be considered a trusted party; given the large<br>
&gt;&gt; amount of data and access patterns, the data grid has so much insight<br>
&gt;&gt; on both data and access patterns, that I doubt it can be properly<br>
&gt;&gt; secured.<br>
&gt;<br>
&gt;<br>
&gt; Granted. If a potential attacker had access to the machine hosting an<br>
&gt; Infinispan Server (e.g. could do a memory snapshot), the encryption<br>
&gt; algorithm would need to &quot;survive&quot; statistical analysis.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m not sure we have the right engineering skills to develop such a<br>
&gt;&gt; system, we&#39;d need at least to brush up on existing research in this<br>
&gt;&gt; field, of which I&#39;m not aware there being any &quot;full solution&quot; unless<br>
&gt;&gt; you give a good amount of trust to the database..<br>
&gt;<br>
&gt;<br>
&gt; There&#39;s a database called CryptDB:<br>
&gt; <a href="http://bristolcrypto.blogspot.com/2013/11/how-to-search-on-encrypted-data-in.html" rel="noreferrer" target="_blank">http://bristolcrypto.blogspot.com/2013/11/how-to-search-on-encrypted-data-in.html</a><br>
&gt;<br>
&gt; I haven&#39;t looked into the research papers yet but if we had to trust any<br>
&gt; database we should pick something like that.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I&#39;d love it if someone could explore this more, but be aware that it&#39;s<br>
&gt;&gt; not as easy as just enabling encryption on the client.<br>
&gt;<br>
&gt;<br>
&gt; I totally agree. Thanks a lot for pointing all those useful aspects!<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt; Sanne<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 25 November 2016 at 12:32, Sebastian Laskawiec &lt;<a href="mailto:slaskawi@redhat.com" target="_blank">slaskawi@redhat.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; Hey!<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; A while ago I stumbled upon [1]. The article talks about encrypting data<br>
&gt;&gt; &gt; before they reach the server, so that the server doesn&#39;t know how to<br>
&gt;&gt; &gt; decrypt<br>
&gt;&gt; &gt; it. This makes the data more secure.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The idea is definitely not new and I have been asked about something<br>
&gt;&gt; &gt; similar<br>
&gt;&gt; &gt; several times during local JUGs meetups (in my area there are lots of<br>
&gt;&gt; &gt; payments organizations who might be interested in this).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Of course, this can be easily done inside an app, so that it encrypts<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; data and passes a byte array to the Hot Rod Client. I&#39;m just thinking<br>
&gt;&gt; &gt; about<br>
&gt;&gt; &gt; making it a bit easier and adding a default encryption/decryption<br>
&gt;&gt; &gt; mechanism<br>
&gt;&gt; &gt; to the Hot Rod client.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; What do you think? Does it make sense?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks<br>
&gt;&gt; &gt; Sebastian<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; [1] <a href="https://eprint.iacr.org/2016/920.pdf" rel="noreferrer" target="_blank">https://eprint.iacr.org/2016/920.pdf</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; infinispan-dev mailing list<br>
&gt;&gt; &gt; <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div>
</blockquote></div></div></div>