mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Merge PR #481: Encrypt: set default RSA key size to 1024 everywhere, using the RSA_KEY_SIZE macro
This commit is contained in:
commit
8f3a4cc3b3
@ -2212,7 +2212,7 @@ bool RsaVerifyEx(void *data, UINT data_size, void *sign, K *k, UINT bits)
|
|||||||
}
|
}
|
||||||
if (bits == 0)
|
if (bits == 0)
|
||||||
{
|
{
|
||||||
bits = 1024;
|
bits = RSA_KEY_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hash the data
|
// Hash the data
|
||||||
@ -2251,7 +2251,7 @@ bool RsaSignEx(void *dst, void *src, UINT size, K *k, UINT bits)
|
|||||||
}
|
}
|
||||||
if (bits == 0)
|
if (bits == 0)
|
||||||
{
|
{
|
||||||
bits = 1024;
|
bits = RSA_KEY_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Zero(dst, bits / 8);
|
Zero(dst, bits / 8);
|
||||||
@ -2320,7 +2320,7 @@ bool RsaCheck()
|
|||||||
BIO *bio;
|
BIO *bio;
|
||||||
char errbuf[MAX_SIZE];
|
char errbuf[MAX_SIZE];
|
||||||
UINT size = 0;
|
UINT size = 0;
|
||||||
UINT bit = 32;
|
UINT bit = RSA_KEY_SIZE;
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
|
|
||||||
// Key generation
|
// Key generation
|
||||||
@ -2390,7 +2390,7 @@ bool RsaGen(K **priv, K **pub, UINT bit)
|
|||||||
}
|
}
|
||||||
if (bit == 0)
|
if (bit == 0)
|
||||||
{
|
{
|
||||||
bit = 1024;
|
bit = RSA_KEY_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Key generation
|
// Key generation
|
||||||
|
@ -128,7 +128,7 @@ void RAND_Free_For_SoftEther();
|
|||||||
#define DES_IV_SIZE 8 // DES IV size
|
#define DES_IV_SIZE 8 // DES IV size
|
||||||
#define DES_BLOCK_SIZE 8 // DES block size
|
#define DES_BLOCK_SIZE 8 // DES block size
|
||||||
#define DES3_KEY_SIZE (8 * 3) // 3DES key size
|
#define DES3_KEY_SIZE (8 * 3) // 3DES key size
|
||||||
#define RSA_KEY_SIZE 128 // RSA key size
|
#define RSA_KEY_SIZE 1024 // RSA key size
|
||||||
#define DH_KEY_SIZE 128 // DH key size
|
#define DH_KEY_SIZE 128 // DH key size
|
||||||
#define RSA_MIN_SIGN_HASH_SIZE (15 + SHA1_HASH_SIZE) // Minimum RSA hash size
|
#define RSA_MIN_SIGN_HASH_SIZE (15 + SHA1_HASH_SIZE) // Minimum RSA hash size
|
||||||
#define RSA_SIGN_HASH_SIZE (RSA_MIN_SIGN_HASH_SIZE) // RSA hash size
|
#define RSA_SIGN_HASH_SIZE (RSA_MIN_SIGN_HASH_SIZE) // RSA hash size
|
||||||
|
Loading…
Reference in New Issue
Block a user