1. A method for selecting an encrypted element in an encrypted vector according to an order of the encrypted element in the encrypted vector using a secure communication between a first processor and a second processor, wherein the second processor stores a pair of keys for a semantically secure additively homomorphic cryptosystem, the pair includes a private decryption key and a public encryption key, wherein the encrypted vector is encrypted with the public key and stored at the first processor, and wherein the first processor operates only in an encrypted domain, comprising the steps of: scaling values of the elements of the encrypted vector, such that the order of the elements in the encrypted vector is preserved; permuting the order of the elements of the encrypted vector to produce a scaled permuted vector; providing information in the encrypted domain to the second processor, wherein the information in an underlying unencrypted domain is indicative of an order of elements in the scaled permuted vector; obtaining an encrypted index of the encrypted element in the scaled permuted vector; and selecting the encrypted element based on the encrypted index, wherein the steps of the method are performed by the first processor.