1# Cipher
2
3### Introduction
4
5This sample shows how to use cipher algorithms, including Rivest-Shamir-Adleman (RSA) and Advanced Encryption Standard (AES). The display effect is as follows:
6
7![](screenshots/device/index_en.png) ![](screenshots/device/encrypt_en.png) ![](screenshots/device/decrypt_en.png)
8
9### Concepts
10
11RSA: A public-key cryptosystem that works on two different keys: a public encryption key and a private decryption key.
12
13AES: A block encryption standard established by the U.S. National Institute of Standards and technology (NIST). It is also called Rijndael.
14
15### Required Permissions
16
17N/A.
18
19### Usage
20
211. On the home screen, touch the **Encrypt** button. On the **Encrypt** screen, select an encryption algorithm from the **Encryption Algorithm** drop-down list box, enter the content to be encrypted in the text box, and touch the **Encrypt** button.
22
23   The encrypted content is displayed in the text box below.
24
252. Touch the **Reset** button to clear the content in the text box.
26
273. Touch the **Decrypt** button on the home screen. On the **Decrypt** screen, select a decryption algorithm from the **Decryption Algorithm** drop-down list box, enter the content to be decrypted in the text box, and touch the **Decrypt** button.
28
29   The decrypted content is displayed in the text box below.
30
314. Touch the **Reset** button to clear the content in the text box.
32
33### Constraints
34
35- This sample can only be run on standard-system devices.
36
37- This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run.
38