使用多个密钥加密/解密 [英] encryption/decryption with multiple keys

查看:52
本文介绍了使用多个密钥加密/解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以加密数据,以便可以使用多个不同的密钥对其进行解密?

Is it possible to encrypt data, such that it can be decrypted with several different keys?

示例:

我已使用 key1 加密数据,但我希望能够使用 key 2、3 和 4 解密.

I've encrypted data with key1, but I want to be able to decrypt with keys 2, 3, and 4.

这可能吗?

推荐答案

GnuPG 在标准.

以下命令将使用 Alice 的公钥和 Bob 的公钥加密 doc.txt.Alice 可以使用她的私钥解密.Bob 也可以使用他的私钥解密.

The following command will encrypt doc.txt using the public key for Alice and the public key for Bob. Alice can decrypt using her private key. Bob can also decrypt using his private key.

gpg --encrypt --recipient alice@example.com 
    --recipient bob@example.com doc.txt

此功能在标题为加密和解密文档"

这篇关于使用多个密钥加密/解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