Remove cryptography

As discussed in #694, vim encryption uses old,
obsolete algorithms that are poorly implemented.
Since insecure cryptography is worse than no
cryptgraphy, the community voted in favor of
removing all crypto.

Various alternatives to the old crypto is
being discussed in #701.

Closes #694.
This commit is contained in:
John Schmidt
2014-05-07 18:04:54 +02:00
committed by Thiago de Arruda
parent 32d018b57e
commit 85338fe1d5
33 changed files with 16 additions and 1971 deletions

View File

@@ -9,7 +9,6 @@
///
/// Vim specific notes:
/// Functions exported by this file:
/// 1. sha256_key() hashes the password to 64 bytes char string.
/// 2. sha2_seed() generates a random header.
/// sha256_self_test() is implicitly called once.
@@ -284,23 +283,6 @@ char_u *sha256_bytes(char_u *buf, int buf_len, char_u *salt, int salt_len)
return hexit;
}
/// Gets sha256(buf) as 64 hex characters in a static array.
///
/// @param buf
/// @param salt
/// @param salt_len
///
/// @returns sha256(buf) as 64 hex chars in static array.
char_u* sha256_key(char_u *buf, char_u *salt, int salt_len)
{
// No passwd means don't encrypt
if ((buf == NULL) || (*buf == NUL)) {
return (char_u *)"";
}
return sha256_bytes(buf, (int)STRLEN(buf), salt, salt_len);
}
// These are the standard FIPS-180-2 test vectors
static char *sha_self_test_msg[] = {
"abc",