8. A microprocessor-based digital computer system for performing data analytics on outsourced data, comprising: a processor; a memory containing instructions for: a key generator that is arranged and configured to generate a binary tree representing data from a data owner, wherein each node of the binary tree is associated with an identity that represents a data element or an interval of data elements; an encryption generator that is arranged and configured to compute an identity token and encrypt the identity token for each of the identities in the binary tree; a query generator that is arranged and configured to generate a range query token using an identity selected by a data analyst and a secret key input by the data owner and computing a decryption key for the selected identity; and an analysis engine that is arranged and configured to analyzing the data by comparing the computed decryption key for the selected identity with each of the encrypted identities.
8. A microprocessor-based digital computer system for performing data analytics on outsourced data, comprising: a processor; a memory containing instructions for: a key generator that is arranged and configured to generate a binary tree representing data from a data owner, wherein each node of the binary tree is associated with an identity that represents a data element or an interval of data elements; an encryption generator that is arranged and configured to compute an identity token and encrypt the identity token for each of the identities in the binary tree; a query generator that is arranged and configured to generate a range query token using an identity selected by a data analyst and a secret key input by the data owner and computing a decryption key for the selected identity; and an analysis engine that is arranged and configured to analyzing the data by comparing the computed decryption key for the selected identity with each of the encrypted identities. 12. The microprocessor-based digital computer system of claim 8 wherein the encryption generator is arranged and configured to encrypt the identity token for each of the identities in the binary tree using an identity-based encryption scheme.