Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

cybersecurity
cryptography

What is the avalanche effect?

Affan Malik

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code

Overview

In cryptography, the avalanche effect refers to the specific behavior of the mathematical function used for cryptography.

With a slight change in the input, inversion of a single bit causes a significant difference in the output. For example, inversion of half of the output bits is a desired property of the cryptographic algorithm, usually a block cipher and a cryptographic hash functionIt is a function that takes a data input and produces a fixed-size output of enciphered text called a hash value..

For high-quality block ciphersIt is a technique of encrypting data in blocks to produce cipher text using a cryptographic algorithm., making a small change with either the key or plain text will significantly change the cipher text.

An illustration of how the avalanche effect works

This effect makes it difficult for attackers to predict plain text through statistical analysis easily. Suppose the block cipher or cryptographic hash function does not show a significant avalanche effect.

In that case, the randomization is inadequate and may favor simple statistical analysis. It can lead to a prediction by the decryptor that may be enough to break the algorithm wholly or partially. Therefore, the avalanche effect is desirable from the perspective of the cryptographic algorithm or device designer.

Note: An excellent cryptographic hash function must have an avalanche effect of more than 50% on the output.

The criteria for the avalanche effect

Two types of criteria are formalized from the avalanche effect are given below:

  • The strict avalanche criteria (SAC) is satisfied if each output bit changes with a 50% probability each time a single input bit complements.
  • The bit independence criteria (BIC) states that if a single input bit inverts for all x, y, and z, the output bits y and z must change independently.

RELATED TAGS

cybersecurity
cryptography

CONTRIBUTOR

Affan Malik
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code
Keep Exploring