在 Visual Basic .NET 中使用 Rjindael 和 RSA 加密存储在二维码中的数据 [英] Using Rjindael and RSA to encrypt data stored in QR code in Visual Basic .NET

查看:70
本文介绍了在 Visual Basic .NET 中使用 Rjindael 和 RSA 加密存储在二维码中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想加密一些数据(希望价值不超过 500 字节)并将其存储在二维码中.最初我想使用 RSA,因此数据将使用用户 A 的私钥和用户 B 的公钥进行签名,但不幸的是,VB.NET 不喜欢加密那么多数据.我读过我应该使用 Rjindael 来加密实际数据,然后使用 RSA 来加密 Rjindael 使用的密钥.但是,我不太幸运能够在网上搜索某种教程或其他东西.

I'm wanting to encrypt some data (hopefully under five hundred bytes' worth) and store it in a QR code. Originally I wanted to use RSA, so the data would be signed with User A's private key and User B's public key, but unfortunately, VB.NET doesn't like encrypting that much data. I've read that I should use Rjindael to encrypt the actual data, and then use RSA to encrypt the key used by Rjindael. However, I'm not having much luck being able to search the web for some kind of tutorial or something.

此外,如果我想将其存储在二维码上,我是否不必同时存储 Rjindael 使用的加密数据和加密密钥?你认为这一切都合适吗?我可以在中等纠错中使用版本 40(根据 http://www.denso-wave.com/qrcode/vertable4-e.html,它存储 18,672 个数据位"),但如果可能的话,我更愿意使用较低版本(即更小).

Also, if I was wanting to store this on a QR code, wouldn't I have to store both the encrypted data and the encrypted key used by Rjindael? Do you think this would all fit? I may be able to use version 40 on medium error correction (according to http://www.denso-wave.com/qrcode/vertable4-e.html, it stores 18,672 "data bits"), but I would prefer to use a lower version (that is, smaller) if at all possible.

生成二维码不是问题(我知道有一个 .NET 库可以解决这个问题),我只是对开始加密数据感到好奇.

Generating the QR code won't be the problem (I know there's a .NET library for that), I'm just curious about getting the data encrypted to begin with.

感谢您的帮助!

山姆

推荐答案

查看二进制"列.这实际上是您可以存储的字节数.尽管可能,但在实践中,版本 10 以上的任何内容都难以扫描.在版本 20 以上,使用相机很难,但可以从打印页面上进行扫描.因此,如果重点是使用相机进行扫描 - 听起来不适合实践.

Look at the "binary" column. This is actually how many bytes you can store. Anything above version 10 gets a bit hard to scan in practice, though possible. Above version 20 it's quite difficult from a camera, though can be scanned off a printed page. So if the point is to scan with a camera -- no doesn't sound like it will fit in practice.

这篇关于在 Visual Basic .NET 中使用 Rjindael 和 RSA 加密存储在二维码中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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