1. A method for operating a portable terminal having a hardware processor and a non-transitory memory, the method comprising: processing, using a hardware processor, a first component including at least a first program for tamper detection and a second component including at least a second program for executing a task; and loading, in a non-transitory memory, at least the second component from the non-transitory memory, wherein, the first program of the first component judges whether or not at least part of the second program of the second component is tampered with, by using a tamper detection value in a secure environment, the tamper detection value is a first hash value, and the secure environment cannot be accessed outside of the secure environment.