scieee AI-readable full text Open interactive document viewer

Introducing keytagging, a novel technique for the protection of medical image-based tests

Rubio, O.J.; Alesanco, A.; García, J.

Abstract

This paper introduces keytagging, a novel technique to protect medical image-based tests by implementing image authentication, integrity control and location of tampered areas, private captioning with role-based access control, traceability and copyright protection. It relies on the association of tags (binary data strings) to stable, semistable or volatile features of the image, whose access keys (called keytags) depend on both the image and the tag content. Unlike watermarking, this technique can associate information to the most stable features of the image without distortion. Thus, this method preserves the clinical content of the image without the need for assessment, prevents eavesdropping and collusion attacks, and obtains a substantial capacity-robustness tradeoff with simple operations. The evaluation of this technique, involving images of different sizes from various acquisition modalities and image modifications that are typical in the medical context, demonstrates that all the aforementioned security measures can be implemented simultaneously and that the algorithm presents good scalability. In addition to this, keytags can be protected with standard Cryptographic Message Syntax and the keytagging process can be easily combined with JPEG2000 compression since both share the same wavelet transform. This reduces the delays for associating keytags and retrieving the corresponding tags to implement the aforementioned measures to only ¿30 and ¿90. ms respectively. As a result, keytags can be seamlessly integrated within DICOM, reducing delays and bandwidth when the image test is updated and shared in secure architectures where different users cooperate, e.g. physicians who interpret the test, clinicians caring for the patient and researchers. Rubio, O.J.; Alesanco, A.; García, J.

Full text

