views:

991

answers:

14

Brainstorming request

I need an idea for an authentication algorithm with some unusual requirements.

The algorithm would be used to verify that the sender of a message is legitimate.

Restrictions:

  1. The "transport layer" is e-mail
  2. the sender ('Alice') is a human being
  3. Alice only has access to a web browser and internet access (including a webmail account) as her tools; therefore she can't do very complicated calculations
  4. The receiver ('Bob') is a computer with no direct access from the internet.
  5. Bob has an email account that it checks periodically.
  6. Bob can send email.
  7. No sending info to a 3rd party: Alice and Bob can't send any out-of-band info. Reading some publicly available info (such as the time from a time server) is ok.

Assumptions:

  • Alice can access some information locally: maybe she carries a notebook, or we could even assume her web mail account is hack-proof, therefore sensitive information can be stored there.
  • Alice and Bob can exchange sensitive information directly at a time prior to the authentication (private keys?)

Non-goals:

  • encoding of the actual payload of the message is not necessary.
  • speed/latency are not (big) issues

Some ideas to get you started:

  1. Plain old hard-coded password.
    Problems:

    • brute force attack (not likely)
    • eavesdroping possible if the communication is done in clear text, then replay attacks possible
  2. Simple algorithm based on current date/time
    Example: Alice adds the current date, hour and minute and sends the result as the auth token, which Bob can verify. Let's assume that read-only access to a time server does not violate rule #7 (no 3rd party).
    Problems:

    • security through obscurity: the algorithm is somewhat safe only because it is not publicly available (well, it is now... oops!)
  3. Some sort of challenge-response mechanism - Alice sends a request for authentication, Bob replies with a challenge, Alice sends the expected response and the actual payload.
    What are the details of the mechanism? I don't know :)

What can you think of? I'm hoping to see some creative answers ;-)

Edit:

Maybe an example would make rule #3 clearer: let's assume that Alice is using a proprietary closed-source device <cough> iPhone <cough> to access the Internet, or she is standing in front of a public internet kiosk.

+5  A: 

Am I missing something obvious in suggesting a simple public/private key and signing the email?

Firefox has at least one extension to allow GPG in webmail.

Johan
I'm aware of the GPG extension. You're missing the *vanilla* part. No software should be installed on Alice's part except a web browser. The extension counts as extra-software.
Cristi Diaconescu
I didn't see the vanilla part in the question. So it's a public terminal?
Johan
How about doing the PGP/GPG thing in JavaScript? http://www.hanewin.net/encrypt/
DrJokepu
@Johan: The vanilla part was #3 - "Alice only has access to a browser" but you're right, it's not very clear. I hope my later added example at the end makes things a bit clearer.
Cristi Diaconescu
There are also lots of webmail services providing s/mime authentication and encryption. Of course you have to trust the webmail provider in this case, as the certificates are kept on the provides's server.
VolkA
+6  A: 

Two options I can think of:

  • Issue a card with one-time passwords (communication before the fact, notebook)
  • Electronic device that produces pincodes (avoids replay-attacks)
Lasse V. Karlsen
Some one-time-use token generator hardware would be a good solution indeed, but it does involve some $$ :)
Cristi Diaconescu
Yeah, but at some point you're going to have to weigh the cost of the solution up against the cost of whatever it is you're trying to protect. If all you have is a needle, going up against a bear is not a good idea. So if all you have is constraints, perhaps this is not solvable?
Lasse V. Karlsen
:-) It's quite possible. This is just an exercise of imagination.
Cristi Diaconescu
+2  A: 

If Alice can run code on her machine (for example by using JavaScript that is found on some public site, like: http://www.functions-online.com/en/sha1.html), she can receive the challenge, hash it together with the password, and send it back.

Untrots
Interesting! And I guess it complies with #7.
Cristi Diaconescu
+1  A: 

If you're not going to use PKI, which is far and away the best solution, try using a challenge-response system like CRAM-MD5 (although I'd suggest a different digest algorithm).

Your constraints make the implementation of a secure cryptographic system almost infeasible. Is there nothing you can do to change the transport?

David Grant
+1  A: 

Here's another suggestion:

  • Start with the Diffie-Hellman key exchange, resulting in a shared private key, known only to presumably-Alice and Bob.
  • Have a pre-defined password known only by Alice and Bob.
  • Have Alice encrypt the password using the shared key and send it to Bob
  • Now Bob can see that presumably-Alice really is Alice.

Problems:

  • Diffie-Hellman is not safe using small numbers.
  • What would be a simple symmetric encryption algorithm (for encrypting the password)?
Cristi Diaconescu
Will this not involve extra software on Alice's part?
Vilx-
Well, we can assume Alice has access to the calc application.
Bogdan Gavril
I was thinking of D-H with really small numbers, something you could count in your head or on a piece of paper (or with calc.exe :) - hence the susceptibility for brute force attacs.
Cristi Diaconescu
A: 

There are several methods I can think of:

Install a https encrypted service similar to:

http://webnet77.com/cgi-bin/helpers/blowfish.pl

or

http://cybermachine.awardspace.com/encryption.php/

Or you could issue one-time passwords in combination with a XOR encryption

Or you can write a simple Java App (if Java can be executed in the machine) that can be loaded via www and provides public key encryption.

Chris
+2  A: 

Consider to create a web page which contains the algorithm as JavaScript, possibly as a download (so she can download it once and carry it along on an USB drive).

The idea is that she opens the page, checks the source code (all JavaScript must be inline) and then enters her password in a text field on the page. The JavaScript will translate this into a code as she types (so no network traffic while she does this; if there is, there might be a keylogger running in the background).

After she has the code, she can copy it somewhere.

