Home >Backend Development >PHP Problem >What is the difference between aes and des in php

What is the difference between aes and des in php

WBOY
WBOYOriginal
2022-03-14 10:39:083100browse

Difference: 1. DES divides the plaintext into two halves for processing, while AES processes the whole block together to generate ciphertext; 2. AES is much faster than DES, and AES can encrypt large files in a few seconds. ;3. The functions used by DES round processing are expansion and replacement, while the functions used by AES round processing are mixing columns and adding round keys.

What is the difference between aes and des in php

The operating environment of this article: Windows 10 system, PHP version 7.1, Dell G3 computer.

What is the difference between aes and des in php

The main difference between DES and AES is the encryption process. In DES, the plaintext is divided into two halves before further processing, whereas in AES, the entire block is not divided and the entire block is processed together to generate the ciphertext.

Relatively speaking, AES is much faster than DES, and compared to DES, AES is able to encrypt large files in a few seconds.

Due to the smaller bit size of the shared key used in DES, it is considered less secure than AES. DES is considered more susceptible to brute force attacks, while AES has not encountered any serious attacks so far.

Evaluate the implementation of the algorithm on the basis of flexibility, and AES is more flexible than DES because it allows text of various lengths including 128, 192, 256 bits, while DES allows text of 64 Bit fixed text is encrypted.

The functions used in DES round processing are extend, permute and replace, XOR operations with round keys, while the functions used in AES round are subbytes, shift rows, mix columns and add round keys.

AES is actually efficient in both hardware and software implementations, while DES was initially only efficient in hardware.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What is the difference between aes and des in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn