Value patient ,key unique for every patient and a consecutive number for every piece of data stored about this patient. The indexing of encrypted data is done via a data ID data which is derived from a hash of a second patient-related random number patient ,index and the consecutive number. The external storage hence stores tuples of (ID data,E(med)).both random values and other metadata ,like e.g. the ID of the data provider ,the value tag of the watermark and other values necessary to identify the data from outside are stored within the cache and can be encrypted and transferred to the external storage.
If access is granted for reading data ,the cache is searched first. If the data is not in the cache it is fetched from the external storage and decrypted by PS. Then a digital watermark is
Applied. Afterwards , it is disclosed together with the corresponding obligations to the requesting party