Cryptography is the science of securing communication against intentional attacks. These attacks can be either passive or active. Read on to learn what the difference between these two categories are, and try out some of our related exercises!


Passive and active attacks

In a passive attack, adversaries attempt to learn about or make use of information in the system, but without interfering with the system resources in a detectable way (for example, eavesdropping). Because these attacks are difficult to detect, prevention is key. 

In an active attack, on the other hand, the goal is to modify, delete, or manipulate the system resources or their operations (spoofing or DoS, for example). Active attacks are difficult to prevent, so the focus must be on detection. For this reason, modern cryptographic algorithms help with various information security services such as data confidentiality, data integrity, authentication, and non-repudiation.

Security services

Different security services can be utilized via different security mechanisms, such as encryption, digital signatures, data integrity, or authentication protocols. For example, encryption helps guarantee authentication, confidentiality, and data integrity, but it cannot ensure non-repudiation. For that, digital signatures are one of the options.


The goal here is to protect data from unintended disclosure. Encryption is one of the main security mechanisms that makes this possible. In encryption, the data or message is encoded, and the only way to decode it is by using a secret which only the recipient knows, and not the attackers.

Data integrity

Data integrity allows us to detect the intentional replay or modification of messages. The goal here is to make sure the message we receive is identical to what the sender intended, and that it wasn’t modified along the way.



The aim of authentication is to ensure that the sender of a message is truly who they claim to be.


The goal with non-repudiation is to provide assurance that an entity cannot deny its participation in a communication later on, if it has already done so earlier. 

Get started with secure coding training today

Reach out to our team and find out how we can help your company scale secure coding training efficiently.