Disclosed are methods and apparatus for packet based validation of control flow transfers for hardware control-flow enforcement. The methods and apparatus achieve control-flow validation through the determination of a first identifier for a source packet that implements a jump, where the determination is based on a computation using contents within the source packet itself. Similarly, a second identifier is determined for a target packet to which the source packet is directed based on a computation using contents of the target packet. The identifiers may be predetermined based on the packet contents, and may also involve insertion of No Operation instructions to ensure the computations based on the packet contents yield the desired identifiers. The identifiers may then be compared to determine whether they match or are compatible, and an invalid control flow can be detected if they are not compatible.