Repository navigation
Recommended KDF memory usage? #2736
|
I was going to make an issue, but I determined that the error I was getting when attempting to create new entries, "KDF memory usage too high" was probably expected behaviour and that, well, my memory usage is probably too high. It was set to 1024 MiB but I lowered it to 64MiB and the issue is resolved. The reason for this post is, there is no information anywhere that I can find, that gives you any idea whether this number is high or low. I looked at the wiki; https://github.com/Kunzisoft/KeePassDX/wiki and in KeepassXC's documentation (just for good measure), on the issue tracker and elsewhere. I don't remember what the default value is or how to reset it to that. What is the default or recommended value? Is there any resource online that gives you a clue as to which value you should use? I'm comfortable using the default value or double it. The extent of my understanding as to the purpose of memory usage is to simply make the database slower to open for adversaries. But why is it that your entries are limited based on the KDF memory usage? My settings for reference: |
Replies: 1 comment 2 replies
|
From the KeePassDX 4.5.5 source: Default: 16 MiB for Argon2 ( Why you got the error: KeePassDX doesn't use a fixed maximum. Before running Argon2 it checks the memory setting against 3/4 of the RAM Android currently reports as available ( Why it hit when creating entries: creating an entry saves the database, and every save derives the key again with your KDF settings. Keep in mind that every device you open the database on has to run the same KDF, so pick a value your weakest device can handle quickly. Then use the "calculate for 1s" button for the rounds, like you did. |
From the KeePassDX 4.5.5 source:
Default: 16 MiB for Argon2 (
DEFAULT_MEMORYindatabase/.../crypto/kdf/Argon2Kdf.kt). For comparison, KeePassXC's default is 64 MiB (ARGON2_DEFAULT_MEMORY = 1 << 16KiB, with 10 rounds and parallelism 4), so the 64 MiB you're on now is a normal, reasonable value. OWASP's minimum for Argon2id is 19 MiB with 2 iterations. Going above 64–256 MiB mostly just makes opening slower on your weakest device.Why you got the error: KeePassDX doesn't use a fixed maximum. Before running Argon2 it checks the memory setting against 3/4 of the RAM Android currently reports as available (
ActivityManager.MemoryInfo.availMem,Limits.LimitOperationType.KDFwith ratio3f/4). If…