search
HomeOperation and MaintenanceSafetyWhat are the encryption methods commonly used in network security?

What are the encryption methods commonly used in network security?

Jan 08, 2021 am 10:01 AM
Encryptioncyber security

What are the encryption methods commonly used in network security?

The following are several encryption methods commonly used in network transmission:

(Learning video sharing: Programming video)

Tip: These encryptions involve plain text transmission and need to be encrypted and transmitted over the https protocol.

1. Key hashing

Use MD5 or SHA1 and other hashing algorithms to encrypt the plain text (the encryption here is only for people, not machines, because these algorithms and machines can use corresponding algorithms Calculate it)

What are the encryption methods commonly used in network security?

Advantages: Anti-tampering
Applicable scenarios: Ordinary file downloads
Disadvantages: No security, certifiable

2. Symmetric encryption

What are the encryption methods commonly used in network security?

Advantages: safe and authenticable
Applicable scenarios: fixed number of senders and receivers, few key users
Disadvantages: BS network transmission relationship , too many keys are difficult to maintain unless the key is encrypted and transmitted

3. Asymmetric encryption

3.1. The receiver sends the public key (to ensure data integrity)

Premise: The sender receives the receiver's public key during the first communication and saves it locally

What are the encryption methods commonly used in network security?

3.2. The sender sends the public key (guaranteeing the sender's authentication)

Premise: The receiver receives the sender’s public key during the first communication and saves it locally

What are the encryption methods commonly used in network security?

4, digital signature

What are the encryption methods commonly used in network security?

Applicable scenarios: login authentication
Disadvantages: insufficient confidentiality

Shorthand

Symmetric Algorithm

Symmestric Algorithm.Create ()=>
Provider.CreateEncryptor()
Provider.CreateDecryptor()
CryptoStream(Stream stream,ICrytoTransform transform,CryptoStreamMode mode):
CryptoStream(encryptedSteam,encryptor,CryptoStreamMode.Write)/ /Encryption is ready to read empty encryptedSteam is ready to be written
CryptoStream(encryptedSteam,decryptor,CryptoStreamMode.Read)//Decryption is ready to be written into the ciphertext stream encryptedSteam is ready to be read

Asymmetric encryption

Asymmetric encryption (ASymmisticAlgorithm):
Provider provider
provider.ToXmlString(true);//Get the public and private key pair
provider.ToXmlString(false);//Get the public key
provier .FromXmlString(publicKeyXml);
provier.FromXmlString(privateKeyXml);
provider.Encrypt();
provider.Decrypt();

Example:

Symmetric encryption :

            string key = "abc";
            string sendContent="你好!";
            var byteKey = Encoding.UTF8.GetBytes(key);
            var byteIV = Encoding.UTF8.GetBytes(key);//加密算法初始化向量
            DESCryptoServiceProvider des = new DESCryptoServiceProvider();//使用des加密
            byte[] bytesContent = Encoding.UTF8.GetBytes(sendContent);
            MemoryStream ms = new MemoryStream();
            CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(byteKey, byteIV), CryptoStreamMode.Write);
            cs.Write(bytesContent, 0, bytesContent.Length);
            cs.FlushFinalBlock();

Related recommendations: Website Security Tutorial

The above is the detailed content of What are the encryption methods commonly used in network security?. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.