Asymmetric Encryption and Decryption

给你一囗甜甜゛ 提交于 2019-12-05 15:14:42

A bit of discussion going, but here is my humble attempt to answer the questions:

Using a different algorithm (like the one on the site), will I be able to decrypt the information back using my private key? Or is this impossible since the algorithms were different?

You most certainly will not be able to decrypt the data. Generally, you need a full match for the algorithm and keys. What can be different however are: platforms, OSs, hardware, languages or programs used to encrypt/decrypt. This is because an algorithm acts as a public contract with well-defined spec and implementation can be different as long as all the public API render the same result.

My point is, will the end result always be the same if different encryption algorithms are used, assuming that the keys used are correct?

Nearly every time these will be different results (saying nearly, I am just unaware of any such algorithms). You need to have full match for algorithm and required keys.

Is there some standard way to encrypt information to make it decryptable across different machines, maybe different programming languages?

Yes RSA, for example, keep your private key safe and share your public key. This is what HTTPS does first. Everyone with a public key can decrypt data encrypted with private key.

Or, you can use AES, a symmetric algorithm with a single key to encrypt/decrypt. This is what HTTPS does second. Given you share the key only between trusted parties, both can encrypt and decrypt (but no one else can, given they have no key).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!