In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to use AWS Encryption CLI to encrypt and decrypt data, the content is very detailed, interested friends can refer to, hope to be helpful to you.
In this article, I'll walk you through the process of encrypting and decrypting files using AWS Encryption CLI in conjunction with the AWS Key Management Service (AWS KMS) service.
What is KMS?
AWS Key Management Service (AWS KMS) is a managed service that allows you to easily create and control the customer Master key (CMK), which is the encryption key used to encrypt data. AWS KMS integrates with most other AWS services used to encrypt data.
What is AWS CLI?
AWS Command Line Interface (AWS CLI) is an open source tool that allows you to use commands to interact with AWS services in the command line Shell. AWS CLI is available in two versions:
Version 2.x-the latest official release of AWS CLI designed for use in production environments. This release will contain some "significant" changes since version 1 that may require you to change the script to continue to work properly.
Version 1.x-the previous version of AWS CLI provided for backward compatibility.
Encryption and decryption implementation
With AWS Encryption CLI, you can take advantage of AWS Encryption SDK's built-in advanced data protection, including envelope encryption and a powerful algorithm suite. AWS Encryption CLI supports best practice features, such as authenticated encryption using symmetric encryption keys and asymmetric signature keys, as well as unique data keys for each encryption operation. AWS Encryption CLI is built on AWS Encryption SDK for Python and is fully interoperable with all language-specific implementations of AWS Encryption SDK. It is supported on Linux,macOS and Windows platforms. You can encrypt and decrypt data in a shell on Linux and macOS, in a command prompt window (cmd.exe) on Windows, or in the PowerShell console on any system.
Encryption principle
Encryption principle
Operation steps based on AWS CLI encryption and decryption
Environment configuration:
# to configure the AWSCLI environment, refer to the following connection: https://docs.aws.amazon.com/zh_cn/cli/latest/userguide/cli-chap-install.html
# pip install-upgrade pip
# pip install aws-encryption-cli
# cmkArn=arn:aws-cn:kms:cn-north-1:your aws id:key/ac8fe3f8-4dbd-4ff5-826c-188cf85eed64
Create a test file:
Encrypt the file:
# aws-encryption-cli-encrypt-input hello.txt-master-keys key=$cmkArn-metadata-output ~ / metadata--encryption-context purpose=test-output.
Decrypt the file:
# aws-encryption-cli-decrypt hello.txt.encrypted-master-keys key=$cmkArn-metadata-output ~ / metadata--encryption-context purpose=test-output.
On how to use AWS Encryption CLI encryption and decryption data to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.