All Topics  
Message authentication code

 

   Email Print
   Bookmark   Link






 

Message authentication code



 
 
A cryptographic
Cryptography

Cryptography is the practice and study of hiding information. In modern times cryptography is considered a branch of both mathematics and computer science and is affiliated closely with information theory, computer security and engineering....
 message authentication code (MAC) is a short piece of information used to authenticate a message
Message

A message in its most general meaning is an Object of communication. It is something which provides information; it can also be this information itself....
.
A MAC algorithm
Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing....
 accepts as input a secret key and an arbitrary-length message to be authenticated, and outputs a MAC (sometimes known as a tag). The MAC value protects both a message's data integrity
Data integrity

Data integrity is a term used in computer science and telecommunications that can mean ensuring data is "whole" or complete, the condition in which data are identically maintained during any operation , the preservation of data for their intended use, or, relative to specified operations, the a priori expectation of data quality....
 as well as its authenticity
Authentication

Authentication is the act of establishing or confirming something as authentic, that is, that claims made by or about the subject are true....
, by allowing verifiers (who also possess the secret key) to detect any changes to the message content, and so should be called Message Authentication and Integrity Code: (MAIC).

A message integrity code (MIC) is frequently used as a substitute term for the MAC, especially in communications, where MAC acronym is traditionally used for Media Access Control
Media Access Control

The Media Access Control protocol sub-layer, also known as the Medium Access Control, is a sublayer of the Data Link Layer specified in the seven-layer OSI model ....
.






Discussion
Ask a question about 'Message authentication code'
Start a new discussion about 'Message authentication code'
Answer questions from other users
Full Discussion Forum



Encyclopedia


A cryptographic
Cryptography

Cryptography is the practice and study of hiding information. In modern times cryptography is considered a branch of both mathematics and computer science and is affiliated closely with information theory, computer security and engineering....
 message authentication code (MAC) is a short piece of information used to authenticate a message
Message

A message in its most general meaning is an Object of communication. It is something which provides information; it can also be this information itself....
.
A MAC algorithm
Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing....
 accepts as input a secret key and an arbitrary-length message to be authenticated, and outputs a MAC (sometimes known as a tag). The MAC value protects both a message's data integrity
Data integrity

Data integrity is a term used in computer science and telecommunications that can mean ensuring data is "whole" or complete, the condition in which data are identically maintained during any operation , the preservation of data for their intended use, or, relative to specified operations, the a priori expectation of data quality....
 as well as its authenticity
Authentication

Authentication is the act of establishing or confirming something as authentic, that is, that claims made by or about the subject are true....
, by allowing verifiers (who also possess the secret key) to detect any changes to the message content, and so should be called Message Authentication and Integrity Code: (MAIC).

A message integrity code (MIC) is frequently used as a substitute term for the MAC, especially in communications, where MAC acronym is traditionally used for Media Access Control
Media Access Control

The Media Access Control protocol sub-layer, also known as the Medium Access Control, is a sublayer of the Data Link Layer specified in the seven-layer OSI model ....
. However, some authors use MIC as a distinctly different term from a MAC in that a secret key is not used in MIC operation, so a MIC should always be encrypted during transmission if it is to be used as a reliable gauge of message integrity. A given message will always produce the same MIC assuming the same algorithm is used to generate both. Conversely, the same message can only generate matching MACs if the same secret key and initialization vector
Initialization vector

In cryptography, an initialization vector is a block of bits that is required to allow a stream cipher or a block cipher to be executed in any of several block cipher modes of operation to produce a unique stream independent from other streams produced by the same encryption key, without having to go through a re-keying process....
 are used with the same algorithms to generate both. MICs do not use secret keys and, when taken on their own, are therefore a much less reliable gauge of message integrity. A MAC that uses a secret key does not necessarily need to be encrypted to provide the same level of assurance.

While MAC functions are similar to cryptographic hash function
Cryptographic hash function

A cryptographic hash function is a algorithm that takes an arbitrary block of data and returns a fixed-size bit string, the hash value, such that an accidental or intentional change to the data will almost certainly change the hash value....
s, they possess different security requirements. To be considered secure, a MAC function must resist existential forgery
Existential forgery

