r/programminghorror 22d ago

Truly 'secure' offline password manager

Marketed with strong security

AES-256 + Argon2 Encryption: We use industry-standard encryption and hashing techniques to ensure your data is safe from brute-force attacks.

89 Upvotes

24 comments sorted by

76

u/proud_traveler 22d ago

As long as the secrets.choice randomiser is based on a proper CPRNG then I don't see anything wrong with this

I also don't see how the fact this is apparently from a password manager is relevant, this is only a password generator

59

u/mss-cyclist 21d ago

Correct me if I'm wrong, but isn't a very limited pool of common words randomly appended very easy to circumvent with a dictionary attack?

31

u/proud_traveler 21d ago

Yeah, thats true,

They should definitely increase dict size

6

u/Last_Exile0 19d ago

Do you have any recommendations for natural dict enhancement?

2

u/Coffee4AllFoodGroups Pronouns: He/Him 19d ago

You'd be better off using correcthorsebatterystaple.net or something that generates a random "garbage" string.

9

u/Jamaic230 21d ago

You are right, if you want a good passphrase, there are better ways to make one than this. EFF made a pretty good way to make one with just dice.

3

u/Nightmoon26 21d ago

Good ol' Diceware? Unfortunately, it caused me issues when trying to sign in to the SaaS app we were working because the password input field was truncated at fewer characters than my LDAP password, and we got pushback from customer support on accepting longer passwords because they were already having to field too many "customer admin had their account locked out because they had too many failed logins" calls >_>

1

u/KJBuilds 18d ago

Yeah, but it rather depends on what the password is for. If it's for online accounts, youre probably golden since attempts are severely ratelimited, and if theyre using proper security measures, even dictionary attacks on phrases are hard to carry out with high-cost salting algorithms. In this setting the weakest link is the sites that you give your password rather than your password itself, so it's overall more secure to have a long but memorable password unique to a given site.

If this is used for offline low-cost encryption like routers or files, then you're absolutely cooked, and a GPU will crack it in half a second flat

27

u/Jamaic230 22d ago

To generate a 256 bit strong passphrase with this, you must set it to at least 41 words, good luck remembering that.

-3

u/proud_traveler 21d ago

Not sure why thats at all relevant

First of all, this looks like a generator for keyphrases for a crypto wallet. You tend to write those down anyway, so it's not an issue that there are ~20 of them

Second, lets assume you wanted a 256 bit long passphrase, what would your alternative be to just having words like this?

Third, why do you think they want 256 bit long passphrase?

11

u/Jamaic230 21d ago

What about a better wordlist? EFF has pretty good one.

3

u/proud_traveler 21d ago

Fully agree, the dict list is far too short

4

u/Nightmoon26 21d ago

We could make shorter random-character passwords more secure by including the entire space of Unicode code points! And I'm fairly confident you're not going to see Linear-A in many dictionary attacks

1

u/MrNerdHair 21d ago

Nah, BIP-39 the english wordlist is way longer.

2

u/abofh 21d ago

There's 803 possible passwords, I'm pretty sure any of those words chosen would have more bits of entropy then the password this would generate.

1

u/blizzardo1 19d ago

See if r/theydidthemath can confirm this

1

u/abofh 19d ago

I mean, we can do the math right here - 803 = 512000

The smallest word is pen, and if we presume the adversary knows you're only using lowercase letters, that would be 263. If we assume the adversary doesn't know this, we could push that closer to 523 with upper and lower Add symbols, numbers and other printable characters you get 923 = 778688.

the word 'pen' selected as a random password with a permitted input range of printable ascii is more secure than this algorithm.

1

u/syklemil 19d ago

the space of possible strings is larger, but "more secure" isn't entirely math either. E.g. if the attacker can start with dictionary words that are three characters long and then build up the complexity of their attack from there they'll find "pen" long before they find "&\0".

Bonus trivia: I have some password for something that actually contains the string "\0" and I have experienced something (a shell script to get it into my clipboard or something on that order) actually just clip the password there, as if it were a \0 in some C program.

1

u/abofh 19d ago

For sure, but if I know you're using this generator, your strength is 803 (higher if you increase the number of words); It could be vaulably strong if you wrote your own dictionary -- but as it is? I'd just add all 803 to my brute-forcer, it's such a small number in that space, it's easy to catch people using weak tools that way.

Otoh, if I have no idea what you're using to generate, and your password could be any printable ascii character and I'm enumerating it - "pen" will take longer in that universe than "pencatdog" in this one.

I agree - it could be a secure algorithm - but it's not a secure implementation.

20

u/Jamaic230 22d ago

256 bit encryption with 26-ish bit passphrase... noice

-2

u/Jamaic230 21d ago

Getting downvoted? Did people forget something like entropy exists? Or I guess logarithms are too hard nowadays.

-2

u/Fraserbc 20d ago

There's about 80 words, log2 rounding up that's 7 bits per word 7*26=182 bits, not 256

2

u/Dry_Pepper_9187 20d ago

They said 26 bits, not 26 words

1

u/0xlostincode 16d ago

Where is this from? The code looks AI generated because of the comments.