title: Ideas to encrypt/obfuscate results in a Presto query?
body: <p>Scenario:</p>
  
  <ol>
  <li>I have a Presto table that I will be querying and sending
  results to various semi-trusted parties.</li>
  <li>These semi-trusted parties will analyze the data and return results
  back to me.</li>
  <li>Some of the data in this table is "semi-private"— nothing that could
  cause real harm if it were discovered, but private nonetheless (like the name of a device).</li>
  <li>The signature of this "semi-private" data will be important for GROUP BY clauses, but the actual data itself is not important to the semi-trusted parties.</li>
  <li>When this analyzed data is returned back to me, I'll need to be able to decrypt/de-obfuscate this "semi-private" data in order to act on it.</li>
  </ol>
  
  <p>Question:</p>
  
  <p><strong>Is anyone familiar with a way to encrypt/obfuscate a column of data purely within a Presto SQL query that can be decrypted/de-obfuscated in a deterministic way later on?</strong></p>
  
  <p>I know that I could easily post-process the results of the query and encrypt/obfuscate it myself, but I would like to leverage the distributed execution model of Presto if at all possible.</p>
  
  <p>The level of encryption/obfuscation does not need to be impenetrable— just something a bit more complex than base64 encoding it (and preferably with a simple secret).</p>