Live data from Hacker News

Government launches login.gov to simplify access to public services

18f.gsa.gov

111–120 of 173 posts

Re: Government launches login.gov to simplify access to public services

#111
Login Spec Here: https://github.com/18F/identity-idp/blob/master/docs/encrypt...

Many aspects of this make no sense to me... so IF this is actually what they are doing...

  hash(user, password) {
    salt = CS-PRNG(160bit)
    s = scrypt(salt, password)
    z1 = s[0:32]
    z2 = s[32:64]

    R = CS-PRNG(256bit)
    d = HSM(R) XOR (pad_right(z1, 0x00, 32 bytes))
    cek = SHA256(z2 || d)
    hash = SHA256(cek)
    save_record(user, d, salt, hash)
  }
First and foremost, if the HSM operation is to have any meaning, it needs to be in the critical path for encrypting / decrypting data and possibly also calculating the password hash. If you don't need to go through the HSM to perform a decrypt or a hash validation, then obviously the HSM isn't actually securing anything! All it becomes is a source of entropy into the key derivation, but that's more likely to harm than help.

From their own specification;

"It is important to note that the HSM factor strengthens the model in a way different than the other two factors, which rely on keeping them secret. Because the HSM is tied to a physical object, brute force attacks on our database would need to happen in proximity to the HSM, i.e., within our AWS environment, which greatly reduces the attack surface. A bad actor with a copy of the database cannot apply their own computing power to brute force cracking of passwords."

But to be clear, if you have 'd', 'salt', and 'hash', you can brute force attack passwords as;

  s = scrypt(salt, password)
  h = SHA256(SHA256(s[32:64] || d))
  h =? hash
Now, if they were not storing 'd' in the user record, you might think to store what they call 'R' in the user record. Then you would have to go through the HSM as part of each login to derive the correct 'd' and 'cek' which is how it's supposed to work.

But even that design is still not good enough. You don't want to allow an attacker to pull 'R' from your database, send it through the HSM just once, and then be able to start brute forcing the password forever from there on out. If you're going to pay for an HSM, and your going to call it for each password verification, then you better make sure an attacker is also required to call the HSM for each attempt at verifying a password. Which means you send your password hash (or something derived from it) through the HSM, not just a random 'R'!

Next, besides all of that, the design is horrific for end users. PII is encrypted with 'cek' above. That means if you lose your password, you lose your PII. Which means starting basically a new account from scratch! I can't endorse the idea that a password reset from an end user will effectively wipe out their account information and make them start over.

The vast majority of users will be logging into this service infrequently. Combine this with a typically user hostile password policy, and the result is that a large percentage of users will be resetting their password every time they need to login. With this design, that means they have to start over with validation through a third party... and guess who that third party is? Companies like Equifax now responsible for the single largest PII breach in American history.

Now they've also added something like a recovery key which the user is supposed to print out and save at the moment they create their account, and that key is used to separately encrypt all the PII. So if the user forgets their password but can find this magic piece of paper, they can enter this key (that'll be fun) as part of the password reset process and reset their password without effectively wiping their account. To think "Average Users" will succeed in doing this belies reality.

But wait... where is this magic key being saved on login.gov servers? If it was a private key they give to the user and they just keep the public key on their side that could work, but it's actually an uppercase 16 character alphanumeric token... 5.17 * 16 = 82 bits. Let's hope that's not literally the encryption key, but the alternative -- it's a token used to lookup the key in their database -- would completely defeat the purpose of encrypting the PII with a PBK in the first place?! And, even if it was the literal encryption key, when you change or update your PII, if they don't also keep it on their side, how would they update their secondary encrypted PII record?

Re: Government launches login.gov to simplify access to public services

#112

Earlier quoted context omitted.

What happens when important websites start requiring login.gov, and then the government shuts down your account? Can't just sign up for a new one, can you?

Er, why not? Why would the government shut down the account you use to identify yourself, if not because there was something wrong with it, in which case presumably they'd want you to create a new one?

I think whenever someone asks a "why would they?" question, it's best reworded as "why wouldn't they?"

The government is made up of people, and given enough people, at least one is bound to do something stupid for reasons most won't understand. If someone can do something, no matter how ridiculous, at some point, someone will.

Re: Government launches login.gov to simplify access to public services

