1. A method in a device for providing data, the method comprising: receiving from a previous device a request for data that includes a public key and a homomorphic encryption of data based on the public key; combining the received public key with a device public key into a combined public key; generating a homomorphic encryption of device data to be added to the request using the combined public key; combining the generated homomorphic encryption of the device data with the homomorphic encryption of the received data into a homomorphic encryption of the combined data; and forwarding to a next device the combined public key and the homomorphic encryption of the combined data.