我试图用非对称加密来加密我的数据。我选择了MD5作为算法。PS:我知道MD5碰撞。
我跟踪来加密和解密我的数据。它使用SHA256。我也可以用SHA1、SHA512成功地运行代码,但不能用MD5运行。
每当我将算法更改为MD5时,它会说
cryptography.exceptions.UnsupportedAlgorithm: This combination of padding and hash algorithm is not supported by this backend.
应该使用填充来用MD5?加密数据。
我的守则:-
# ########## Encrypting and d
我的场景是--我想在网络服务器上存储一个加密的容器。如果其他人拥有密钥,这个加密的容器应该可以在本地下载和解密/挂载。如果容器是~64 is (随机示例大小),并且我在本地挂载它,添加一个文件,然后卸载.是否有一种方法只将对加密卷的更改(假设md5/sha1 1散列在您将一个新文件放入容器后更改)上传到服务器,并且只更改容器的这些部分,而不必每次重新上载整个容器?
我在C#中使用加密,如下所示:
// Step 1. We hash the passphrase using MD5
// We use the MD5 hash generator as the result is a 128 bit byte array
// which is a valid length for the TripleDES encoder we use below
var utf8 = new UTF8Encoding();
var hashProvider = new MD5CryptoServiceProvider();
var tdesKey = hashP