In cryptography, an adversary (rarely opponent, enemy) is a malicious entity whose aim is to prevent the users of the cryptosystem from achieving their goal (primarily privacy, integrity and availability of data). An adversary's efforts might take the form of attempting to discover secret data, corrupting some of the data in the system, spoofing the identity of a message sender or receiver, or forcing system downtime.
Actual adversaries, as opposed to idealized ones, are referred to as attackers. Not surprisingly, the former term predominates in the cryptographic literature and the latter in the computer security literature.
Eve, Mallory and Oscar are all adversarial characters widely used in the computer, cryptographic, and security system literature, and can be viewed as metasyntactic variables.
This notion of 'an adversary' helps both intuitive and formal reasoning about cryptosystems by casting security analysis of cryptosystems as a 'game' between the users and a centrally co_ordinated enemy. The notion of 'security' of a cryptosystem is meaningful only with respect to particular attacks (usually presumed to be carried out by a particular sorts of adversaries).
There are several types of adversaries depending on what capabilities or intentions they are presumed to have. Adversaries may be
- computationally bounded or unbounded (ie, in terms of time and storage resources),
- eavesdropping or byzantine (ie, passively listening on or actively corrupting data in the channel),
- static or adaptive (ie, having fixed or changing behavior),
- mobile or non_mobile (eg, in the context of network security)
- and so on.
In actual security practice, the attacks assigned to such adversaries are often seen, so such notional analysis in not merely theoretical.