简体   繁体   English

我应该使用什么类型的加密

[英]What type of encryption should i use

I need to find out what type of encryption is suitable for me.我需要找出适合我的加密类型。 For my case i usually need to pass information from my mobile webapp to a .NET webservice via ajax.对于我的情况,我通常需要通过 ajax 将信息从我的移动 webapp 传递到 .NET webservice。

To summarize:总结一下:

(Encrypt using javascript)Mobile ---Encrypted Data--> WebService(decrypt in C#) (使用 javascript 加密)移动 --- 加密数据 --> WebService(在 C# 中解密)

Just use SSL - than all your transmission will be secure and the changes in your code will be minimal (just putting https in front of your urls should be enough).只需使用SSL - 您的所有传输都将是安全的,并且您的代码更改将是最小的(只需将https放在您的网址前面就足够了)。

Using https is not that enough because it uses mostly RSA encryption, which is crackable using prime number generator algorithm.使用 https 还不够,因为它主要使用 RSA 加密,可以使用素数生成器算法破解。

I suggest to use concatenated encryption process, use openssl RSA 4096 to encrypt aes key and use aes to encrypt your message.我建议使用级联加密过程,使用 openssl RSA 4096 加密 aes 密钥并使用 aes 加密您的消息。 Beaware this is crackable also by eavedropping your communication and extracting your aes key.请注意,这也可以通过窃听您的通信并提取您的 aes 密钥来破解。

I would suggest the following: encrypt your aes key with any private algorithm you can write.. then encrypt the output with RSA.. on the receive end, decrypt RSA to get the encrypted aes key, use your algorithm to decrypt it, then use aes key to decrypt the data.我建议如下:使用您可以编写的任何私有算法加密您的 aes 密钥。然后使用 RSA 加密 output .. 在接收端,解密 RSA 以获得加密的 aes 密钥,使用您的算法解密它,然后使用aes 密钥来解密数据。

i suggest to keep on changing the aes key based on a some random value..我建议根据一些随机值继续更改 aes 密钥..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM