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

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

问题描述

是否可以加密数据,以便可以用几个不同的密钥解密?

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进行加密.爱丽丝可以使用她的私钥解密.鲍勃还可以使用他的私钥解密.

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天全站免登陆