From Wikipedia, the free encyclopedia

In cryptography, domain separation is a construct used to implement multiple different functions using only one underlying template in an efficient way. [1] For example, multiple cryptographic hash functions can be constructed from a single hash implementation by prepending different "domain identifier" strings to the input message.

Example

Suppose that a certain application needs two hash functions. Using the same function for both of them is not always possible ‒ there may be reasons why they must be independent [2] (cf. Random oracle § Domain separation). An obvious solution may be to pick two existing hash functions ‒ say, SHA-2 and SHA-3 ‒ and use them.

However, this solution is problematic. Different functions may have different performance and security characteristics, so it is desirable to use the one that suits best everywhere. New functions are designed to improve on the old ones or to support different use cases, not just to increase the number of different functions in existence. Also, using multiple functions like this increases implementation footprint and potential attack surface.

A much better solution is to use just one function, but to use a subset of the possible inputs for one hash, and another (disjoint) subset for the other. Because an input to a hash function is an arbitrarily long string, this is easy to implement: just prepend 0 to the input for one function, and 1 for the other. Formally, given a function , the new functions would be and (here, denotes concatenation).

The functions and produced like this behave as separate, independent hash functions: because their inputs to don't overlap and because the outputs of on different inputs are statistically independent (at least so far as a hash function is considered an approximation for a random oracle), the outputs of and on any inputs are likewise independent. This approach can be generalized to any number of functions, and to different kinds of functions. [3] [4]

Kinds of functions

Domain separation can be used with functions implementing different cryptographic primitives.

Hash functions

Domain separation is most commonly used with hash functions. Because the domain of a hash function is practically unlimited, it is not difficult to partition it among any number of sub-functions. This is commonly done by prepending or appending to the message a distinct string (domain separator) for each sub-function. [5] [1]

Domain separation is used within the implementation of some hash functions to produce multiple different functions from the same design. [6] For example, SHA-224 is almost identical to SHA-256 truncated to 224 bits. However, without additional modifications, it would have certain undesirable properties (for example, it would be possible to compute SHA-224 hash of a message knowing only its SHA-256 hash, something that is not possible for arbitrary different hash functions), so a modification was made to make SHA-224 produce a different output without changing its design (specifically, the initialization constants are different).

Symmetric ciphers and MACs

The security of symmetric ciphers and MACs critically depends of the key not being used for other purposes. If an application needs multiple keys but has only one source of keying material, it would typically employ a key derivation function to produce the keys. KDFs can usually produce output of arbitrary length, so they can be used to generate any number of keys. [7]

Also, just like hash functions, some symmetric ciphers and MACs use domain separation internally. [8]

Signatures

In many cases, it is desirable to use a single signing key to produce digital signatures for different purposes. If this is done, it is important to make sure that signed messages intended for one purpose cannot be used for the other. A simple way to achieve this is to add to each message an identifier specifying the purpose, and to reject a message if the identifier doesn't match. [9]

References

  1. ^ a b Hampiholi et al. 2015, p. 317.
  2. ^ Faz-Hernandez, A.; Scott, S.; Sullivan, N.; Wahby, R. S.; Wood, C. A. (August 2023). "RFC 9380: Hashing to Elliptic Curves". The RFC Series. 2.2.5. Domain Separation. ISSN  2070-1721.
  3. ^ Bellare, Mihir; Davis, Hannah; Günther, Felix (1 May 2020). "Separate Your Domains: NIST PQC KEMs, Oracle Cloning and Read-Only Indifferentiability". Advances in Cryptology – EUROCRYPT 2020. doi: 10.1007/978-3-030-45724-2_1.
  4. ^ Mittelbach, Arno; Fischlin, Marc (19 January 2021). The Theory of Hash Functions and Random Oracles: An Approach to Modern Cryptography. Springer. ISBN  9783030632878.
  5. ^ Gunsing, Aldo; Mennink, Bart (10 April 2020). "Collapseability of Tree Hashes". PQCrypto 2020: Post-Quantum Cryptography. doi: 10.1007/978-3-030-44223-1_28.
  6. ^ Bertoni, Guido; Daemen, Joan; Hoffert, Seth; Peeters, Michaël; Van Assche, Gilles; Van Keer, Ronny; Viguier, Benoît (2023). "TurboSHAKE".
  7. ^ Wong, David (19 October 2021). Real-World Cryptography. Simon and Schuster. ISBN  9781638350842.
  8. ^ Aumasson, Jean-Philippe; Jovanovic, Philipp; Neves, Samuel. "NORX: Parallel and Scalable AEAD". Computer Security - ESORICS 2014. doi: 10.1007/978-3-319-11212-1_2.
  9. ^ Blum, Erica; Katz, Jonathan; Loss, Julian (22 November 2019). "Synchronous Consensus with Optimal Asynchronous Fallback Guarantees". TCC 2019: Theory of Cryptography. doi: 10.1007/978-3-030-36030-6_6.

Sources

External links

