混淆,散列和加密有什么区别? [英] What is the difference between Obfuscation, Hashing, and Encryption?

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

问题描述



这是我的理解:




  • 散列是一种单向算法;不能反转

  • 混淆类似于加密,但不需要任何秘密来理解(ROT13就是一个例子)

  • 加密是可逆的但是需要秘密这样做


解决方案

哈希是一种创建半基于更大的数据块的统一密钥。在给定的哈希中,你最终会有碰撞(例如,两个不同的数据计算到相同的哈希值),而当你这样做时,你通常会创建一个更大的哈希密钥大小。



混淆通常涉及到尝试去除有用的线索(即有意义的变量/函数名称),删除空格以使事情变得难以阅读,并且通常以复杂的方式进行事情以使得发生的事情变得困难。它不提供严重的安全级别,如真实加密。



加密可以遵循几个模型,其中之一是秘密方法,称为私钥加密双方都有秘密密钥。公共密钥加密使用共享单向密钥加密和私人接收密钥进行解密。使用公钥,只有收件人需要有秘密。


What is the difference between Obfuscation, Hashing, and Encryption?

Here is my understanding:

  • Hashing is a one-way algorithm; cannot be reversed
  • Obfuscation is similar to encryption but doesn't require any "secret" to understand (ROT13 is one example)
  • Encryption is reversible but a "secret" is required to do so

解决方案

Hashing is a technique of creating semi-unique keys based on larger pieces of data. In a given hash you will eventually have "collisions" (e.g. two different pieces of data calculating to the same hash value) and when you do, you typically create a larger hash key size.

obfuscation generally involves trying to remove helpful clues (i.e. meaningful variable/function names), removing whitespace to make things hard to read, and generally doing things in convoluted ways to make following what's going on difficult. It provides no serious level of security like "true" encryption would.

Encryption can follow several models, one of which is the "secret" method, called private key encryption where both parties have a secret key. Public key encryption uses a shared one-way key to encrypt and a private recipient key to decrypt. With public key, only the recipient needs to have the secret.

这篇关于混淆,散列和加密有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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