tl;dr: Yes, it's reasonably safe.
When an attacker knows you use KeePass, then they might also assume that you use the standard settings for the password generator. That tells them the length and the character set [a-zA-Z0-9]. This makes it slightly easier to crack than if the length would not be known and if they would expect that you also use special characters. But even with that knowledge, the generated passwords are still far, far too strong to brute-force.
But how exactly are the passwords generated? If it would be a predictable pseudorandom number generator, that might be an attack point.
Looking at the sourcecode of KeePass 2.30, the password generator seems to be implemented in
KeePassLib\Cryptography\PasswordGenerator\PwGenerator.cs. It uses the class CryptoRandomStream from
KeePassLib\Cryptography\CryptoRandomStream.cs with the stream cipher Salsa20 used as a random number generator.
The password generator works like this:
- A random number is genrated (
PwGenerator.cs line 65). It uses the standard RNGCryptoServiceProvider from the .NET framework (
- The generated random number is combined with some additional entropy if available. I haven't bothered to find out where this entropy comes from (usually unpredictable user behavior like mouse movement or keypresses are used for this), but apparently it isn't assumed that entropy is always available.
- A SHA256 hash is generated from the random value with entropy (
CryptoRandomStream.cs line 114-118).
- That hash is used as encryption key for a Salsa20 stream cypher (
CryptoRandomStream.cs line 119).
- The stream cipher is used as a random number generator by repeatedly feeding its output as its input (
Salsa20Cipher.cs line 176-196).
To predict a password, one would need to crack Microsoft's cryptographic random number generator and predict the entropy (if used).
Alternatively, if someone would crack the Salsa20 cipher, one could predict a password from the previous password. According to Wikipedia "As of 2015, there are no published attacks on Salsa20".
Best regards, Irrationally Diligent Software Developer.