AES加密,什么是公钥和私钥? [英] AES encryption, what are public and private keys?

查看:3875
本文介绍了AES加密,什么是公钥和私钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在AES加密(.net框架)中,公用密钥和私钥如何使用?



是否将公钥和私钥组合成一个完整的密钥,那么该算法使用公共+私钥来加密数据?



(以下简称的密钥用于举例)



例如
public key = 12345
private key = 67890



所以生成加密结果时使用的密钥是:1234567890

$ b $如其他人所说,AES是一种对称算法(私钥密码术)。这涉及单个密钥,这是发件人和收件人之间的共享秘密。类比是一个锁定的邮箱,而不是邮箱插槽。任何想要离开或阅读消息的人都需要有邮箱的密钥。



如果你真的想知道AES的血腥细节,那么有一个超级卡通,以引导您一路走来。



公钥密码术涉及涉及的每个收件人的两个相关的密钥 - 一个私钥只有收件人才知道的秘密,以及所有发件人都知道的相关公钥。



发件人使用收件人的公开密钥对邮件进行加密。该消息只能由具有与公开密钥匹配的私钥的接收者解密。



公开密钥加密的类比是一个锁定的邮箱强>邮箱。邮件插槽暴露并可供公众访问。它的位置(街道地址)是公钥。任何知道街道地址的人都可以到门口,通过插槽放下一个书面信息。但只有拥有私钥的人才能打开邮箱并阅读邮件。


In AES encryption (.net framework), how are the public and private keys used?

Are the public and private keys combined to form a full key, and then the algorithm uses the public + private key to encrypt the data?

(simplified keys used below for example purposes)

e.g. public key = 12345 private key = 67890

so the key used when generating the encryption result is: 1234567890

解决方案

As others have said, AES is a symmetric algorithm (private-key cryptography). This involves a single key which is a shared secret between the sender and recipient. An analogy is a locked mailbox without a mail slot. Anybody who wants to leave or read a message needs to have a key to the mailbox.

If you really want to know the gory details of AES, there's a superb cartoon to guide you along the way.

Public-key cryptography involves two related keys for each recipient involved - a private key which is a secret known only by the recipient, and a related public key which is known by all senders.

The sender encrypts the message using the recipient's public key. That message can only be decrypted by a recipient with a private key matching the public key.

An analogy for public-key encryption is a locked mailbox with a mail slot. The mail slot is exposed and accessible to the public. Its location (the street address) is the public key. Anyone knowing the street address can go to the door and drop a written message through the slot. But only the person who possesses the private key can open the mailbox and read the message.

这篇关于AES加密,什么是公钥和私钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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