In a digital signature or Message Authentication Code system, an existential forgery is the creation of any message and a valid signature for , where has not been signed or MACed in the past by the legitimate signer/MAC generator....
 under chosen-plaintext attack
Chosen-plaintext attack

A chosen-plaintext attack is an attack model for cryptanalysis which presumes that the attacker has the capability to choose arbitrary plaintexts to be encrypted and obtain the corresponding ciphertexts....
s. This means that even if an attacker has access to an oracle
Oracle machine

In computational complexity theory and Computability theory , an oracle machine is an abstract machine used to study decision problems. It can be visualized as a Turing machine with a black box, called an oracle, which is able to decide certain decision problems in a single operation....
 which possesses the secret key and generates MACs for messages of the attacker's choosing, he can "never" guess the MAC for any message that he has not yet asked the oracle about. (Here "never" means, "not without doing an infeasible amount of computation").

MACs differ from digital signature
Digital signature

A digital signature or digital signature scheme is a type of asymmetric key algorithm. For messages sent through an insecure channel, a properly implemented digital signature gives the receiver reason to believe the message was sent by the claimed sender....
s, as MAC values are both generated and verified using the same secret key. This implies that the sender and receiver of a message must agree on keys before initiating communications, as is the case with symmetric encryption. For the same reason, MACs do not provide the property of non-repudiation
Non-repudiation

Non-repudiation is the concept of ensuring that a party in a dispute cannot repudiate, or refute the validity of a statement or contract. Although this concept can be applied to any transmission, including television and radio, by far the most common application is in the verification and trust of signatures....
 offered by signatures: any user who can verify a MAC is also capable of generating MACs for other messages. In contrast, a digital signature is generated using the private key of a key pair, which is asymmetric encryption. Since this private key is only accessible to its holder, a digital signature proves that a document was signed by none other than that holder. Thus, digital signatures do offer non-repudiation.

MAC algorithms can be constructed from other cryptographic primitives, such as cryptographic hash function
Cryptographic hash function

A cryptographic hash function is a algorithm that takes an arbitrary block of data and returns a fixed-size bit string, the hash value, such that an accidental or intentional change to the data will almost certainly change the hash value....
s (as in the case of HMAC
HMAC

In cryptography, a keyed-Hash Message Authentication Code , is a type of message authentication code calculated using a specific algorithm involving a cryptographic hash function in combination with a secret cryptographic key....
) or from block cipher
Block cipher

In cryptography, a block cipher is a symmetric key algorithm cipher which operates on fixed-length groups of bits, termed blocks, with an unvarying transformation....
 algorithms (OMAC, CBC-MAC
CBC-MAC

In cryptography, a Cipher Block Chaining Message Authentication Code, abbreviated CBC-MAC, is a technique for constructing a message authentication code from a block cipher....
 and PMAC
PMAC (cryptography)

PMAC, which stands for Parallelizable MAC, is a message authentication code algorithm. It was created by Phillip Rogaway .PMAC is a method of taking a block cipher and creating an efficient message authentication code that is provably reducible in security to the underlying block cipher....
). However many of the fastest MAC algorithms are constructed based on universal hashing
Universal hashing

Universal hashing is a randomized algorithm for selecting a hash function F with the following property: for any two distinct inputs x and y, the probability that F=F is the same as if F was a random function....
.

Example


See also

  • Integrity check value
  • Data Authentication Algorithm, a DES-based MAC algorithm from ANSI
    American National Standards Institute

    The American National Standards Institute or ANSI is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States....
  • UMAC
    UMAC

    In cryptography, a message authentication code based on universal hashing, or UMAC, is a type of message authentication code calculated choosing a hash function from a class of hash functions according to some secret process and applying it to the message....
  • HMAC
    HMAC

    In cryptography, a keyed-Hash Message Authentication Code , is a type of message authentication code calculated using a specific algorithm involving a cryptographic hash function in combination with a secret cryptographic key....
  • CMAC
    CMAC

    In cryptography, CMAC is a block cipher-based message authentication code algorithm, it may be used to provide assurance of the authenticity and, hence, the integrity of binary data....
  • Poly1305-AES
    Poly1305-AES

    Poly1305-AES is a Cryptography message authentication code written by Daniel J. Bernstein. As such, it may be used to simultaneously verify both the data integrity and the authenticity of a message....


External links