The JavaScript can use the current time as a seed. Slice the current time into five minute intervals. Most of the time, using the current time will be enough to decode the password and if you're close to the start of the five minute interval, try with the previous one.

See this site for an example: https://www.pwdhash.com/

Aaron Digulla
+4  A: 

Elaborating on lassevks answer:

In my company we use SecurID tokens from RSA for remote authentication.

It gives you a 6 digit number that changes every 60 seconds as an authentication token, supposedly your token generator and the server are the only ones in the universe which know the token that is valid right now.

As a low tech alternative, a set of n (10, 20, 100 - whatever is reasonable in your specific case) one time authentication codes can be given to Alice. I would ask her for a specific code (e.g. number 42 in the list). After using this code, it becomes invalid for further use.

Edit: See lacop's answer for a good implementation of the low tech solution.

Treb
And if the list is compromised?
David Grant
I like the idea - it fits well under the poor man's umbrella :-)The downside is, Alice needs to periodically refill her passwords list.
Cristi Diaconescu
a very good implementation of a list of one time password is https://www.grc.com/ppp.htm
Guillaume
@Cristi Diaconescu: Yes, but the generation of a new list can happen over the web, after Alice authenticated herself.
Treb
A: 

A simple way to protect data in transit without exchanging passwords is the three-way-XOR:

  1. Alice creates a few bytes using her own key.
  2. She XORs the data with these bytes to make them unreadable.
  3. Alice sends the encrypted data to Bob
  4. Bob creates a few bytes using his own key.
  5. He XORs the data with these bytes.
  6. Bob send the double-encrypted data back to Alice
  7. Alice applies her XOR pattern once more. Now, the data is only encoded with Bob's pattern
  8. Alice sends the data back to Bob
  9. Bob can now decode the data with his own pattern
Aaron Digulla
To send any reasonable amount of data this way an extra software will be required.
Vilx-
This is susceptible to a man in the middle attack.
David Grant
@Mr Potato head: is it ever! If you can grab the middle and any of the other two transmissions you can recover the plaintext by XORing them together.
Mike Boers
How does Bob verify Alice's identity? And the OP said encoding the message is not necessary.
Imran
@Vilx: As I said in another post, you can put that into a static HTML page which contains code in the form of JavaScript. That code could do the encoding.
Aaron Digulla
@Imran: That's why I posted this as an independent entry. It might help someone else.
Aaron Digulla
OK, thanks for the clarification.
Imran
A: 

Hmm... would this count as a thrid party?

Set up a brother of Bob - Charlie, who is accessible from the internet via HTTPS. To send a message to Bob Alice would first have to log on to Charlie (via plain old password) and then Charlie would give her a one-use token. Then she sends her email along with the token to Bob.

Vilx-
+6  A: 

In addition to Treb's answer, you can use one-time passwords you can print instead of SecurID. See "Perfect Paper Passwords" for details.

lacop
I was going to mention Perfect Paper Passwords, but you beat me to it !
Guillaume
"Even though each "passcode" is conveniently short, they provide more security than 6-digit hardware tokens that offer (only) one million possible numbers." I like it! +1
Treb
Also, they are cheap to print and easy to implement. All you need is to print new card when the old one is running out and carry it with you. If you loose it, no problem, just print another one.
lacop
+10  A: 

My idea of a human-friendly low-tech challenge-response mechanism:

  1. Bob changes the challenge every time he receives a valid message (for example he makes a salted hash of the current time)
  2. every invalid message sent to Bob makes him reply with the current challenge, so Alice can query him by sending an empty mail
  3. once Alice knows the challenge, she goes to https://www.pwdhash.com/
    • in "Site Address" she enters the current challenge
    • in "Site Password" she enters her personal password (which is known to Bob)
    • PwdHash generates a "Hashed Password"
  4. Alice writes a message to Bob, using the hash just created as the subject
  5. Bob receives the message, hashes the current challenge and Alice's password according to the PwdHash algorithm, and sees if his result matches the message subject
  6. if it does, Bob accepts the message and and sends out a confirmation containing the new challenge (essentially this is step 1)

Advantages:

  • cheap & simple, may even run on reasonably modern mobile devices
  • human friendly (no math, easy to remember, prerequisites easily available on the net)
  • no replay attack possible
  • no clear text passwords over the wire
  • does not run out of passwords (like one-time pads do)
  • no inherent time limits (like RSA tokens have)
  • the PwdHash web site can be saved on disk and called locally, no third party dependency here

Disadvantages:

  • Bob and Alice must pre-share a key (Alice's password), therefore Alice cannot change her password off-site
  • compromising Alice's password is the easiest attack vector (but that's the case with almost all password protected systems)

Note that PwdHash is an open hashing algorithm, Bob can easily implement it. The PwdHash web site works without post-backs, everything is client side JavaScript only, no traces left behind.

Tomalak
+1  A: 

The most simple solution is to make Bob periodically send mails to Alice's mail account. When she needs something from Bob, she has to reply using one of these mails. Bob can put some check tokens into the mail (mail ID, or a string which must be repeated in the subject or body of the mail).

Just like many of the email verification schemes work.

Drawback: this only proves that the attacker has access to Alice's mail account, not that it is in fact Alice herself. To solve this, you could tell Alice a password and use the "JavaScript HTML page" trick so she can encode the key from Bob using her password.

This would prove that she has access to her mail account and that she knows the password.

Aaron Digulla
A: 

I am currently writing up a patent application for an authentication method that appears to meet all of your posed constraints with none of the weaknesses identified in previously posted solutions. However I am unsure about how to commercialize my patent and don't want to fall into the trap of having a patent without a nmarket. Please let me know if, you know of a market that would justify the costs of patenting such an algorithm.

zaphenat paneah