使用多个不同的密钥进行加密? [英] Encryption with multiple different keys?

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

问题描述

有没有办法以加密的方式存储数据,以便可以用几个不同的密钥进行解密?

Is there a way to store data in an encrypted way such that it can be decrypted with several different keys?

如果我使用key1加密数据,但是我想要使用键2,3和4进行解密。

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

这是可能吗?

推荐答案

GnuPG ,密钥加密在标准中。

GnuPG does multi-key encryption in standard.

以下命令将使用Alice和公共的公钥加密 doc.txt 鲍勃的关键爱丽丝可以使用她的私钥进行解密。 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

此功能在用户指南部分标题为加密和解密文档

This feature is detailed in the user guide section entitled "Encrypting and decrypting documents"

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

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