The CoAP specification proposes the utilization of Datagram Transport Layer Security(DTLS) or Internet Protocol Security (IPSec) to accomplish data origin authentication, replay protection, integrity and encryption for coap messages. CoAP specification defines four security modes: NoSec, PreSharedKey, RawPublicKey and Certificate except NoSec all other modes uses DTLS security.
DTLS is disabled and security mechanisms are implemented by lower layer protocols like IPSec Encapsulating Security Payload. This mode assumes that security is not provided or in the CoAP transmitted message