Introducing keytagging, a novel technique for the protection of medical image-based tests ´ Oscar J. Rubioa,∗,´ Alvaro Alesancoa, Jos´e Garc´ıaa aeHealthZ Research Group, Communications Networks and Information Technologies for E-health and Quality of experience group (CeNITEQ), Arag´on Institute of Engineering Research (University of Zaragoza). Edif. Ada Byron, C/Mar´ıa de Luna 3, 50018 Zaragoza (Spain). Abstract This paper introduces keytagging, a novel technique to protect medical image-based tests by implementing image authentication, integrity control and location of tampered areas, private captioning with role-based access control, traceability and copyright protection. It relies on the association of tags (binary data strings) to stable, semistable or volatile features of the image, whose access keys (called keytags) depend on both the image and the tag content. Unlike watermarking, this technique can associate information to the most stable features of the image without distortion. Thus, this method preserves the clinical content of the image without the need for assessment, prevents eavesdropping and collusion attacks, and obtains a substantial capacity-robustness tradeoff with simple operations. The evaluation of this technique, involving images of different sizes from various acquisition modalities and image modifications that are typical in the medical context, demonstrates that all the aforementioned security measures can be implemented simultaneously and that the algorithm presents good scalability. In addition to this, keytags can be protected with standard Cryptographic Message Syntax and the keytagging process can be easily combined with JPEG2000 compression since both share the same wavelet transform. This reduces the delays for associating keytags and retrieving the corresponding tags to implement the aforementioned measures to only ≃30 and ≃90 ms respectively. As a result, keytags can be seamlessly integrated within DICOM, reducing delays and bandwidth when the image test is updated and shared in secure architectures where different users cooperate, e.g. physicians who interpret the test, clinicians caring for the patient and researchers. Keywords: DICOM, Distortion, Keytagging, Privacy, Security ∗Phone number: (+34) 976762698, fax number: (+34) 976762111 Email addresses: [email protected] (´ Oscar J. Rubio ), [email protected] (´ Alvaro Alesanco), [email protected] (Jos´e Garc´ıa) Preprint submitted to Journal of Biomedical Informatics May 2, 2015 1. Introduction The landscape of healthcare has evolved dramatically in the last few years with the digitization of medical image-based tests and the deployment of standard protocols for their storage and transmission, such as the Digital Imaging and COmmunication in Medicine (DICOM [1]) standard. The new e-health model [2] fosters ubiquitous and pervasive access to users of medical information: physicians who interpret the tests, clinicians caring for the patient, patients, researchers, medical teachers and students, etc. Furthermore, it enables the establishment of cooperative architectures where different authorised users may perform some editing of the image (e.g. adding annotations), update its attached information (e.g. examination-related data, patient demographics, health records) and share with others. On the one hand, this reduces the time for diagnosis and enables more accurate treatments, more thorough researches, and the provision of e-learning or commercial uses, depending on patient consent. On the other hand, the e-health model requires a high level of accessibility to medical information, which increases its potential risks. Since image-based tests include sensitive information, they are a target for eavesdropping, which may result in social and professional damage for the victim; and also for tampering and forgery, which may lead to misdiagnosis, mistreatments and wrong research outcomes. Current legal regulations such as the HIPAA [3] in the USA, the PIPEDA [4] in Canada and the LOPD [5] in Spain require the implementation of robust security policies to protect medical image-based tests. For this purpose, different security measures may be combined [6, 7]: •Role-based access control (RBAC), so that each authorised user can read and/or edit certain contents of the image-based test according to his/her professional role, e.g. physician, researcher, teacher, etc. •Integrity control, to detect if the image has been tampered with, which would endanger its clinical value. •Tamper location, pinpointing the areas where the image has been manipulated, which may be helpful to validate images that are modified in permissible areas. •Authentication, assessing if the image received corresponds to the image originally acquired, to an image derived from the original or to an unrelated image. •Private captioning, associating private information with the image, only retrievable by authorised users of the authenticated image. •Traceability control for user accountability, by associating marks from each entity that processes the image. 2 •Copyright protection, to pursue illegal copies if the image has a commercial use. Hitherto, these security measures have traditionally been implemented in the medical context by means of cryptography, mainly in medical standards such as DICOM; or watermarking, mainly in research works. Nonetheless, these techniques present several disadvantages that limit their applicability for the protection of cooperative medical architectures (see Section 2). This paper proposes a new research direction, based on the goal of performing a secure and fast association of different types of data, called tags, to certain image features. These features and their associated tags may be categorized as stable, semistable or volatile, according to their robustness, i.e. their resistance to changing their values when the image undergoes some processing, such as compression or filtering. Stable tags would be suitable for authentication, traceability and copyright protection; semistable tags would be appropriate for private captioning with RBAC, and volatile tags would be ideal for integrity control and location of tampered areas. The association of tags to suitable features would be performed by means of a novel technique, called keytagging, whose main challenges are the extraction of image features with adequate robustness and the efficient encoding of the tags as a subset of the extracted features, by means of a map. This map will be compressed and protected to produce a stable, semistable or volatile keytag, which is an access key to retrieve the content of the tag from the image. Compared to other alternatives, keytagging presents five relevant features, derived from the fact that this technique does not modify the medical image to associate information. First and most obvious, the image always preserves its clinical quality, without the need for assessment. Second, even very stable features can be used to encode keytags, which ensures high robustness and capacity. Third, no complex rules are necessary for the selection of the image features, since there is no risk of destroying its clinical value. Fourth, collusion and forgery attacks have no effect on keytagged image-based tests. Fifth, keytagging enables the deployment of secure and efficient cooperative architectures, since each user can add information related with the test by associating new keytags, with no risk of distorting or removing the previous ones. To share this update of the test, it is enough to send the new keytags to the rest of the users. The rest of this paper is organized as follows. Section 2 analyzes related works and sets the background of this research. Section 3 depicts in detail the keytagging algorithms. Section 4 evaluates the performance of this approach by using different-size images from various medical acquisition modalities (CT, MRI, US, PET-CT), and image processing techniques that are common in the medical context. Based on the results retrieved, Section 5 proposes appropriate keytagging parameters for implementing the aforementioned security measures and depicts a risk assessment of the keytagging method. Next, Section 6 approaches the 3 integration of keytags within the DICOM protocol, to enable the development of efficient architectures in which different users can update the DICOM file maintaining its security level. Finally, Section 7 outlines the main conclusions from this research and proposes future lines of work. 2. Related work Keytagging has relevant influences from both cryptography and watermarking. The keytagging algorithm uses cryptographic tools to protect the keytags while the idea of associating data to different features of the image was motivated by watermarking techniques, which embed data into certain parts of the image. The advance introduced by keytagging is the ability to perform this association without embedding the data into the image, which permits avoiding any image distortion. Both keytagging and watermarking face a tradeoff between the robustness of keytags/watermarks and their capacity to host large contents, and both techniques require the protection of keytags/watermarks to prevent or hinder eavesdropping and forgery. 2.1. Cryptography Cryptography provides two efficient and reliable tools to protect image-based tests, which may also be applied to watermarks and/or keytags. These are encryption, which may be symmetric or asymmetric; and hashing, which is found in digital signatures (DS) and hash message authentication codes (HMAC). The former can be used to implement RBAC by means of Cryptographic Message Syntax (CMS [8]), while the latter enables binary integrity control (tampered/non-tampered), authentication and traceability. Furthermore, private captioning can also be implemented by encrypting some content based on the hash of the image [9]. However, the location of tampered areas in an image would be burdensome since it would require multiple hashing of different parts of that image. The typical policy to protect an image-based test, e.g. a DICOM file, is to de-identify the private data of the image, include it with the information associated to the image, and use CMS to implement RBAC on this data, leaving the de-authenticated image unencrypted and adding a DS to the file to guarantee integrity and authentication. In addition, each entity that processes the file shall add its own DS for traceability. The main issue in cryptography-based policies like this is the difficulty of developing cooperative architectures while maintaining the security measures. Any change in the test will invalidate all the previous signatures, and even though a new DS can be calculated, the traceability from the origin will be lost. An alternative is that each user adds his/her changes to the original test, digitally signs it and delivers the signed updated test to the rest of the users. In this way, the rest of the users can store the updated test 4 with security, and add new updates from the last test version by following the same procedure. Nonetheless, as the number of users and updates of the medical image-based test grow, this approach becomes quite impractical in terms of delays, bandwidth and storage. 2.2. Watermarking Medical Image Watermarking [10, 6, 7] (MIW) techniques embed limited amounts of hidden data (e.g. medical information), with one or several watermarks, within a medical image by means of image modifications and keys. The main feature of MIW is that the image can be manipulated (e.g. annotated, compressed with JPEG2000 [11], adjusted with different contrast and brightness) by the users without interference to its security regardless of whether they know about the existence of the watermarks. The keys used in watermarking, like those in symmetric encryption, are required to retrieve the embedded data and neither depend on the data nor on the image. There are different types of watermarks, and they may be combined to implement a security policy. Robust watermarks [12, 13], whose content is retrievable even if the image has undergone heavy modifications, may be used for authentication, traceability and copyright protection. Semifragile watermarks [14], whose content is retrievable only if those modifications are mild (e.g. if the image preserves its clinical value), may be used for private captioning. Finally, fragile watermarks [15, 16], whose content is retrievable only if the image is intact, may be used to implement integrity control and location of tampered areas in the image. Role-based control is also guaranteed since different watermarks, intended for different users, may be embedded in the same image. It is worth pointing out that MIW techniques require to produce a minimum distortion of the image to preserve its clinical value. In fact these techniques are often grouped in three categories depending on the manner how they cope with this requirement of high transparency. The first group are the non-reversible techniques, which produce a permanent distortion on the image because they perform non-invertible operations, typically bit quantization, replacement or truncation. As a consequence, a thorough clinical assessment is necessary to guarantee that the clinical value of the watermarked images is preserved. Regarding watermarking domains, while the first approaches [17, 18] used the replacement of least significant bits (LSB) of pixels, which can only host fragile watermarks; the subsequent use of regions of different amounts of energy in transform domains allowed the embedding of multiple (robust, semifragile and fragile) watermarks in the same image [19, 20, 21]. Furthermore, medical data could be embedded in a compressed domain to combine the watermarking with lossy compression [22, 23]. The second group of MIW techniques corresponds to those that embed mainly in regions of non-interest (RONI) of the image. This minimizes the interference of the watermarks with the clinical content and 5 avoids the need for clinical assessment. Robust watermarks are embedded in the RONI, surrounding the ROI [24, 25, 26] to try to avoid its deletion if the image is clipped, or in random locations [27, 28, 29] to increase the capacity. Only fragile watermarks for integrity control need to be embedded, at least partially, in the ROI. The security of these techniques against eavesdropping and forgery is low, since the modified pixels/coefficients where the watermarks were embedded are easy to identify in the RONI, which is usually black. Moreover, the RONI may be used to insert visible watermarks or removed if medical image compression [30] is applied. In both cases the watermark/s would be partially or totally removed. The third group are the reversible/lossless/invertible/erasable techniques, which distort the image but can recover its original quality by completely removing the watermarks after they have been detected and validated. This new concept of watermarking was first introduced in [31], and since then a variety of methods have been developed. Difference expansion, a kind of integer wavelet transform with high redundancy, was proposed early on in [32], obtaining low-distortion and high-capacity. Histogram operations, such as circular interpretation of bijective transformations [33], are also an effective manner to implement reversible watermarking with notable endurance to lossy compression. The addition of a virtual border where patient data is inserted in the LSB, at the cost of increasing the image size, has also been proposed [34]. The use of an estimator signal to determine which pixel blocks can embed information was proposed in [35], further used to embed a digest of the knowledge associated to the image [36], and refined in [37] by introducing a secure random location signal for security and implementing tamper detection and location. Similarly, an effective tamper location watermarking based on partitioning an authentication area into small regions in a multilevel hierarchical manner is depicted in [38]. Nevertheless, any reversible technique has two important drawbacks. First, it requires a secure environment since the image is unprotected once the watermarks are removed. Second, a user not allowed to access certain watermarks will not be able to remove them either, so he/she will work with a lower-quality version of the image. It can be concluded that various disadvantages hinder the integration of watermark-based policies in standards such as DICOM and in cooperative architectures. First and most important, there is a tradeoff between capacity, robustness and image distortion. Thus, as new watermarks are added, especially if they are robust, the quality of the image decreases and the image may lose its clinical value, rendering it useless. Second, watermarks embedded by different users may interfere with each other since each new watermark may destroy part of the content of the others. Third, there is a tradeoff between robustness and capacity, so robust watermarks cannot be long. In addition to this, the use of watermarking in cooperative architectures would imply an important cost in bandwidth and delays, since every time that a user embeds a watermark 6 in an image, he/she has to send the watermarked image together with the watermark keys to the rest of the users. If an image is watermarked several times by different users, it needs to be transmitted every time to the other users. In contrast, keytagging requires that each user has a copy of the images to be used for the keytagging. Once this requirement is met, different users can associate tags with the only further requirement that they transmit the corresponding keytags to the rest of the users. 3. Materials and methods The procedure proposed for associating keytags {KT }, to bind the content of some tags {T}to an image Ior, is formally described in Algorithm 1 and illustrated by means of an example in Figure 1; while the procedure for retrieving {T}from Ior, or from some modified version ˜ Ior, is defined in Algorithm 2. {KeytagType}is an important input parameter of these algorithms, which establishes the expected robustness of the tags when Ior undergoes common image modifications in the medical context and, according to it, their security applications (analyzed in Section 5). Stable tags are expected to be retrieved with low distortion even when ˜ Ior has undergone aggressive image modifications which may have caused the loss of its clinical value, semistable tags are intended to remain undistorted only if ˜ Ior has undergone mild modifications and preserves the clinical value of Ior, and volatile tags are intended to be retrieved highly distorted even if the modifications of ˜ Ior are minor. Both Algorithm 1 and 2 rely on a preprocessing of the image, a selection of appropriate image features, a compact coding/decoding of the keytags and cryptographic protection of/access to the keytags. These processes are depicted in detail throughout Sections 3.1-3.4, which follow the notation described in Table 1. Finally, Section 3.5 describes how keytagging can be integrated within the JPEG2000 compressor. 3.1. Preprocessing The first step of Algorithms 1-2 (line 2) is the segmentation of the region of interest (ROI) of the image, so that the tags can be associated to the most important parts of the image. The intention is to prevent the tags from being distorted or removed due to modifications affecting the RONI, such as medical image compression by areas [30], blackening private data for anonymization or the insertion of visible watermarks. If all the tag are associated outside the RONI, these modifications would be incapable of distorting or removing them. In some medical image modalities, an algorithm has been designed to obtain the ROI automatically, as is the case in [39] with the atherosclerotic plaque ultrasound. In addition to this, several medical image acquisition devices currently deliver the image ROI separated from the blocks of associated 7 Table 1: Operators and Notation Notation Meaning output/s ←f(input/s) Assignment of value to one or several outputs from a function or operator f() with one or several inputs. [ ] Concatenation operator. d e Operator of rounding to the nearest greater integer. ⊕Binary XOR operator. {X}Set of elements of type X, each element irepresented as X{i}. #XNumber of elements that compose the set X. V(i:j:k) Vector derived from a vector V, corresponding to a subset of its elements, [V(i), V (i+j), V (i+ 2 ·j), ..., V (k)]. M(:) Vector derived from a matrix M, corresponding to the concatenation of its rows, [M(1,:), M(2,:), ..., M(end, :)]. Ior Original image to be used for keytagging. ˜ Ior Modified version of Ior (e.g. compressed, filtered, clipped, rotated). ROI(I) Region of interest of an image I. RONI(I) Regions of non-interest of an image I. MBR Minimum bounding rectangle. R(I), G(I), B(I) Levels of R,Gand Bcolors in RGB format of an image I. IgGrayscale image derived from an image I. CDF 9/7 or 5/3 Cohen-Daubechies-Feauveau 9/7-tap or 5/3 (also known as LeGall) filters. Coef, h, w ←WT(I, f, j) Function that returns Coef, the j-th wavelet decomposition calculated with filters f of an image I;hand w, the height and width of the wavelet decomposition levels from 1 to j. MWL(I) Maximum wavelet decomposition level of an image I. LL Coefficients of a wavelet subband obtained with horizontal and vertical low-pass filtering. HL Coefficients of a wavelet subband obtained with horizontal high-pass filtering and vertical low-pass filtering. LH Coefficients of a wavelet subband obtained with horizontal low-pass and vertical high-pass filtering. HL Coefficients of a wavelet subband obtained with horizontal and vertical high-pass filtering. aWL(I) Wavelet level allowed for an image Ito associate certain tag/s. CSubset of coefficients from aWL. FFeatures from Cused for the coding of one or several T. abs(X) Absolute value/s of X. LSB(X) Least significant bit/s of X. TTag, binary data string to be associated to an Ior by means of a KT . ˜ TTag retrieved from a modified image, ˜ Ior. s out ←LFSR(s, t) Linear feedback shift register with initial state sand taps t. GolombSeq A binary sequence that meets Golomb’s randomness postulates. (X)∗A scrambled binary sequence derived from Xby means of a reversible transformation. BM Bi-level map that encodes a tag as positions of certain coefficients of aWL. KT Keytag, which permits the retrieval of a Tfrom an image. Sk Secret key used for symmetric encryption-decryption. PrU Private key to be used by user Ufor asymmetric decryption of data or for its signature. PbU Public key of user U, used by any user for asymmetric encryption of data intended for U, or to verify any signature issued by U. DS(D, Alg, P rU) Digital signature of Dusing the algorithm Alg and the private key of the signatory U. checkDS(D, Alg, P bU) Verification of the DS of Dby using the algorithm Alg public key of the signatory U. encrypt(P laintext, Alg, K) Encryption of Plaintext using the algorithm Alg and the key K. decrypt(Ciphertext, Alg, K) Decryption of Ciphertext using the algorithm Alg and the key K. 8 Figure 1: Main steps for the association of a stable keytag according to Algorithm 1. 9 Algorithm 3 Auxiliary procedures used in keytag association and tag retrieval 15: procedure extractFeatures(Coef,h,w,filter,keytagType,lengthT,MWL,GolombSeq) 16: if (keytagType =Stable)then 17: aWL ←MWL −6.Selecting coefficients from top levels, 18: while h(aWL + 1) ·w(aW L + 1) ≥10 ·lengthT do .such their number of coefficients 19: aWL ←aW L + 1 .exceeds 10 ·lengthT .The maximum number of coefficients to be 20: C←Coef(1 : h(aWL),1 : w(aWL)) .selected are those from levels ≥MWL −6 21: F←(C≥0) .and the features of interest are their signs 22: else if (keytagType =Semistable)then 23: aWL ←MWL −7.Selecting coefficients from levels ≤MW L −7 24: C(1 : h(aWL + 1),1 : w(aW L + 1)) ←0.by setting coefficients from levels ≥MWL −6 to 0, 25: F←(C≥0) .the features of interest are their signs 26: else . keytagType is V olatile 27: aWL ←1.Selecting coefficients from 28: C←Coef(h(aWL + 1) + 1 : end, w(aW L + 1) + 1 : end).the HH subband of level 1, 29: F←LSB(C).the features of interest are their LSBs 30: (F)∗←scramble(F, GolombSeq) 31: if filter then .Removing the features from the 2 + 6 ·σ(lengthT ) lowest magnitude coefficients 32: σs = [0.1853,0.1218,0.0865,0.0629,0.0423,0.0292,0.0214,0.0150] 33: lengths = [64,128,256,512,1024,2048,4096,8192] 34: for iin 1 to length(σs)do .This loop sets the value of σ 35: if lengthT ≤lengths(i)then .according to the value of lengthT 36: σ←σs(i) 37: sorted values, sorted indices ←sort(abs(C(:)), descending).Obtaining the indices of 38: indicesToDelete ←sorted indices(d(2 + 6 ·σ)·lengthTe:end).the lowest magnitude 39: rows IndicesToDelete, cols IndicesToDelete ←obtainIndices(indicesToDelete, C).coefs, 40: (F)∗(rows IndicesToDelete, cols IndicesToDelete)←2.which are removed by setting them 41: return (F)∗.to 2, a value not existing in T(composed of 0s and 1s) 42: procedure scramble(M,GolombSeq).To scramble/descramble a binary vector 43: (M)∗←M . or matrix Mby adding GolombSeq 44: for iin 1 to #rows(M)do 45: (M)∗(i, :) ←M(i, :) ⊕GolombSeq(1 + (i−1) ·#columns(M) : i·#columns(M)) 46: return (M)∗ 47: procedure obtainIndices(M,pointers).To translate unidimensional pointers into 48: r← dpointers/#columns(M)e.bidimensional indices for a matrix M 49: s←1 + module(pointers −1,#columns(M)) 50: return r,s . r are de indices for rows, sare the indices for columns 51: procedure zeros(M).To initialize a vector/matrix of zeros 52: zerosM ←M . of the same size as M 53: zerosM(1 : end, 1 : end)←0 54: return zerosM 55: procedure sum(M).To sum all the elements in a matrix/vector M 56: S←0 57: for iin 1 to #rows(M)do 58: for jin 1 to #columns(M)do 59: S←S+M(i, j) 60: return S 16 algorithms provided by [48], these are the choices for the following: •Digital signature of a keytag KT: The standardized Elliptic Curve Digital Signature Algorithm 256 [49], which performs signature-verification slightly faster (3.92 −6.56 Mcycles) than the other two algorithms authorised by the NIST, DSA [50] and RSA [51] with a 2048-bit key length. DSA was replaced by ECDSA because the latter operates with smaller numbers, and thus it is hard nowadays to find implementations of DSA supporting 2048 bits. On the other hand, RSA2048 has a similar overall performance (11.06 −0.29 Mcycles), but ECDSA produces a much shorter signature (512 bits vs 2048) with a roughly similar security level. Digital signature keys, PbIssuer-PrIssuer, shall be renewed every 1-3 years. As part of the checking of a digital signature, it is required to verify that the digital certificate of the signatory has not expired or been revoked, by means of Check Revocation Lists or by using the Online Certificate Status Protocol [52]. •Symmetric encryption of a keytag KT: the Advanced Encryption Standard (AES [53]), chosen by the NIST after a contest [54] with five finalists: MARS, RC6, Rjindael, Serpent and Twofish. Rjindael, designed by Joan Daemen and Vicent Rijmen was the winner, and it became the AES after some adjustments. It is considered the most secure symmetric algorithm and it is also the fastest of the five AES finalists, with an encryption/decryption speed of 12.6 cycles/byte. Regarding overhead, the key size is set to 128 bits and its block size is also 128 bits, so padding bits will be added if the data to be encrypted is not a multiple of this block size. A symmetric key shall be created to encrypt each keytag. •Asymmetric encryption of authorised users’ access keys SkU: RSA2048 [51], Public Key Cryptographic Standard #1 published by RSA Security Inc. The algorithm elGamal [55] would be the alternative, but RSA2048 is preferred because elGamal is not a standard. The block size of RSA2048 is 2048 bits, so there will be overhead if the data to be encrypted is not a multiple of this block size, and its performance for encryption-decryption is 0.29 −11.22 Mcycles per block. Asymmetric encryption keys, PbUsers-P rUsers, shall be renewed every 1-2 years. 3.5. Support for JPEG2000 compression The JPEG2000 algorithm is a standard for the efficient representation and interchange of digital images with different characteristics (scientific, medical, rendered graphics, etc.), allowing different imaging models, e.g. client/server, real-time transmission, image library archival, limited buffer and bandwidth resources. It was created by members of the Joint Picture Experts Group, comprising members of the International 17 Telecommunication Union Standardization Sector and the International Standardization for Organization. JPEG2000 provides low bit-rate operation with rate-distortion and improves the subjective image quality performance of the previous standard, JPEG. Although this standard is still not as widely used for natural images as its forerunner, it is widespread in medical imaging and included in the DICOM standard. According to the mean opinion score (MOS) of medical experts [56], this codec maintains good clinical quality at compression ratios up to 8-16 for magnetic resonance, ultrasound and X-ray images. Compared to JPEG, it presents a better image distortion-rate tradeoff and for an equal objective distortion (e.g. PSNR = 35 dB), it obtains a higher MOS. Both this compressor and the keytagging process share the use of wavelets, with the same filters, for a representation of the image adjusted to the properties of the human vision system. As a result, JPEG2000 compression causes no or very little distortion to the retrieved tags, as is demonstrated in Section 4.4. In addition to this, if the keytags association is integrated in the compression process, most of the runtime cost of the former is covered by the latter (see Section 4.5). Finally, JPEG2000 formats .jp2 and .jpx allow the embedding of metadata, which can be used to conveniently store the keytags. To ensure full compliance of compression with keytagging, the initial color transformation must be the irreversible TIC and the further tiling of the image must be set to its size. The last steps of the compression are independent from the keytagging. These are performing context modeling and bit-plane arithmetic coding, arranging the coded data in layers corresponding to quality levels and performing post-compression rate allocation. 4. Experimental evaluation The features of this algorithm that need to be experimentally evaluated are its robustness-capacity tradeoff when the image undergoes different image modifications, its specificity when the original image is replaced, its compatibility with JPEG2000 compression, its average runtime cost for different parameter configurations and its scalability when the image size is increased. Complementarily, Section 5 analyzes the security foundations of the keytagging method. 4.1. Evaluation setup The image test set is composed of 64 images, sized 512 ×512 px2, corresponding to different medical modalities and parts of the body: 18 •18 computed tomography (CT) images, gathered from [57]: 6 chest (Artifix), 6 dental area (Incisix) and 6 pelvis (Pelvix) images. •18 magnetic resonance images (MRI), gathered from [57]: 6 brain (Brainix), 6 knee (Knix) and 6 thoracic and lumbar area (MRIX) images. •12 positron emission tomography (PET)-CT images from a whole body scan, gathered from [57] (PETCETIX). •16 ultrasound images (US): 4 mode B echocardiograms provided by Lozano Blesa Hospital in Zaragoza, 4 mode M, 4 Doppler color, 4 pulsed and continuous wave Doppler. The image test set is processed with typical modifications in the medical context, which are indexed for reference in Figure 2 and Tables 3 and 5: •1-10. Compression: JPEG with quality factors 75%, 50%, 25%, 15% and 5% (Figure 2: 5), JPEG2000 with compression ratios 4:1, 8:1, 16:1, 32:1 and 64:1 (Figure 2: 10). •11-18. Common image processing: βcorrection −0.3, −0.5 (Figure 2: 12), +0.4 and +0.7 (Figure 2: 14), contrast stretching 2% and 10% (Figure 2: 16), color inversion (Figure 2: 17) and local histogram equalization (Figure 2: 18). •19-27. Local operations: edge sharpening (Figure 2: 19), median filtering 5 ×5 and 7 ×7 (Figure 2: 21), averaging mask 5 ×5 and 7 ×7 (Figure 2: 23), Gaussian filtering 7 ×7 and 11 ×11, and motion blur with 7 and 9 pixels displacement (Figure 2: 27). •28-33. Geometric transformations: clipping the ROI, rotating 90, 180 and 270, horizontal and vertical flipping (Figure 2: 33). •34. Insertion of visible annotations (Figure 2: 34). •35. Blackening private data parts for anonymization. and attempting to distort the tag or part of it, by means of a watermark-based attack: •36-40. Modification of l= 64 (Figure 2: 34), l= 128, l= 256, l= 512, l= 1024 and l= 2048 sign bits from the highest-level wavelet coefficients of the image. 19 Figure 2: ROI of a 512 ×512 px2PET-CT image, original (0) and resulting from the application of JPEG QF=5% and JPEG2000 CR 64:1 compression (5,10), βcorrection −0.5 and +0.7 (12,14), 10% contrast stretching (16), color inversion (17), local histogram equalization (18), edge sharpening (19), median filter 7×7 (21), image averaging 7 ×7 (23), motion blur 9 (27), vertical flipping (33), insertion of annotations (34) and watermark-based attack with l=128 (36). 20 The robustness of keytagging to those modifications is evaluated by measuring the distortion of the retrieved tags ˜ Twith respect to the original Tassociated to Ior, by means of the Normalized Hamming Distance [58]: NHD =˜ T⊕T length(T),(1) where Tand ˜ Tare binary vectors and ⊕is the XOR logical operator. Those ˜ Tthat endure the image modifications end up very similar to Tand obtain NHD ≈0, while those ˜ Twhich are very dissimilar to Tobtain NHD ≈0.5, e.g. when retrieved from very degraded versions of Ior. The Normalized Hamming Distance is very useful to determine how much redundancy needs to be added to overcome the distortion of ˜ Tby means of some redundant coding. Simulation setup 1: The image modifications described above are applied to the test set. A fixed-length random tag Tis associated to each image, by means of keytags KT, retrieving ˜ Tfrom the corresponding modified image ˜ Ior. The resulting NHD is calculated, and the process of keytag association-tag retrieval is repeated for different tag lengths and for the three types of keytags: stable, semistable and volatile. The results are depicted in Table 3, which also shows how much distortion is caused to ROIg(the area of Ior used for the association of keytags) by each modification (which results in a ˜ ROIg), measured with two different indices, the classic Peak Signal-to-Noise Ratio: PSNR(I, ˜ I) = 20 ·log10(max(I(:)) r1 #rows(I)·#columns(I)·P#rows(I) i=1 P#columns(I) j=1 ||I(i, j)−˜ I(i, j)||2 ),(2) and also with the mean Structural SIMilarity index: MSSIM(I, ˜ I) = 1 M M X j=1 (2 ·µIjµ˜ Ij+ (0.01 ·L)2)·(2 ·PN i=1 wi·(Ii−µI)(˜ Ii−µ˜ I) + (0.03 ·L)2) (µ2 Ij+µ2 ˜ Ij+ (0.01 ·L)2)·(PN i=1 wi·((Ii−µI)2+ (˜ Ii−µ˜ I)2) + (0.03 ·L)2),(3) where Lis the dynamic range of the pixel values (255 for 8-bit grayscale images), wicorrespond to an 11×11 circular-symmetric Gaussian weighting function with standard deviation 1.5 samples (normalized so that PN i=1 wi= 1), µI=PN i=1 wi·Ii,Mis the number of local windows in the image and Nthe number of pixels in the local window. Further details about this index may be consulted in [59] and the implementation of the MSSIM algorithm used in this work is available online at [60]. The PSNR is a simple mathematical measure that directly compares the value of the pixels from the two images. Although it is very popular, the correlation between this measure and the visual perception of 21 quality is not tight enough in many cases. The MSSIM assumes that the human vision system is highly adapted for extracting structural information from images. Thus, it basically compares local patterns of pixel intensities that have been normalized for luminance and contrast. Simulation setup 2: This follows the process of setup 1 but considers each image as a modified version of the rest. This setup is intended to evaluate the degree of distortion of tags retrieved from images that are different from the original ones. Since some images of the test set come from the same patient and acquisition session, some pairs of ROIgare quite similar: five have PSNR > 20 dB and MSSIM > 0.67, and may obtain low NHD values. 4.2. Robustness-capacity In the case of stable and semistable tags, there is a tradeoff between their lengths and their robustness to image modifications. Naturally, this occurs because the keytag association algorithm sorts and selects image features according to their degree of robustness, in descending order. Nonetheless, not all the modifications have the same impact on the image. Figure 1 illustrates the effect of several modifications from Section 4.1 on a medical image, and Table 3: column 2 (unshaded cells) shows the average PSNR and MSSIM of the image test set after each modification. JPEG2000 compression is one of the most typical modifications. It maintains the image clinical value with compression factors around 16:1, obtaining PSNR ≃42 dB and MSSIM ≃ 0.99. Higher compression ratios may cause unacceptable distortion, so they are not recommended. Common image processing techniques can help to find a better representation of the image. βcorrection changes the brightness and can be reversed; contrast stretching, local histogram equalization and color inversion help to enhance the details of the image, and the latter can be totally reversed. In the case of local operations, edge sharpening helps to enhance certain details, so it only modifies volatile parts of the image. The rest of the local operations modify both the semistable and volatile parts of the image, high and some middle frequencies, leaving only the stable parts intact. There are also several image modifications that neither affect the image quality nor distort its associated tags. These are clipping the ROI, since there are no keytags associated outside this region; geometrical changes, which are detected and reversed by means of a resynchronization step depicted in Section 5.2; inserting annotations, usually in the borders of the ROI or outside; and darkening private data, which is most often located outside the ROI. Finally, it was observed that modifying the sign of the most significant coefficients in the highest decomposition level is the most effective manner to willfully destroy stable tags, but at the cost of completely destroying the image as well, since the PSNR becomes ≤13. 22 Table 3: Average distortion of variable-length stable, semistable and volatile tags when the image test set (unshaded cells) and its interpolated counterpart (lightly shaded cells when calculating aWL according to Algorithm 1, shaded cells when maintaining the aWL of the original test set) undergo common modifications in the medical context (see Sections 4.1 and 4.6). Image Image quality Distortion of Distortion of Distortion of size —PSNR(dB),stable tags semistable tags volatile tags —px2—MSSIM— —NHD (%)— —NHD (%)— —NHD (%)— hhhhhhhhhhhhhh h #. Operation Length(T)- - 128/BCH 256/BCH 512/BCH 1024/BCH 2048 128/BCH 256/BCH 512/BCH 1024/BCH 2048/BCH 4096/BCH 8192/BCH 16384/BCH 64 128 256 Compression 1. JPEG QF=75% 512 ×512 37.7, 0.98 0 0 0 0 0 0 0 0 0 0.2/0 1.2/0.3 4.2/10.6 11.8/19.8 48.4 48.4 49.4 JPEG QF=30% 1024 ×1024 38.9, 0.98 0 0 0 0 0 0 0 0 0 0 0.4/0 2.4/4.5 6.5/13.8 50.8 50 49.8 JPEG QF=30% 1024 ×1024 38.9, 0.98 0 0 0 0 0 0 0 0 0.3/0 1/0 2.7/7.9 8.2/14.9 15.9/23.5 50.8 50 49.8 2. JPEG QF=50% 512 ×512 35.2, 0.97 0 0 0 0 0 0 0 0 0.3/0 1.2/0 3.9/7.7 8.7/16.6 18.5/26.1 48.4 49.2 49.8 JPEG QF=20% 1024 ×1024 37.0, 0.97 0 0 0 0 0 0 0 0 0 0.2/0 1.2/0.4 4.5/10.9 11.1/18.8 49.2 50.2 50.1 JPEG QF=20% 1024 ×1024 37.0, 0.97 0 0 0 0 0 0 0 0.2/0 1/0 2.5/4.4 6.3/13.1 13.6/22 21.3/29.6 49.2 50.2 50.1 3. JPEG QF=25% 512 ×512 33.2, 0.95 0 0 0 0 0.2 0 0 0.6/0 1.4/0 4/7.8 8.8/17.2 17.2/26.3 26.3/33.5 50 49.6 50.8 JPEG QF=15% 1024 ×1024 35.3, 0.92 0 0 0 0 0.2 0 0 0 0.1/0 0.6/0 2.5/7.9 8.5/14.9 14.9/22.3 50 49.2 49.9 JPEG QF=15% 1024 ×1024 35.3, 0.92 0 0 0 0 0 0 0 0.4/0 1.4/0 4.2/9.1 10.1/17.2 18.5/26.2 25.8/32.6 50 49.2 49.9 4. JPEG QF=15% 512 ×512 31.4, 0.92 0 0 0 0 1.9 0 0.8/0 1.4/0 4.7/7.4 9.7/15.3 17/25 26.6/33.8 34/38.6 49.2 50.8 49.6 JPEG QF=10% 1024 ×1024 33.2, 0.92 0 0 0 0 1 0 0 0 0.5/0 2.2/4.4 6.7/13.7 14.2/23.4 23.9/31.5 50.8 49.8 49.8 JPEG QF=10% 1024 ×1024 33.2, 0.92 0 0 0 0 0.3 0 0.4/0 1.4/0 3.9/8.2 8.7/15.2 15.9/23.7 23.8/31.3 32.2/37.5 50.8 49.8 49.8 5. JPEG QF=5% 512 ×512 26.7, 0.80 0 0 0.7/0 4.5/5.9 13.6 3.5/10.8 7.2/10.2 12.6/16.6 18.8/23.9 27/32.6 34.3/39.2 40.1/43.9 44.5/45.8 46.9 50 49.8 JPEG QF=5% 1024 ×1024 28.9, 0.74 0 0 0 0/2.6 6.3 0 0.4/0 1.4/0 4.3/10.4 10.5/17.4 18.6/26.4 26.9/34 35/39.4 50.8 50.8 49.7 JPEG QF=5% 1024 ×1024 28.9, 0.74 0 0 0 0.9/0 3.8 3.1/9.1 4.5/10 8/15.6 14/20.9 20.6/27.6 27.6/33.3 34.1/39.3 40.2/43.5 50.8 50.8 49.7 6. JPEG2000 CR 4:1 512 ×512 50.5, 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 51.6 50 50 JPEG2000 CR 16:1 1024 ×1024 50.2, 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 50 50 50 JPEG2000 CR 16:1 1024 ×1024 50.2, 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0.3/0 50 50 50 7. JPEG2000 CR 8:1 512 ×512 47.6, 0.99 0 0 0 0 0 0 0 0 0 0 0 0 1.7/7.9 50 49.2 50.2 JPEG2000 CR 32:1 1024 ×1024 47.3, 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0.7/0.4 50 49.2 50.2 JPEG2000 CR 32:1 1024 ×1024 47.3, 1.0 0 0 0 0 0 0 0 0 0 0 0 0.3/0 2.7/9.7 50 49.2 50.2 8. JPEG2000 CR 16:1 512 ×512 42.7, 0.99 0 0 0 0 0 0 0 0 0 0 0.2/0 1.7/7.2 8.7/16.1 51.6 49.2 50.4 JPEG2000 CR 64:1 1024 ×1024 42.0, 0.99 0 0 0 0 0 0 0 0 0 0 0.1/0 1.6/4.3 6.4/13.7 50 49 50.4 JPEG2000 CR 64:1 1024 ×1024 42.0, 0.99 0 0 0 0 0 0 0 0 0 0.2/0 1.6/1.3 5.2/12 12.2/20 50 49 50.4 9. JPEG2000 CR 32:1 512 ×512 37.9, 0.96 0 0 0 0 0.2 0 0 0 0 0.9/1.2 5.1/11.9 12.3/21.8 21.3/29.7 49.2 48.4 48.8 JPEG2000 CR 128:1 1024 ×1024 37.8, 0.96 0 0 0 0 0.2 0 0 0 0.1/0 0.9/0.4 4.6/11.9 11.4/21.4 21.3/29.8 50 49.8 50.2 JPEG2000 CR 128:1 1024 ×1024 37.8, 0.96 0 0 0 0 0 0 0 0.7/0 2.5/8.1 7/14.7 12.5/22.4 20.1/30.4 28.1/36.4 50 49.8 50.2 10. JPEG2000 CR 64:1 512 ×512 33.6, 0.92 0 0 0 0.2/0 3.3 0 0 0.4/0 2.8/7 7.8/16.5 16.4/25.9 27.5/34.1 35.2/39.6 51.6 50 50 JPEG2000 CR 256:1 1024 ×1024 33.7, 0.91 0 0 0 0.1/0 3.4 0 0 0.3/0 2.4/5.8 7.8/15 16.5/25.3 26.4/33.7 34.4/39.2 50 49.6 49.7 JPEG2000 CR 256:1 1024 ×1024 33.7, 0.91 0 0 0 0.2/0 2.3 2.3/7 4.5/7.2 7.3/11 13.1/18.5 19.7/27.6 27/35.5 33.6/40.4 39.8/43.8 50 49.6 49.7 Common image processing 11. βcorrection −0.3 512 ×512 20.7, 0.85 0 0 0 0 0.3 0 0 0 0 0 0 0.2/0 0.7/0 50 49.6 49.8 βcorrection −0.3 1024 ×1024 21.1, 0.80 0 0 0 0 0.3 0 0 0 0 0 0 0.2/0 0.6/0 48.8 49.6 48.6 βcorrection −0.3 1024 ×1024 21.1, 0.80 0 0 0 0 0 0 0 0 0 0 0.2/0 0.4/0 0.8/0 48.8 49.6 48.6 12. βcorrection −0.5 512 ×512 16.1, 0.60 0 0.4/0 0.2/0 0.8/0 2 0 0 0.1/0 0.2/0 0.5/0 1.1/0 2.1/0.7 4.6/8.8 50 50 49.6 βcorrection −0.5 1024 ×1024 16.3, 0.50 0 0.2/0 0.2/0 0.7/0 2.1 0 0 0.1/0 0.3/0 0.7/0 1.3/0 2.9/0.6 5/5.3 50 50.8 49.8 βcorrection −0.5 1024 ×1024 16.3, 0.50 0 0.4/0 0.2/0 0.7/0 1 0 0.8 1.1/0 1.3/0 1.8/0 3/0.3 4.3/5.7 7.1/10.4 50 50.8 49.8 13. βcorrection +0.4 512 ×512 17.1, 0.74 0 0 0 0 0.1 0 0 0 0 0.1/0 0.2/0 0.2/0 0.3/0 50 49.2 49 βcorrection +0.4 1024 ×1024 17.1, 0.71 0 0 0 0 0.1 0 0 0 0 0 0.2/0 0.3/0 0.4/0 47.7 48 48.7 βcorrection +0.4 1024 ×1024 17.1, 0.71 0 0 0 0 0 0 0 0 0 0.2/0 0.3/0 0.4/0 0.5/0 47.7 48 48.7 14. βcorrection +0.7 512 ×512 10.7, 0.49 0 0 0.1/0 0.5/0 1 0 0 0.2/0 0.6/0 0.8/0 1/0 1.4/0 1.6/0 51.6 49.6 50.4 βcorrection +0.7 1024 ×1024 10.7, 0.45 0 0 0.2/0 0.5/0 1.1 0 0 0.2/0 0.5/0 1/0 1.2/0 1.7/0 2.2/0 49.2 50.4 50.1 βcorrection +0.7 1024 ×1024 10.7, 0.45 0 0 0.2/0 0.5/0 0.5 0 0.8/0 1/0 1.4/0 1.7/0 1.9/0 2.3/0 2.8/0 49.2 50.4 50.1 15. Contrast stretching 2% 512 ×512 18.1, 0.87 0 0 0 0.1/0 0.2 0 0 0 0.2/0 0.3/0 0.6/0 0.9/0 1/0 50 49.2 49.2 Contrast stretching 2% 1024 ×1024 18.1, 0.72 0 0 0 0.1/0 0.2 0 0 0.2/0 0.2/0 0.7/0 1/0 1.3/0 1.5/0 49.6 49.4 49 Contrast stretching 2% 1024 ×1024 18.1, 0.72 0 0 0 0.1/0 0.2 1.6/0 0.4/0 0.5/0 0.8/0 1.7/0 1.9/0 1.9/0 1.9/0 49.6 49.4 49 16. Contrast stretching 10% 512 ×512 16.6, 0.83 0 0 0 0.3/0 0.5 0 0 0.1/0 0.3/0 1.5/0 1.7/0 1.8/0 1.9/0 47.7 50 50 Contrast stretching 10% 1024 ×1024 16.2, 0.66 0 0 0.2/0 0.2/0 0.7 0 0 0.3/0 1.1/0 1.5/0 2.2/0 2.7/0 3/0 50 50 49.8 Contrast stretching 10% 1024 ×1024 16.2, 0.66 0 0 0.2/0 0.5/0 0.5 1.6/0 1.4/0 1.5/0 3.5/0 2.9/0 3.4/0 3.5/0 3.7/0 50 50 49.8 17. Invert colors Any size 2.7, -0.10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18. Local hist. equal. 512 ×512 21.3, 0.86 0 0 0 0.1/0 0.3 0 0 0 0 0.1/0 0.3/0 0.5/0 0.7/0 50 50 50 Local hist. equal. 1024 ×1024 21,2, 0.81 0 0 0 0.1/0 0.4 0 0 0 0.1/0 0.1/0 0.4/0 0.8/0 1.1/0 49.6 50.2 49.4 Local hist. equal. 1024 ×1024 21,2, 0.81 0 0 0 0.1/0 0.1 0 0 0.2/0 0.2/0 0.6/0 1/0 1.5/0 1.7/0 49.6 50.2 49.4 23 Table 3: Average distortion of variable-length stable, semistable and volatile tags when the image test set (unshaded cells) and its interpolated counterpart (lightly shaded cells when calculating aWL according to Algorithm 1, shaded cells when maintaining the aWL of the original test set) undergo common modifications in the medical context (see Section 4.1 and 4.6). Image Image quality Distortion of Distortion of Distortion of size —PSNR(dB),stable tags semistable tags volatile tags —px2—MSSIM— —NHD (%)— —NHD (%)— —NHD (%)— hhhhhhhhhhhhhh h #. Operation Length(T)- - 128/BCH 256/BCH 512/BCH 1024/BCH 2048 128/BCH 256/BCH 512/BCH 1024/BCH 2048/BCH 4096/BCH 8192/BCH 16384/BCH 64 128 256 Local operations 19. Edge sharpening 512 ×512 24.4, 0.89 0 0 0 0.1/0 0.5 0 0 0 0 0.2/0 0.4/0 0.6/0 1.2/0 48.4 48.8 48.8 Edge sharpening 1024 ×1024 25.4, 0.89 0 0 0 0.1/0 0.5 0 0.6/0 0.5/0 0.8/0 0.8/0 1.1/0 1.7/0 2.4/0.1 49.2 49.4 49.7 Edge sharpening 1024 ×1024 25.4, 0.89 0 0 0 0.1/0 0.3 1.6/0 2.3/0 2.8/0 2.6/0 2.7/0 2.8/0 3.5/0.6 4.6/2.7 49.2 49.4 49.7 20. Median filter 5 ×5 512 ×512 27.8, 0.92 0 0 0 0.2/0 1 5.5 5.7/6.8 9.1/11 13.1/16.3 20.4/22 27.3/28.5 31.8/33.4 35.8/37.7 50 49.2 50 Median filter 11 ×11 1024 ×1024 27.8, 0.92 0 0 0 0.4/0 1.6 4.3/6.6 5.9/7.8 10.6/13.6 15.6/17.7 23.3/25.3 29.9/31.6 35.7/36.3 39.1/39.9 48.4 50.4 49.8 Median filter 11 ×11 1024 ×1024 27.8, 0.92 0 0 0 0.4/1 5.7 41/43.8 40.4/42.7 40.5/43.9 41.2/44.8 42/47.3 44.7/48.5 46.6/49.2 47.2/47.9 48.4 50.4 49.8 21. Median filter 7 ×7 512 ×512 25.5, 0.87 0 0 0.8/0 1.9/0 4.8 23.4/23.2 25/24.5 21.6/28.3 27/32.5 32/37.2 36.3/40.5 39.4/42.4 41.5/44.3 50.8 50 50 Median filter 14 ×14 1024 ×1024 25.4, 0.88 0 0 1/0 2.1/0 4.8 22.3/22.8 21.3/23.8 23.1/27.8 25.7/32.2 32.6/36.6 37.2/40.4 40.3/43.6 43.7/45.2 50 50 49.8 Median filter 14 ×14 1024 ×1024 25.4, 0.88 0 0 1/0 2.3/9.1 13.4 46.1/45.2 46.1/48.2 45.9/47.6 45.6/47 47.2/47.9 47.1/48 47.8/47.4 47.7/49.2 50 50 49.8 22. Image averaging 5 ×5 512 ×512 26.2, 0.91 0 0 0 0.2/0 1 16.8/17.4 29.1/22.3 32.8/28.1 36.7/36.6 40.7/37.9 45.5/44.4 49.2/45.9 50/46.9 49.2 49.6 50.4 Image averaging 11 ×11 1024 ×1024 26.3, 0.90 0 0 0.2/0 0.5/0 1.8 12.1/18.9 18.6/19.7 25.1/27.2 32/35.7 40.6/41.5 47.9/46.9 51.7/49.3 51.7/49.9 50.8 50.4 49.6 Image averaging 11 ×11 1024 ×1024 26.3, 0.90 0 0 0.1/0 0.6/6.1 11.5 77.3/77.5 74.8/77.9 72/73.9 69/70.1 64.7/65 63/62.9 61.2/58.8 56.6/57.4 50.8 50.4 49.6 23. Image averaging 7 ×7 512 ×512 23.8, 0.85 0 0 1.3/0 2.6/0.3 5.5 53.9/49.6 49.4/51.9 50.9/53.5 50.3/54.9 54.7/55.7 54.8/55.1 54.1/54.4 54/53.1 48.4 48.8 50.2 Image averaging 13 ×13 1024 ×1024 25.1, 0.87 0 0 0.6/0 1.7/0 4.1 35.9/35.7 35.4/36.5 39.3/41.7 44.6/49.5 50.5/54.1 52/54.9 55.5/55.2 54.4/53.4 50.4 50.6 50.6 Image averaging 13 ×13 1024 ×1024 25.1, 0.87 0 0 0.8/0 1.9/12.5 19.7 81.3/76.4 80.5/77.1 77.6/74.4 73.2/70.2 67.3/67.7 63.1/65.7 60.9/61.2 58.1/54.9 50.4 50.6 50.6 24. Gaussian filtering 7 ×7 512 ×512 25.7, 0.90 0 0 0.2/0 0.5/0 1.7 3.1/3.3 4.5/5.5 7.3/10.9 12.4/17.6 20.5/22 25.5/29.3 31.4/33.4 36.3/38.1 50 50 49.6 Gaussian filtering 14 ×14 1024 ×1024 26.2, 0.90 0 0 0 0.3/0 1.3 0 0.8/0 2.3/1 4.9/6.1 8.9/10.2 12.2/16.8 17/21.1 23.8/26.4 50.8 50.4 50.6 Gaussian filtering 14 ×14 1024 ×1024 26.2, 0.90 0 0 0 0.4/0 2.9 3.5/4.3 3.9/6.9 7.6/11.1 12.4/15.8 16.8/22.1 20.8/26.1 26.6/32 32.5/35.5 50.8 50.4 50.6 25. Gaussian filtering 11 ×11 512 ×512 24.4, 0.89 0 0 0.4/0 1.1/0 2.9 4.7/6.1 6.3/6.8 9.6/12 14.3/20.7 23.8/26 29.2/30.7 33.4/35.5 38.1/39.2 51.6 50.4 50.2 Gaussian filtering 17 ×17 1024 ×1024 25.1, 0.87 0 0 0 0.1/0 0.9 0.8/0 2/0 4/3.6 6.7/6.9 10.4/11.7 14.3/17.7 19.3/22.8 25/27.7 50.8 50 49.4 Gaussian filtering 17 ×17 1024 ×1024 25.1, 0.87 0 0 0 0.2/0 2.9 5.5/7.9 7.8/9.5 10.2/13.5 14.3/17.9 19.2/24.7 23.5/28.3 27.6/33.2 32.9/36.8 50.8 50 49.4 26. Motion blur 7 512 ×512 27.7, 0.92 0 0 0.4/0 0.8/0 1.7 24.6/19.5 20.3/20.3 21.4/21.1 22.2/22.9 23.7/24.3 27.6/29 30.2/31.2 32.9/32.8 51.6 50.8 50 Motion blur 15 1024 ×1024 27.3, 0.92 0 0 0.4/0 1.2/0 2.7 25.8/25.2 23/24.6 23.1/22.1 23.1/22.1 23/24.3 24.5/26.2 27.3/29 30.1/30.3 49.2 49.6 49.4 Motion blur 15 1024 ×1024 27.3, 0.92 0 0 0.6/0 1.5/0.6 11.4 25.8/24.6 24.8/21.8 21.3/20.8 22/23.2 24.2/24.6 25.5/26.9 28.8/28.3 28.9/29 49.2 49.6 49.4 27. Motion blur 9 512 ×512 26.0, 0.88 0 0 2.1/0 3.6/0.2 6.3 33.2/32.2 31.6/30.5 27.1/28.4 29.5/28.6 29.6/29.9 32.5/33.6 35/36.1 36.3/35.7 51.6 50.8 50.4 Motion blur 17 1024 ×1024 26.7, 0.89 0 0 1.2/0 2.5/0 4.8 30.9/28.3 27.9/27 27.1/26.5 26.1/25.9 25.1/26.6 26.5/29 29.7/30.2 31.8/32.5 51.2 50 50.3 Motion blur 17 1024 ×1024 26.7, 0.89 0 0 1.4/0 2.9/1.5 15.7 18.8/18 17.8/18.9 20.3/20.4 21.2/22.6 23.1/25.7 25.4/27.7 28.1/29.7 30.5/31.1 51.2 50 50.3 Geometrical transformations 28. Clipping the ROI Any size Inf, 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 29. Rotating 90◦Any size 12.2, 0.26 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30. Rotating 180◦Any size 12.6, 0.29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 31. Rotating 270◦Any size 12.2, 0.24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32. Horizontal flipping Any size 14.8, 0.41 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33. Vertical flipping Any size 12.9, 0.31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 34. Inserting annotations 512 ×512 28.7, 0.94 0 0 0 0 0.2 0 0 0 0 0 0 0.1/0 0.2/0 0.5 0.7 0.9 Inserting annotations 1024 ×1024 28.4, 0.94 0 0 0 0 0.2 0 0 0 0 0 0 0.1/0 0.2/0 0.7 0.9 1.0 Inserting annotations 1024 ×1024 28.4, 0.94 0 0 0 0.1/0 0.3 0 0 0 0 0 0 0.1/0 0.2/0 0.7 0.9 1.0 35. Darken private data Any size Inf, 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Watermark-based attack 36. l= 128 512 ×512 13.0, 0.29 51.5/24.1 24.3/24.2 24.2/18.7 19.0/19.2 19.7 10.2/8.8 9.0/11.2 13.6/14.4 16.2/20.7 20.4/19.8 20.7/20.4 20.9/18.6 20.2/20.5 48.4 47.7 48.5 l= 128 1024 ×1024 12.2, 0.27 48.2/25.3 23.3/23.7 24.1/17.6 19.4/19.0 20.3 12.1/10.4 9.9/13.1 13.2/15.6 16.7/19.3 19.9/20.2 21.1/20.5 21.3/21.5 21.5/20.9 53.4 54.2 53.8 l= 128 1024 ×1024 12.2, 0.27 50.5/23.6 23.3/23.1 22.2/19.7 20.0/18.2 19.7 14.3/14.5 14.9/15.6 16.7/17.9 18.3/19.8 20.4/20 20.7/20.1 20.9/21.3 20.5/19.7 53.4 54.2 53.8 37. l= 256 512 ×512 12.7, 0.28 40.8/36.1 54.7/35.8 36.4/25.4 25.3/24.0 24.4 8.2/8.8 9.2 10.8/11 14.8/17.8 18.8/19.2 19.6/19.3 20.4/20.1 21.4/20.7 47.7 46.9 47.4 l= 256 1024 ×1024 12, 0.26 40.6/36.4 52.4/34.8 38.4/27.4 26.3/22.0 23.9 8.9/9.2 9.6/10.3 11/12.4 14.5/15.5 18.5/19.1 19.3/19.4 19.9/19.2 20.2/21.6 49.7 49.9 50.3 l= 256 1024 ×1024 12, 0.26 42.8/38.0 53.9/36.8 37.5/26.4 25.7/23.2 23.8 8.2/8.4 9.2/9.5 10.8/13.3 14.8/16.6 18.8/19.2 19.6/20.1 20.4/20 20.9/21.1 49.7 49.9 50.3 38. l= 512 512 ×512 12.3, 0.22 51.2/56.3 51.3/55.4 55.6/27.2 27.0/26.9 27.3 10.2/10.4 10.7/11.1 12.7/13 15.4/16.9 17.6/18.9 19.8/20.3 20.8/20.5 21.4/20.9 47.7 47.7 47.8 l= 512 1024 ×1024 11.9, 0.23 49.3/54.3 51.5/54.4 53.6/26.1 25.0/24.2 22.3 9.7/10.1 10.4/11.3 12.1/13.1 14.8/16.7 17.1/17.9 18/19.8 20.2/20.3 20.1/20.6 51.3 51.5 51.1 l= 512 1024 ×1024 11.9, 0.23 51.2/56.3 51.3/55.4 55.6/27.2 27.0/26.9 27.4 9.1/9.2 9.9/10.8 11.8/12.5 14.9/15.2 16.6/18.8 18.9/19.5 20.3/20.6 20.5/19.8 51.3 51.5 51.1 39. l= 1024 512 ×512 12.5, 0.26 43.9/40.8 53.6/41.6 41.5/56.6 57.8/46.3 46.4 11.7/12.1 12.5/13.3 15.4/15.5 16.1/18.6 17.3 19.3/20.3 21.2/21.8 22.6/21.6 50 49.2 50.1 l= 1024 1024 ×1024 12.7, 0.28 45.2/41.3 54.3/42 42.7/55.3 58.3/47.5 46.8 12.2/12.8 13.2/14.9 15.5/15.1 16.2/16.8 17/17.7 18.9/20.3 21/20.9 21.3/21.7 49.8 50.2 50 l= 1024 1024 ×1024 12.7, 0.28 44.5/41 53.9/41.9 42.2/56.9 58.1/46.7 46.6 11.5/12 12.2/13.1 14.9/15.2 15.8/17.1 16.9/18.5 19.2/20.2 21.3/21.1 20.7/20.3 49.8 50.2 50 40. l= 2048 512 ×512 12.3, 0.23 52.1/56.4 53.1/56.6 56.6/57.7 57.5/58.0 58.6 11.3/11.9 12.5/12.4 13.6/16.2 16.7/17.6 18.5/19.8 20.3/21.5 21.9/21 22.3/21.6 48.4 49.2 49.3 l= 2048 1024 ×1024 12.3, 0.24 53.3/55.9 54.2/55.2 56/54.4 54.9/54.4 55.6 11.7/11.9 12.8/13.3 14.1/15.9 16.8/18.2 18.3/18.4 20.2/20.8 21.5/22.1 22.1/19.8 50.4 50.2 49.8 l= 2048 1024 ×1024 12.3, 0.24 51.7/54.4 52.7/55.5 54.1/55.2 57.1/55.9 56.8 11.9/12.7 13.1/13.9 14.2/16.6 17.3/18 18.8/19.7 20.4/21.7 22.1/21 21.7/22.2 50.4 50.2 49.8 Table 4: Distortion of variable-length stable, semistable and volatile tags when retrieved from an image different from the one they were associated to (see Sections 4.1 and 4.3). Distortion of Distortion of Distortion of stable tags semistable tags volatile tags —NHD (%)— —NHD (%)— —NHD (%)— ```````````` Measure Length(T)128/BCH 256/BCH 512/BCH 1024/BCH 2048 128/BCH 256/BCH 512/BCH 1024/BCH 2048/BCH 4096/BCH 8192/BCH 16384/BCH 64 128 256 Mean 48.8 49.2/49.3 49.7 49.8 49.9 49.6 49.9/50 50 50.1 50 50 50 50 50 49.9 50 Standard deviation 4.5/5 3.7/3.6 2.6 1.9 1.3 4/3.9 2.8 2 1.3 1 0.6 0.5 0.4 5 3.5/3.6 2.5 Minimum 13.3/12.5 18.8/19.1 24.2/25.2 30.6 36.7 15.6/15.9 23.6 37.9/37.8 40.7/42.1 44.7/44 46.1/46.3 47/47.1 47.4 31.2/32.3 38.3/34.3 40.4/40 24 Table 5: Effect of JPEG2000 compression —with compression ratios of 8, 16, 32— on the distortion of stable and semistable tags when the image test set undergoes other common modifications in the medical context. See also the original distortion in Table 3. Image size Additive distortion Additive distortion —px2— —NHD (%)— —NHD (%)— of JPEG2000 compression of JPEG2000 compression with CR = 8, 16, 32 in with CR = 8, 16, 32 in stable tags semistable tags hhhhhhhhhhhhhh h #. Operation Length(T)- 1024-BCH 2048 128-BCH 256-BCH 512-BCH 1024-BCH 2048-BCH 4096-BCH 8192 Common image processing 11. βcorrection −0.3 512 ×512 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0 0.4 12. βcorrection −0.5 512 ×512 0 0 0 0.2 0.1 0.3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.3 0.6 2.8 2.7 3.2 13. βcorrection +0.4 512 ×512 0 0 0 0 0.1 0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0.1 0.1 14. βcorrection +0.7 512 ×512 0 0 0 0 0 0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.7 0.8 15. Contrast stretching 2% 512 ×512 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0.1 0.4 16. Contrast stretching 10% 512 ×512 0 0 0 0.1 0.1 0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0.3 0.8 17. Invert colors 512 ×512000 000 000000000000000000000 18. Local hist. equal. 512 ×512 0 0 0 0.1 0.1 0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0.2 Local operations 19. Edge sharpening 512 ×512 0 0 0 -0.1 -0.1 0 0 0 0 0 0 0 0 0 0 0 0.1 0 0 0 0 0 0 0.1 0 0.2 0.2 20. Median filter 5 ×5 512 ×512 0 0 0 0 0 0 -0.4 -0.5 0.7 -0.4 -0.3 -1 -1.2 -1.1 -2.4 -1.4 -2.1 -2.2 -2.2 -2.4 -3.4 -2.2 -2.2 -4 -2 -2.6 -3.2 21. Median filter 7 ×7 512 ×512 0 0 0 0 -0.1 -0.4 -1.1 -0.9 -1.5 -1.2 -1.3 -1.1 -0.7 -0.5 0.5 -1.4 0.4 -1.4 -0.3 -0.9 -0.5 -0.7 -0.5 -1.6 0.8 0.3 -0.6 22. Image averaging 5 ×5 512 ×512 0 0 0 0 0.1 0.2 -1.2 -1.5 -1.4 -0.8 -1.9 -2.4 -1.8 -1.6 -1.1 -2.4 -3.5 -2.8 -2.4 -2.5 -3.4 -4.6 -2.4 -5 -2.9 -3.9 -4.4 23. Image averaging 7 ×7 512 ×512 0.3 0 −0.3 0.5 0.2 0.3 -1.2 -2.7 -0.5 -2.9 -1.9 -2.5 -1.1 -3.9 -3.3 -3.5 -3.3 -4.9 -2.4 -3.4 -2.6 -2.7 -4.8 -4.8 -2.7 -3.3 -3 24. Gaussian filtering 7 ×7 512 ×512 0 0 0 0.2 0.2 0.2 5.4 5.6 5.4 5.8 5.3 5.4 3.7 6.5 4.2 6.3 4.2 6.3 4.4 5.4 5 4.3 4.6 3.7 5.7 5.6 5.1 25. Gaussian filtering 11 ×11 512 ×512 0 0 0 0.3 0.4 0.2 3.1 1.8 2.8 2 3.1 1.8 4.3 2.2 4.1 1.7 4.3 1.6 4.6 3.9 4.6 3.1 4.8 2.7 3.9 2.8 2.8 26. Motion blur 7 512 ×512 0 0 0 0.3 0.2 0.1 0 0.7 0 0.3 -0.1 -0.6 -0.5 0.2 -0.5 -0.4 -0.8 -0.5 -0.7 0.5 -1 -0.4 0.1 0 -1.8 -1.9 -1.1 27. Motion blur 9 512 ×512 0 0 -0.1 0 0 -0.2 0.1 0.5 0 0.9 -0.2 -0.4 -0.4 0.3 0.7 0.1 0.4 0.4 0.3 0.5 1 0.2 0.2 0 -0.1 0.4 -0.3 34. Inserting annotations 512 ×512 0 0 0 -0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0.2 The results in Table 3 (unshaded cells cells, left side of slashes), demonstrate that the overall robustness of stable tags to any tested image modification is high up to capacities of 512-1024 bits, with an average NHD < 1%, decreasing for aggressive image compression and filtering at 2048 bits. It is worth mentioning that the local operations (except edge sharpening) are the most challenging modifications, since they affect many subbands. In fact, the motion blur modification yields an average NHD = 3.6% in stable tags of 1024 bits. Since the number of coefficients available from level 3 (aWL for 512 ×512 px2images) to the top is 16,384, and only one feature can be extracted from each coefficient, associating tags longer than 2048 bits will make the overall robustness decrease sharply. BCH(511,259,30) coding [61] was successfully tested with stable tags to improve their robustness. Each tag is divided into blocks of 259 bits and encoded as 511-bit redundant blocks. Although it is then possible to correct up to 30 bits per block, the length of the associated keytag is almost double that of the keytag associated to the tag without BCH coding, which reduces its overall robustness. As can be seen in Table 3 (unshaded cells, right side of slashes), the balance is positive and the NHD is reduced to 0 or almost 0 in most cases. Nonetheless, BCH can not be applied to all images for capacities of ≥2048 bits, which turn into ≥4096 bits after this coding, since some clipped ROIs do not have enough coefficients for the keytag association. Therefore, BCH coding-decoding will be applied to all stable tags with length ≤1204 bits, the coding as a previous step to Algorithm 1 and the decoding as a final step after Algorithm 2. 25 •The capacity of the different types of keytags to transmit information among different users is conditioned by the perceptual and clinical distortion that their instances of the image —associated to the keytags— may undergo. This property is used for the implementation of the keytag-based security measures described throughout Sections 5.2-5.7. 5.2. Image resynchronization The medical image may be subject to geometrical transformations, which in the medical context may be 90/180/270◦rotation, vertical or horizontal flipping. Being able to find the original position of the image is essential to retrieve its tags correctly, since otherwise they would be desynchronized. To accomplish this task, a reference synchronization tag is associated to the image. This is a 128-bit public stable tag, which is retrieved six times, from the received position and from each of the geometrical transformations (by rotating/mirroring each subband in Coef just after line 5 in Algorithm 2). The retrieved tag which is most similar to the original reference corresponds to the transformation that returns the image to its original position. If it is observed that a retrieved tag is more dissimilar than the most similar tag, e.g. 127 wrong bits in the former and 80 correct bits in the latter, this means that the original position corresponds to the former, whose colors have been inverted. In that case, the values of Coef need to be inverted (just after line 5 in Algorithm 2). 5.3. Image authentication and traceability Authentication refers to the capacity to determine if an image is either derived from another, including perfect copies in this category, or if it is unrelated. To implement image authentication, a reference public stable tag is associated to the original image. It is then retrieved from the image to be authenticated. Only if the reference and retrieved tags are very similar or equal is the image positively authenticated. The authentication ability of keytagging is adjusted by means of two operating parameters: the length of the reference tag and the detection threshold, T h. Assuming that decoding each tag bit has a probability of success of ≃0.5 when it is done from a wrong image, the probability of false positives Pfp in authentication can be approximated by means of the following binomial distribution: Pfp = n=length(T) X i=T h (0.5)n·n! i!(n−i)! (4) The image is positively authenticated only if the number of correctly decoded tag bits exceeds the threshold, Plength(T) i=1 (˜ Ti=Ti)≥Th. On the one hand, the probability of false positives Pfp in image authentication 32 is expected to be similar to that required in applications of biometric recognition, ≤10−6. Thus, avoiding images that were not keytagged for authentication from obtaining false positives requires setting a high Th. On the other hand, too high values of Th (low permitted NHD) will increase the probability of false negatives (non-authenticated images that were actually associated with the authentication tag). As can be seen in Table 3, the robustness of stable tags with BCH coding is total (NHD = 0%) for tag lengths up to 512 bits, which ensures no false negatives. However, a shorter tag is enough to ensure that the likelihood of false positives, Pfp, is very low. Using length(T) = 128 and T h = 126 (NHD = 1.6%) makes Pfp = 2.5·10−35. The minimum NHD in simulation setup 2 (see Section 4.3) was obtained when associating-retrieving a reference 128-bit tag using the two most similar images in the test set (PSNR = 23dB), two close slices from a PET-CT. That NHD value, the closest to causing a false positive, was 12.5%, still far greater than Th (= 1.6%). To sum up, these operating parameters ensure the perfect authentication of the whole test set. Traceability policies intend to facilitate the tracking of entities that process or simply forward the medical image test. This can be easily accomplished if each entity validates the digital signature/s of the authentication keytag, authenticates the image and adds its own digital signature to the authentication keytag if the previous verifications are positive. Otherwise, the image is reported as replaced or heavily tampered with and requested from the last entity that validated it. 5.4. Copyright protection Copyright protection may be implemented by means of a specific double authentication mechanism (see Section 5.3), involving the image copyright holder and each image buyer, in the following manner: •The copyright holder is identified by means of a public ID (e.g. Rubio@eHealthZ14), which he/she associates to the image by means of a 128-bit stable tag. Besides, this tag has a secondary purpose: enabling the automatic search for illegal copies of the image in internet sites and databases. An internet bot may use the keytag to retrieve tags from the images in targeted sites and compare them with the copyright holder ID. If some image is positively authenticated, it is an illegal copy. •Each buyer is identified by means of an ID, which the copyright holder associates to the image with a 128-bit private stable tag. In this manner, any buyer can prove that he/she holds a legal copy, even if he/she has made substantial modifications to it. 33 5.5. Private captioning with RBAC The association of private information with the image, only retrievable by authorised users if the image preserves its clinical value, may be easily carried out by means of semistable private tags. Nonetheless, the results in Table 3 suggest that the overall length of these tags should not exceed 8192 bits. Therefore, it is recommended compressing them as much as possible, e.g. by replacing text with codes. Nevertheless, it is also recommended that the overall tag length is not too short, to guarantee a good specificity. As pointed out in Table 4, a minimum length of 256-bit ensures that the minimum distortion (NHD) of tags retrieved from very similar images (but not derived from the original) is high, >23%. Therefore, short tags shall add padding bits until their length is ≥256 bits. Cryptographic-based RBAC may be applied to improve private captioning (see Algorithms 1: lines 14-21 and Algorithm 2: lines 7-9). For each tag, its associated keytag is symmetrically encrypted with a specific symmetric key, Sk, and all the symmetric keys corresponding to tags intended for a user are encrypted with his/her public key, P bUser{i}. Thus, each user decrypts his/her symmetric keys {Sk}with his/her private key, P rUser{i}, and then decrypts his/her keytags with these symmetric keys. All this can be easily managed by encapsulating the keytags with CMS. There are two reasons to implement RBAC in this manner, instead of by associating a different keytag for each user. First, because all the users retrieve the same tag content, even when the image is modified. Otherwise the users may retrieve tag contents with different degrees of distortion. Second, because associating several keytags with the same content would reduce the overall capacity. 5.6. Integrity control and location of tampered areas The detection and location of modifications affecting the image may be efficiently performed by means of public volatile tags. Table 3 shows that these tags suffer high distortion even when the image modifications are mild, which implies very low robustness. Given these results, we propose the following: •For integrity control, it is sufficient to use 64-bit reference tags, since they have an average NHD ≃ 50%. Thus, approximately 32 bits are wrongly detected when the image ROI undergoes non-geometrical modifications (geometrical modifications are reversed by means of resynchronization, see Section 5.2). The exception to this, NHD slightly >0, occurs when the image is partially annotated in the ROI, since only a few pixels in isolated regions change. •For the location of tampered areas, the position in BM of wrongly detected tag bits is marked in the corresponding positions of the image. The even distribution of tampered pixels, detected after a 34 Figure 4: Location of tampered areas on the ROI of a 512 ×512 px2original image (left), on its JPEG QF = 15% compressed version (center, tag length = 128 bits) and on an annotated version (right, tag length = 512 bits). common image modification, is shown in Figure 4: center. Logically, longer reference tags are able to achieve finer granularity in the delimitation of modified image areas, which is especially important in the case of detecting annotations in the image ROI. Considering that usually only ≃2% pixels have been annotated and half (1%) change the value of the features used the for coding of these keytags (the LSB of certain wavelet coefficients), a 512-bit tag is able to locate approximately 5 tampered areas in the ROI, as shown in Figure 4: right. It is worth noting that implementing location of tampered areas already ensures integrity control, but not conversely. 5.7. Simultaneous implementation This section analyzes whether all the previous security measures can be implemented simultaneously in the images from the test set, by analyzing the results of robustness-capacity in Table 3 and the keytagging parameters in Table 7. According to these results, the security measures based on public stable tags can reach an overall capacity of 512 bits with NHD = 0, and they only require 384 bits. Regarding semistable tags, their capacity shall be adjusted to ≤8192 bits in order to maintain an adequate robustness in private captioning. With respect to volatile tags, there are no capacity restrictions. Thus, all these security measures can be implemented simultaneously. Furthermore, in this case, it is recommended that the tags for image resynchronization, authentication-traceability and location of tampered areas-integrity control associate the 35 same reference. This would require extending the reference used for location of tampered areas, e.g. by repeating several times the shorter reference used to implement the other security measures. In this manner, the reference does not need to be transmitted since comparisons may be established among the tags retrieved. Consequently, the keytagging-based security system would be able to operate in a blind manner. An overview of the overall keytagging system is introduced below by means of the following use case. A patient’s medical image is acquired by means of a CT scanner, whose software generates a 128-bit reference and runs the keytagging algorithm to associate it by means of three keytags. Two of these keytags are stable, intended for resynchronization and authentication, and the third is volatile (resulting from the concatenation of the reference 8 times), intended for the location of tampered areas. The keytags are attached with the image file and recorded in the audit trail system of the medical architecture to which the CT scan is connected. The access control system of the architecture establishes that this image can be edited by two specialists of the patient and consulted by his general practitioner. Each time that one of them accesses the image, the visualization software runs the keytagging algorithm to validate the keytags associated and read their content. Next, the reference introduced after the acquisition is used to authenticate and resynchronize the image (if necessary), and also to pinpoint tampered areas (if any). The specialists can introduce text regarding the diagnosis of the patient or his/her treatment, which the visualization software will associate by running the keytagging algorithm to add semistable keytags. These keytags will be attached in the image file and recorded in the audit trail system. The three users can consult the image, perform modifications on it and, using the visualization software, consult the keytags. In spite of possible modifications, the visualization software will still be able to authenticate and resynchronize the image, to display the content of the semistable keytags (if the image has not lost its clinical value) and to pinpoint the modified areas. Finally, the specialists (but not the practitioner) can use the visualization software to order the removal of their own semistable keytags from the image file, being this event recorded in the audit trail system. 5.8. Risk assessment The keytagging method, described in Section 3, involves different elements; namely, the keytagging algorithm itself, the keytagged image, the keytag/s associated to it and the content of the corresponding tag/s. Several considerations can be done about the character, either public or private, of these elements. In the first place, Kerckhoff’s principle states that the system shall be secure even if everything about it, except certain keys, is public knowledge. Hence, considering that the enemy will eventually discover the keytagging algorithm [62], it is proposed in Section 3.4 to make it public from the beginning. Similarly, medical keytagged images cannot be considered as impossible to obtain under any circumstance. In fact, certain 36 situations may facilitate attackers to obtain an image copy. Some patients may give their informed consent to the use of their medical images for certain purposes —e.g. teaching, research— after anonymization, which increases the number of accesses to the image (and the number of potential opportunities for attacker accordingly); and even strictly confidential images may be a reasonably target for attackers if at a certain time they are handled (e.g. filtered, annotated) out of a protected standardized format (e.g. as JPX instead of DICOM files). Regarding keytags and their associated tag contents, they can be either public or private depending on the security measures that they implement (see Table 7). The former are available to anyone for consultation, while the latter are considered as the most difficult elements to be obtained (in clear) by an attacker. With the purpose of weakening the security of the system, an attacker with access to some of its elements may try to perform certain attack/s to interfere with the security measures described throughout Sections 5.2-5.6. Therefore, performing a comprehensive risk assessment, comprising all feasible attacks and the existing countermeasures, is essential for the prevention of potential security breaches. The following risk assessment, based on reference publications on watermarking security [63, 64, 65] and tailored to the specifics of keytagging, analyzes attacks depending on the keytag-based measures affected, the actions intended by the attacker and the system elements he/she needs access to. The following attacks may potentially affect the privacy in image purchase and in image captioning (see Sections 5.4-5.5): •Unauthorised detection and reading of private keytags. It is impossible to detect keytags if the attacker only knows the image: no information can be extracted from the image alone since keytagging does not modify it in any manner. As regards to reading the whole content of private tag/s associated to an image, the algorithm requires both the image and the plain keytag/s associated. With respect to the former, the attacker may try to use another image if he/she does not have the original, but the specificity of keytags guarantees that the content retrieved will be highly distorted, as demonstrated in Section 4.3. Regarding the latter, keytag/s is/are protected with adequate encryption (see Section 3.4), which makes obtaining its/their plain version/s very unlikely. There is also another possible attack, which —generally speaking— requires even more knowledge about the system and only permits reading part of certain tag/s content. To explain this attack, it is worth reminding that while public keytags shall be associated to different features of the image to avoid eavesdropping, different independent users may associate private keytags to certain repeated image features. Therefore, if an attacker knows one or several plain private keytags with its/their associated tags, he/she would be able to read those tag bits from other keytags associated to the same image features. Nevertheless, this requires the attacker 37 being able to break the encryption of the keytags from different users (to obtain the plain versions) and to know the tag content of at least a private keytag, which is highly unlikely. And these attacks may potentially affect all the security measures described throughout Sections 5.2-5.6: •Writing of forged keytags. The attempt to copy a legitimate keytag in another image will not succeed since the keytagging algorithm guarantees that keytags are dependent on the image. This high specificity guarantees that the tag content read will be highly distorted, as proved in Section 4.3. Alternatively, any attacker can decide to associate his/her own keytag/s to any image, since the keytagging algorithm is intended to become public. Nevertheless, the attacker cannot add the required digital signature of a trusted entity to the keytags, unless he/she has broken or stolen the private key of a trusted entity —which is highly unlikely. •Malicious removal of legitimate keytags. There are three possibilities: attacking the keytag, the image it is associated to or the association. As regards to keytags, although they may be attacked, its integrity and provenance can be evaluated any time by means of its digital signature, which is a mandatory element (see Table 7). As explained before, to forge the digital signature of the signatory entity, so that the attack cannot be detected, the attacker needs to break/steal his/her private key. Regarding attacks on the image, their effects on the robustness of the different types of keytags have been evaluated in Section 4.2. In fact, the different measures described throughout Section 5.2-5.6 are designed based on the intended robustness of keytags —e.g. authentication is based on stable keytags, which can be detected even when the image undergoes important modifications; tamper detection is based on volatile keytags, which get highly distorted even if the modification/s on the image are minor. Therefore, the effect of the modifications of the image have already been taken into account in the design of the security measures. Alternatively, the keytagging algorithm can be exploited to change the value of image features used to encode the keytags. In point of fact, this attack can destroy the tag content when the plain keytag is known (e.g. if it is public), but at the cost of destroying the image as well (see Section 4.2). Regarding collusion attacks (popular in watermarking), which combine different keytagged versions of an image to produce another image with distorted keytags, they would be pointless since any keytagged version of an image is exactly like the original. Finally, the attacker may attempt to make the tag reader think that certain keytags are associated to a different image, with the intention of confusing him/her. To detect this attack, it has been proposed associating a reference tag with two independent stable keytags (one for image resynchronization and another for 38 image authentication and traceability, see Section 5.7). In this manner, the tag content of these keytags only match when retrieved from the original image (or from an image derived from it, e.g. compressed or filtered). •Malicious edition of legitimate keytags. This is a combination of the previous types of attack. Therefore, it requires knowing the plain keytag (breaking its encryption if it is private), editing the content of the keytag total or partially (as intended by the attacker), replacing the previous signature with a new valid one (which requires the private key of the original keytag signatory) and, if the keytag is private, re-encrypting the keytag with the same cryptographic key used for its decryption. The careful design of the keytagging algorithm, its combination with adequate cryptographic elements and the choice of the parameters to enforce the different security measures (mainly the robustness of the keytags) are the foundations of the keytagging method. From this security assessment, it can be concluded that the only manner to weaken the security of this system is by attacking the cryptographic protection of the keytags. Hence, the security of keytagging cannot be considered as lower than the security of cryptography. On the contrary, the former requires an additional element for the retrieval of the content associated: the image. 6. Integration with DICOM In the present e-health model, the access of users to medical images is controlled by the Health and Radiology Information Systems (HIS and RIS) of the hospital, which communicate with the Picture Archive and Communication System (PACS) where they are stored and managed. In turn, the PACS communicates with the devices in charge of the acquisition to obtain the medical images. All the processes involved in this context, including storage, transmission, handling and impression of medical images are usually regulated by the DICOM [1] standard, whose robust file format and network protocol are currently supported by the vast majority of vendors of medical equipment. To fulfill legal regulations, the security of the DICOM file is very high and it also implements a reliable role-based access control to protect patient privacy. The most sensitive DICOM contents, its confidential tags and the image (if it helps to identify the patient), are put into digital envelopes and sealed by means of CMS. Nonetheless, this purely cryptographic policy has some disadvantages. The first major issue is that the content of a non-tampered envelope is technically retrievable even if the rest of the file has been corrupted. It would be preferable if those DICOM tags containing the most sensitive information were to become unreadable if the image is corrupted. Furthermore, it would 39 be desirable that the image could not be requested if it has been seriously distorted or replaced. The second major issue, explained in Section 1, is the difficulty of developing cooperative architectures that allow authorised users to update the DICOM file and share it with the rest of the users while maintaining its integrity control, authenticity and traceability. Preserving the DICOM digital envelopes, which already implement CMS, different keytags may be used to associate DICOM tags to the image by replacing the original values with those of its keytags. The DICOM data model is defined by attributes that identify information entities, namely patient, study, series and instance of the image. Since the patient ID tag (0010,0020) is the most important, it would be interesting to associate it to the image permanently. Thus, our proposal is to associate the patient ID by means of two stable keytags, one used for authentication and traceability, and the other for resynchronization. Besides, concatenated four times to lengthen, it may also be associated by means of a volatile keytag for integrity control and location of tampered areas. Finally, semistable keytags may be used to associate important private DICOM tags, intended to become uninterpretable if the image loses its clinical value — e.g. due to aggressive image processing. These tags might be some of those included in the DICOM Basic Diagnostic Imaging Report, Study Date tag (0008,0020), Accession Number tag (0008,0050), Modality tag (0008,0060), Manufacturer tag (0008,0070), Referring Physician’s Name tag (0008,0090), Responsible Organization tag (0008,0116), etc. The features of keytagging, non-modification of the image, low complexity (shown in Section 4.5), scalability (shown in Section 4.6), compatibility with JPEG2000 to encode the image (explained in Section 3.5) and with CMS to protect the keytags, both implemented by DICOM, all together guarantee that the proposed stable, semistable and volatile keytags can be seamlessly integrated within this medical imaging standard to enhance its security and privacy. 7. Conclusions and future work Keytagging, a method based on associating tags of variable robustness to the image ROI, has proved to be an interesting alternative for the protection of medical image-based tests. In fact, this technique has a series of advantages over watermarking and cryptography alone. It preserves the image clinical content, prevents image forgery and collusion attacks, permits associating data to very stable features of the image and obtains a substantial capacity-robustness tradeoff by means of simple operations. In addition, the keytags (keys to access the tags) are tightly bound to the image, since no tag bit can be derived from them alone or by using an unrelated image. Tested with 512 ×512 and 1024 ×1024 pixel images, the 40 robustness of stable tags to modifications that are typical in the medical context is total (NHD = 0) up to 512 bits and still very high (only three modifications produce NHD > 0) for 1024 bits. Semistable tags obtain good robustness to JPEG2000 CR 16:1 image compression and contrast and brightness change (NHD = 0% for tag length of 4096 bits), and bad, as intended, to local operations that distort the details of the image (average NHD > 15% for tag length ≥512 bits). Volatile tags achieve very little robustness to any modification of the image, even when associating very short tags (NHD > 45% for length ≥64 bits). Regarding runtime costs, associating a set of keytags and retrieving the corresponding tags for the simultaneous implementation of complementary security measures takes ≃55,115 ms for 512 ×512 px2 images; ≃140,200 ms for 1024 ×1024 px2images and ≃510,570 for 2048 ×2048 px2images. To guarantee the scalability of this approach, it has also been demonstrated that this method can be combined with JPEG2000 compression, maintaining its robustness while reducing the keytag association-tag retrieval delays to only ≃30,90 ms for any image size. As future work, we will evaluate improved keytag encoding methods in order to reduce the overhead, which is the main drawback of keytagging with respect to watermarking and cryptography. In addition to this, we intend to avoid the need for BCH coding in stable and semistable tags and to raise the capacity of semistable tags. To achieve this, we will research into the combined use of both most significant and sign bits of high magnitude coefficients as stable features, and also on the use of new transforms that may perform better than wavelets. To sum up, keytagging achieves the transparent, secure and efficient association of stable, semistable and volatile tags to medical images. This enables the simultaneous implementation of private captioning with role-based access control, integrity control and location of tampered areas, authentication, traceability and copyright protection. Finally, it has been explained how this method can be seamlessly integrated within DICOM to facilitate the deployment of efficient medical architectures where different authorised users can update DICOM files with new information and share it without sacrificing any security measure. Acknowledgements This research work has been supported by project TIN-2011-23792/TSI from the Ministerio de Econom´ıa y Competitividad (MINECO), the European Regional Development Fund (ERDF), Gobierno de Arag´on (research group T98) and the European Social Fund (ESF). 41