A method of preventing duplication of encrypted data in a storage arranged in a network in which two or more hosts can store data in the network, the storage comprising one or more encrypted data blocks, the network further comprising a distributed ledger, accessible to each of the two or more hosts and holding, for each of the one or more encrypted data blocks, a first hash value identifying the data block, the method comprising the following steps, performed by a first host of the two or more hosts when the first host wishes to store a new data block in the storage, - obtaining a first hash value for the new data block, - determining if the first hash value is found in the ledger, if the first hash value is not found in the ledger, - creating a set of confirmation data that constitute proof that the first host has ownership of the data, - encrypting the new data block with a block-unique encryption key and storing the encrypted new data block in the storage with a key that is equal to the first hash value, - storing a first ownership record in the ledger, the first ownership record comprising the identity of the first host, the first hash value unencrypted, and the set of confirmation data encrypted with a key known only to the first host, if the first hash value is found in the ledger, - obtaining from the ledger information about a second host that has already stored a previous block identical to the new data block in the storage, - entering in the ledger a key request for the key to the previous block, the key request comprising the set of confirmation data, encrypted with the public key of the second host, - receiving from the ledger a key transfer record stored by the second host, the key transfer record comprising the key to the previous block, wherein the key is encrypted with the public key of the first host, - sending to the ledger a new ownership record that the first host has been given ownership of the data block. the storage comprising one or more encrypted data blocks, the network further comprising a distributed ledger, accessible to each of the two or more hosts and holding, for each of the one or more encrypted data blocks, a first hash value identifying the data block, the method comprising the following steps, performed by a first host of the two or more hosts when the first host wishes to store a new data block in the storage, - obtaining a first hash value for the new data block, - determining if the first hash value is found in the ledger, - obtaining a first hash value for the new data block, - determining if the first hash value is found in the ledger, if the first hash value is not found in the ledger, - creating a set of confirmation data that constitute proof that the first host has ownership of the data, - encrypting the new data block with a block-unique encryption key and storing the encrypted new data block in the storage with a key that is equal to the first hash value, - storing a first ownership record in the ledger, the first ownership record comprising the identity of the first host, the first hash value unencrypted, and the set of confirmation data encrypted with a key known only to the first host, - creating a set of confirmation data that constitute proof that the first host has ownership of the data, - encrypting the new data block with a block-unique encryption key and storing the encrypted new data block in the storage with a key that is equal to the first hash value, - storing a first ownership record in the ledger, the first ownership record comprising the identity of the first host, the first hash value unencrypted, and the set of confirmation data encrypted with a key known only to the first host, if the first hash value is found in the ledger, - obtaining from the ledger information about a second host that has already stored a previous block identical to the new data block in the storage, - entering in the ledger a key request for the key to the previous block, the key request comprising the set of confirmation data, encrypted with the public key of the second host, - receiving from the ledger a key transfer record stored by the second host, the key transfer record comprising the key to the previous block, wherein the key is encrypted with the public key of the first host, - sending to the ledger a new ownership record that the first host has been given ownership of the data block. - obtaining from the ledger information about a second host that has already stored a previous block identical to the new data block in the storage, - entering in the ledger a key request for the key to the previous block, the key request comprising the set of confirmation data, encrypted with the public key of the second host, - receiving from the ledger a key transfer record stored by the second host, the key transfer record comprising the key to the previous block, wherein the key is encrypted with the public key of the first host, - sending to the ledger a new ownership record that the first host has been given ownership of the data block.