#113
post #63

Earlier quoted context omitted.

It allows them to see what you log in to and thus what services you use, much like Facebook can often do as well. (Although luckily I haven't seen that as the only option anywhere yet - that might not be the case for a system that everyone in one's target audience might be forced to use.)

> Now seems like the time to set the expectation that this service may not ever be used by private websites. Oh shit! The government knows I bought something from custom-fishing-lures.com! Ruuuuun! Seriously, what you just listed is a reason not to use the government's Oauth for every website and ban all other implementations. What OP seemed to say, and what I disputed, is the idea that this service should not ever b…

Don't ever trust anyone who takes your stuff at the threat of violence.

Re: Government launches login.gov to simplify access to public services

#114

This appears valuable and well executed, but I worry that private businesses will be eager to outsource their authentication to this service, if they are allowed to. And once it's fully stood up, I suspect the government would be all too eager to oblige. This might be convenient, but might also mark the beginning of a major new point of U.S. government control over the Internet, with all the surveillance and other ci…

Given the alternative of handing out my SSN and hoping for the best, I'd be more than happy to use this for banking and related services. Presumably, third-party use would be covered by some form of ToS, and maybe we'd see actual repercussions for leaking data that originated here.

This thread is the digital equivalent of why every attempt so far to set up a sane ID system in the US has floundered, leaving us stuck with the worst possible solution, SSNs.

Re: Government launches login.gov to simplify access to public services

#115
post #105
post #63

Earlier quoted context omitted.

It allows them to see what you log in to and thus what services you use, much like Facebook can often do as well. (Although luckily I haven't seen that as the only option anywhere yet - that might not be the case for a system that everyone in one's target audience might be forced to use.)

Tinder is Facebook-only, last I checked

It allows email now

Re: Government launches login.gov to simplify access to public services

#116
post #71

Earlier quoted context omitted.

Given the alternative of handing out my SSN and hoping for the best, I'd be more than happy to use this for banking and related services. Presumably, third-party use would be covered by some form of ToS, and maybe we'd see actual repercussions for leaking data that originated here.

Repercussions? For the OPM hack, I got a form letter and a year (I think, I didn't use it) of credit monitoring. That was some of my most intimate information. That was a huge invasion of my privacy. I didn't even get a phone call. I didn't even get a sincere apology.

Just as an FYI, I think they extended the period to 10 years. I agree that it was handled poorly!

Re: Government launches login.gov to simplify access to public services

#117

This appears valuable and well executed, but I worry that private businesses will be eager to outsource their authentication to this service, if they are allowed to. And once it's fully stood up, I suspect the government would be all too eager to oblige. This might be convenient, but might also mark the beginning of a major new point of U.S. government control over the Internet, with all the surveillance and other ci…

Given the alternative of handing out my SSN and hoping for the best, I'd be more than happy to use this for banking and related services. Presumably, third-party use would be covered by some form of ToS, and maybe we'd see actual repercussions for leaking data that originated here.

Wouldn't it be entertaining if the SSN leak was just a really clever PR boost for the Trump administration?

I'm certainly entertaining conspiracy theory level ludicrousy, but it is entertaining.

Re: Government launches login.gov to simplify access to public services

#119
post #75

Earlier quoted context omitted.

It's bad enough when sites require you to use Facebook to log in. At least Facebook can't send you to jail and you can have (with some effort) a pseudonymous Facebook account. Sites will use such a service to invade your privacy even further, and the government has a record of every site you've logged into and when.

> Sites will use such a service to invade your privacy even further, That's not how OAuth works. https://en.wikipedia.org/wiki/OAuth > the government has a record of every site you've logged into Only the ones where you chose to use their service. Or are we imaginging a future where this service has been made mandatory, and logins and passwords have been abolished? Honestly, the amount of FUD in this thread is absurd…

The true point of imagining the login.gov will become the defacto standard for Oauth is the same reason why Tinder was Facebook login only. It's more secure and easier for people to use when they only have one login. The consolidation of most internet logins to login.gov gives the US government more power that it shouldn't have. All you need to do is look at Google. It's not necessarily an everyday appearance, but Twitter is full of accounts of Google revoking access to accounts with no warning, and no effective or efficient way to appeal.
Post reply on HN