.NET Core AES-CCM & AES-GCM encryption algorithm

I. Introduction

About CCM and GCM see this article ( CCM and GCM ) or directly search online information.

.NET Core 3.0 implements for AES-GCMand AES-CCMencryption support. These algorithms are both associated with identity authentication data encryption (AEAD) algorithm, also added to the first identity authentication encryption .NET Core (AE) algorithm.

II. Use

CCM:

var ccm=new AesCcm(key);
ccm.Encrypt(nonce, plaintext, ciphertext, tag);
ccm.Decrypt(nonce, plaintext, ciphertext, tag);

GCM:

var gcm=new AesGcm(key);
gcm.Encrypt(nonce, plaintext, ciphertext, tag);
gcm.Decrypt(nonce, plaintext, ciphertext, tag);

Authors are not familiar with these two algorithms we do not give detailed treatment

Official API documentation: Gcm , Ccm

Guess you like

Origin www.cnblogs.com/stulzq/p/12017271.html