From Wikipedia, the free encyclopedia

In cryptography, domain separation is a construct used to implement multiple different functions using only one underlying template in an efficient way. [1] For example, multiple cryptographic hash functions can be constructed from a single hash implementation by prepending different "domain identifier" strings to the input message.

Example

Suppose that a certain application needs two hash functions. Using the same function for both of them is not always possible ‒ there may be reasons why they must be independent [2] (cf. Random oracle § Domain separation). An obvious solution may be to pick two existing hash functions ‒ say, SHA-2 and SHA-3 ‒ and use them.

However, this solution is problematic. Different functions may have different performance and security characteristics, so it is desirable to use the one that suits best everywhere. New functions are designed to improve on the old ones or to support different use cases, not just to increase the number of different functions in existence. Also, using multiple functions like this increases implementation footprint and potential attack surface.

A much better solution is to use just one function, but to use a subset of the possible inputs for one hash, and another (disjoint) subset for the other. Because an input to a hash function is an arbitrarily long string, this is easy to implement: just prepend 0 to the input for one function, and 1 for the other. Formally, given a function , the new functions would be and (here, denotes concatenation).

The functions and produced like this behave as separate, independent hash functions: because their inputs to don't overlap and because the outputs of on different inputs are statistically independent (at least so far as a hash function is considered an approximation for a random oracle), the outputs of and on any inputs are likewise independent. This approach can be generalized to any number of functions, and to different kinds of functions. [3] [4]

Kinds of functions

Domain separation can be used with functions implementing different cryptographic primitives.

Hash functions

Domain separation is most commonly used with hash functions. Because the domain of a hash function is practically unlimited, it is not difficult to partition it among any number of sub-functions. This is commonly done by prepending or appending to the message a distinct string (domain separator) for each sub-function. [5] [1]

Domain separation is used within the implementation of some hash functions to produce multiple different functions from the same design. [6] For example, SHA-224 is almost identical to SHA-256 truncated to 224 bits. However, without additional modifications, it would have certain undesirable properties (for example, it would be possible to compute SHA-224 hash of a message knowing only its SHA-256 hash, something that is not possible for arbitrary different hash functions), so a modification was made to make SHA-224 produce a different output without changing its design (specifically, the initialization constants are different).

Symmetric ciphers and MACs

The security of symmetric ciphers and MACs critically depends of the key not being used for other purposes. If an application needs multiple keys but has only one source of keying material, it would typically employ a key derivation function to produce the keys. KDFs can usually produce output of arbitrary length, so they can be used to generate any number of keys. [7]

Also, just like hash functions, some symmetric ciphers and MACs use domain separation internally. [8]

Signatures

In many cases, it is desirable to use a single signing key to produce digital signatures for different purposes. If this is done, it is important to make sure that signed messages intended for one purpose cannot be used for the other. A simple way to achieve this is to add to each message an identifier specifying the purpose, and to reject a message if the identifier doesn't match. [9]

References

  1. ^ a b Hampiholi et al. 2015, p. 317.
  2. ^ Faz-Hernandez, A.; Scott, S.; Sullivan, N.; Wahby, R. S.; Wood, C. A. (August 2023). "RFC 9380: Hashing to Elliptic Curves". The RFC Series. 2.2.5. Domain Separation. ISSN  2070-1721.
  3. ^ Bellare, Mihir; Davis, Hannah; Günther, Felix (1 May 2020). "Separate Your Domains: NIST PQC KEMs, Oracle Cloning and Read-Only Indifferentiability". Advances in Cryptology – EUROCRYPT 2020. doi: 10.1007/978-3-030-45724-2_1.
  4. ^ Mittelbach, Arno; Fischlin, Marc (19 January 2021). The Theory of Hash Functions and Random Oracles: An Approach to Modern Cryptography. Springer. ISBN  9783030632878.
  5. ^ Gunsing, Aldo; Mennink, Bart (10 April 2020). "Collapseability of Tree Hashes". PQCrypto 2020: Post-Quantum Cryptography. doi: 10.1007/978-3-030-44223-1_28.
  6. ^ Bertoni, Guido; Daemen, Joan; Hoffert, Seth; Peeters, Michaël; Van Assche, Gilles; Van Keer, Ronny; Viguier, Benoît (2023). "TurboSHAKE".
  7. ^ Wong, David (19 October 2021). Real-World Cryptography. Simon and Schuster. ISBN  9781638350842.
  8. ^ Aumasson, Jean-Philippe; Jovanovic, Philipp; Neves, Samuel. "NORX: Parallel and Scalable AEAD". Computer Security - ESORICS 2014. doi: 10.1007/978-3-319-11212-1_2.
  9. ^ Blum, Erica; Katz, Jonathan; Loss, Julian (22 November 2019). "Synchronous Consensus with Optimal Asynchronous Fallback Guarantees". TCC 2019: Theory of Cryptography. doi: 10.1007/978-3-030-36030-6_6.

Sources

External links


Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook