Method for peer to peer communication in near field communication

An NFC(Near Field Communication) peer-to-peer communication method is provided to achieve more reliable NFC by supporting link level security and providing a more strict security service to a user. In case link level security is required in executing a specific application program, the application program layer of an initiator terminal sends an LLCP(Logical Link Control Protocol)_encryption_start_request command to the security layer of the initiator terminal(420). The security layer transmits a set_encryption_request message to the security layer of a target terminal(421). The security layer of the target terminal sends an LLCP_encryption_start_indication command to the application program layer of the target terminal(422). The application program layer of the target terminal sends an LLCP_encryption_start_response command to the security layer of the target terminal(430). The target terminal sends a set_encryption_response message to the initiator terminal(431). Finally, as the security layer of the initiator terminal sends an LLCP_encryption_start_confirm command to the application program layer of the initiator terminal, an environment to transmit and receive encrypted data is constructed between the initiator terminal and the target terminal(440).