Increase scrypt KDF effort for generating the config file key from the password
This commit is contained in:
parent
8a83827042
commit
7f1493ab92
@ -22,7 +22,7 @@ namespace cpputils {
|
|||||||
class SCrypt final {
|
class SCrypt final {
|
||||||
public:
|
public:
|
||||||
static constexpr SCryptSettings ParanoidSettings = SCryptSettings {32, 1048576, 8, 16};
|
static constexpr SCryptSettings ParanoidSettings = SCryptSettings {32, 1048576, 8, 16};
|
||||||
static constexpr SCryptSettings DefaultSettings = SCryptSettings {32, 524288, 1, 1};
|
static constexpr SCryptSettings DefaultSettings = SCryptSettings {32, 1048576, 4, 1};
|
||||||
static constexpr SCryptSettings TestSettings = SCryptSettings {32, 1024, 1, 1};
|
static constexpr SCryptSettings TestSettings = SCryptSettings {32, 1024, 1, 1};
|
||||||
|
|
||||||
SCrypt() {}
|
SCrypt() {}
|
||||||
|
@ -33,7 +33,7 @@ CryConfigLoader::CryConfigLoader(shared_ptr<Console> console, RandomGenerator &k
|
|||||||
|
|
||||||
optional<CryConfigFile> CryConfigLoader::_loadConfig(const bf::path &filename) {
|
optional<CryConfigFile> CryConfigLoader::_loadConfig(const bf::path &filename) {
|
||||||
string password = _askPasswordForExistingFilesystem();
|
string password = _askPasswordForExistingFilesystem();
|
||||||
std::cout << "Loading config file..." << std::flush;
|
std::cout << "Loading config file (this can take some time)..." << std::flush;
|
||||||
auto config = CryConfigFile::load(filename, password);
|
auto config = CryConfigFile::load(filename, password);
|
||||||
if (config == none) {
|
if (config == none) {
|
||||||
return none;
|
return none;
|
||||||
@ -69,7 +69,7 @@ CryConfigFile CryConfigLoader::_createConfig(const bf::path &filename) {
|
|||||||
auto config = _creator.create(_cipherFromCommandLine);
|
auto config = _creator.create(_cipherFromCommandLine);
|
||||||
//TODO Ask confirmation if using insecure password (<8 characters)
|
//TODO Ask confirmation if using insecure password (<8 characters)
|
||||||
string password = _askPasswordForNewFilesystem();
|
string password = _askPasswordForNewFilesystem();
|
||||||
std::cout << "Creating config file..." << std::flush;
|
std::cout << "Creating config file (this can take some time)..." << std::flush;
|
||||||
auto result = CryConfigFile::create(filename, std::move(config), password, _scryptSettings);
|
auto result = CryConfigFile::create(filename, std::move(config), password, _scryptSettings);
|
||||||
std::cout << "done" << std::endl;
|
std::cout << "done" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user