Considering that many people generate public keys non-stop, I guess some private keys are better to be avoided, for example private key 1 or the maximum key value allowed. Are there any general rules for checking that you private key is safe in this terms i.e. how far it is from the both ends of the range for example, or from the middle or with a few zero bytes in it or with a simple pattern that might attract people picking up keys?
The same question about seeds that are used to generate private keys: are all seeds acceptable or are there some checks in place?
Thank you!
Of course small keys aren't safe. There are no checks for key nor for the seed words. Only important thing is that it was randomly generated.
If it was, then it would be pointless to check if it some small key due to the huge possible range of numbers it could be. If there was any realistic chance for a key to be small, then random number generator is not doing a good job in the first place and that would be the actual problem to solve.
You simply shouldn't choose the numbers or seeds yourself, because as a human you are not a good source of randomness. As such, there is no need for checks then, as it is simply random otherwise.
This more comes down to how your computer functions IMO. If your compuer is good at randomely generating numbers, then your private keys/public keys should be safe and not be repeated. There have been reports that the randomisation in linux that is used is not as accurate as the randomisation in Windows (I'm not sure how accurate this was or whether it's still significant enough to cause a difference).
It's probably a good idea to check addresses/public keys on block explorers first to see if there's anything significant on them and see if they've already been used (but there probably won't be - and if they have, try to report it and not take any temptation to steal from the user's address you have the private key of if by an odd chance you manage to generate someone else's private key - but this would be near impossible).
I doubt that Windows is better at randomness. Not just because it is generally less security focused system and is closed source, which means there could be a quite predictable algorithm that chooses numbers under the hood. But also because there were many cases when the randomness was attacked in .NET framework. Some of the ransomwere was cracked due to these issues and they just started popping up relatively recently.
Of course there were old Linux versions with bad RNG, and some old routers still have crackable WiFi because of this, but as an open source software, you know what you are using.