A method for performing real-time integrity assessment of execution of a routine in a computer processing platform, comprising: (a) for trusted code of the routine: (i) monitoring execution of the routine by tracing power consumption of a processor (205, 206, 2620) by sampling during execution of the routine; (ii) using a platform characterization technique that further comprises detecting sections of the traces that display the largest dependence on state transitions in the processor (205, 206, 2620); and using said sections to select features carrying the most information; (iii) obtaining from a characterization of selected features of the routine contained in said sections a set of trusted power fingerprints of the routine; (iv) establishing a threshold for a specific false alarm rate based on the probability distribution of distance from a signature comprised of said trusted fingerprints; and (b) for untrusted code of the routine: (i) comparing a library of said trusted fingerprints to features extracted from traces from the execution of untrusted code; (ii) determining a distance between said fingerprints and the extracted features; and (iii) reporting an exception if the distance exceeds the threshold. (a) for trusted code of the routine: (i) monitoring execution of the routine by tracing power consumption of a processor (205, 206, 2620) by sampling during execution of the routine; (ii) using a platform characterization technique that further comprises detecting sections of the traces that display the largest dependence on state transitions in the processor (205, 206, 2620); and using said sections to select features carrying the most information; (iii) obtaining from a characterization of selected features of the routine contained in said sections a set of trusted power fingerprints of the routine; (iv) establishing a threshold for a specific false alarm rate based on the probability distribution of distance from a signature comprised of said trusted fingerprints; and (i) monitoring execution of the routine by tracing power consumption of a processor (205, 206, 2620) by sampling during execution of the routine; (ii) using a platform characterization technique that further comprises detecting sections of the traces that display the largest dependence on state transitions in the processor (205, 206, 2620); and using said sections to select features carrying the most information; (iii) obtaining from a characterization of selected features of the routine contained in said sections a set of trusted power fingerprints of the routine; (iv) establishing a threshold for a specific false alarm rate based on the probability distribution of distance from a signature comprised of said trusted fingerprints; and (b) for untrusted code of the routine: (i) comparing a library of said trusted fingerprints to features extracted from traces from the execution of untrusted code; (ii) determining a distance between said fingerprints and the extracted features; and (iii) reporting an exception if the distance exceeds the threshold. (i) comparing a library of said trusted fingerprints to features extracted from traces from the execution of untrusted code; (ii) determining a distance between said fingerprints and the extracted features; and (iii) reporting an exception if the distance exceeds the threshold.