Intrinsic properties of magnetic tunnel junctions (MTJs) are exploited for low-power security electronics. The combination of: 1) fast and nonvolatile storage; 2) stochastic nature of subcritical switching; and 3) random variation in the magnetic anisotropy of MTJ make MRAM array ideal for implementing physically unclonable function (PUF). We develop two bit-pattern randomization procedures, one of which can be exercised at wafer level in process line, while the other can be completed in the in-line tester. The procedures generate unpredictable and unclonable bit patterns in a spin-transfer torque (STT)-MRAM array and store them securely in the array. We show the resistance of MTJ is stable through rounds of thermal baking, the readback from the PUF shows no ambiguity from 25 °C to 75 °C. A single embedded STT-MRAM PUF can cover many needs of security electronics.