4 ms·
You can do TOTP authentication on any device that you do trust. It's just an HMAC of a timer. I use oauthtool: https://www.nongnu.org/oath-toolkit/ https://www.
by aftbit 7y ago
You can do TOTP authentication on any device that you do trust. It's just an HMAC of a timer. I use oauthtool: https://www.nongnu.org/oath-toolkit/ https://www.nongnu.org/oath-toolkit/
- toomuchtodo 7y agoAre there any tools out there where the TOTP seed is encrypted and multiple parties (X person key system) are requested to auth to grant access?
- ses1984 7y agoWhat do you mean by x person key system, multiple parties are requested to auth to grant access, something like shamirs secret sharing?
- toomuchtodo 7y agoThat’s the underlying primitive, yes.
- ses1984 7y agoDo you mean multiple people required to get a single totp code or multiple people authorized to get a single totp code?
- toomuchtodo 7y agoThe former. Think of it as 3FA. Something you know, something you have, and multiple people who need to grant access to that thing you have.
- ses1984 7y agoSure you can bake 3fa into your applcation. Hashicorp vault has something like this to generate a root token. You can split your unseal key according to shamirs secret sharing. You can bring together a specified number of unseal key shards and generate a new root token with them. The app had endpoints to manage all this. You could create your own app with your own endpoints with similar functionality. I don't think there are cryptographic primitives to give you this easily, without some trust logic baked into the app layer.
- vageli 7y ago> Are there any tools out there where the TOTP seed is encrypted and multiple parties (X person key system) are requested to auth to grant access? Do you have an example of such a system? I would be curious to read about the motivating use case.
- toomuchtodo 7y agohttps://en.wikipedia.org/wiki/Two-man_rule https://en.wikipedia.org/wiki/Two-man_rule
- vageli 7y agoI am aware of the principle. But why would the TOTP seed be encrypted by multiple parties versus a system requiring k of n users to respond with a TOTP response or something else?
- toomuchtodo 7y agoI think we're just arguing over implementation details at this point.
- vageli 7y agoMy apologies, I had hoped to communicate that my comment was specifically about implementation details.
- yabadabadoes 7y agoAFAIK the simpler option has been 16 character passwords entered by 2 people physically at the same console. IMO TOTP or even U2F have serious over the shoulder and grabby partner kinds of problems compared even to needing to type with semiprivacy. Technically, in PAM, etc you could always add multiple rules.. But mostly this devolves into RBAC with separate roles so 1 type of admin does each step, but an absent admin is replaceable with another of the same type. I tried to push a change/publish approach over a more traditional RBAC approach once, but it didn't fly.
- tzs 7y agoHmmm...so let's say the server, S, knows a TOTP seed, and that seed is shared with Alice and Bob via Shamir's secret sharing method. To use TOTP then Alice and Bob have to contribute their shares to something, that something has to combine the shares to recover the key, and then generate the TOTP code for the current time, which it sends to S (or sends back to Alice and/or Bob who sends it to the server?), which knows the seed and generates the code for the current time, and checks to see if they match. The question then is what handles the share combining? You'd need some sort of intermediate party that just receives shares and computes the TOTP code for sending to the server (directly or indirectly). Alice and Bob have to trust that this party will not keep the shares or keep the recovered code because then the entity could generate the TOTP code at will in the future without Alice or Bob's input. It would probably make more sense to just have the server keep separate TOTP seeds for Alice and Bob, and authorizing requires Alice and Bob to both send their separate TOTP codes to the server. Where things like secret sharing shine is when you have a secret that that S is not suppose to know persistently. For example, we use it at work for a database with sensitive data. The data is encrypted, with the key in non-paged RAM. When the server starts, a couple shareholders enter their shares, which reconstructs the key. If someone were to steal the server itself they would not get the key.
- sansnomme 7y agoHmm, we can call it Shamir's Secret Blockchain.
- tzs 7y agoHah...before you commented, I searched to see if there were any decent TOTP command line tools, found that, found that it's available via Homebrew ("brew install oath-toolkit"), and installed it. After that, I tried several examples from the man online man page [1], copying/pasting from Firefox to a terminal. Many of them failed, with errors like "oathtool: hex decoding of secret key failed". To save others time...get your examples for copy/paste by doing "man oathtool" in another terminal and copying from there. The online manual has the dashes in arguments like "--totp" and "-w" rendered as Unicode minus signs (U+2212). Command line arguments need good old fashioned dash (U+002D). There's an email address at the bottom of the page for reporting bugs, but my email client didn't like it. Sure enough, there are dashes in the email address which on the web page are Unicode minus signs, so had to grab it from the man page to send off the mail. [1] https://www.nongnu.org/oath-toolkit/oathtool.1.html https://www.nongnu.org/oath-toolkit/oathtool.1.html