Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I made this small tool for make & read easily an encrypted message without nothing to install, just a simple private key like a word or a couple of words to share. (Without say it directly of course but with a guess, like a place gone together with the correspondent, renembered). I think the result message and the system is not bad to run safely for my (basics) needs, anyway an expert view could be great! Please note i am just someone who like learning new things, really not an expert into coding or cryptography!

  1. I used this tools:

    • Cryptoxi is the primary script

    • jcryption for aes256 browser encryption

    • Mcrypt for serpent256 server encryption

    • Tinymce

    • Base64 drag &drop

    • jq

    • jq-mobile

    • (..)

  2. Here is the routing process:

    • Client connect, send an automatic unique hash generated by javascript, server respond a main and unique key based on the previous hash. This is used for encrypt all future GET and POST requests with aes256 into browser by javascript.
    • Client input a private key, write his message with pictures if need, validate for convert into html and base64 for pictures.

    • Client send this trough the AES tunnel to server.

    • Server decrypt aes, encrypt into serpent-256 & re-send it encrypted to client trough aes tunnel again,so final message is encrypted into serpent256 only. Then client send it by their own tools, like mail or sms.

    • Receiver do the same process on the other side by pasting or just click the generated url with the encrypted hash (Whith ?bin=... php variable on it) and of course by writing the private key.

    • When both user quit or refresh the page, keys and internals data are destroyed.

Here the site, sorry it's French, hope this is not a too big problem! http://cryptop.at/m_.php. Also a YouTube video description (also in French).

So the question is, Do you see some kind of security hole?

Of course the main problem looks like if the primary hash is intercepted, but this allow only one connection, one time, so I think it's just impossible to catch & use this hash for reed the second user private key, or I am wrong?

share|improve this question
    
Perhaps you could describe your encryption protocol in more detail here. For example, how is the message formatted/wrapped, how is the word turned into a key, what mode and cipher, etc. That way we don't necessarily have to go to your site, download your software, possibly reverse engineer it, etc just to see exactly what you are doing. –  mikeazo Oct 3 '13 at 15:12
    
Hi and sorry i have add some details about the routing process. –  Cryptopat Oct 3 '13 at 15:30
    
Let me see if I get this. Client sends a hash to the server. Server uses that to generate a key which is sent back to the client. That key is used for future GET and POST requests? What mode for AES are you using? –  mikeazo Oct 3 '13 at 17:22
    
That's right^ aes-256 into cbc mode, for the m-crypt part. This is done with an adapted j-cryption 3.0 library. –  Cryptopat Oct 3 '13 at 18:42
1  
What protects the key exchange? –  mikeazo Oct 3 '13 at 19:14
show 4 more comments

1 Answer

Based on the details given in the question and the comments, it appears your protocol does nothing to protect the key exchange. The client sends a hash to the server, the server uses that hash to generate a key which it then sends back to the client. Client and server then use that key for future encryption.

Thus, anyone snooping on the key exchange will see the key and can then use it to decrypt and modify future messages. This is a major vulnerability.

share|improve this answer
    
I agree could look like, this part is jcryption, and is there just for avoid unencrypted flux, the final message don't uses this key. jcryption.org A MITM is hard to setup i think.. I need to authenticate my server ip for avoid this? Like ssl does? –  Cryptopat Oct 4 '13 at 16:47
    
Authenticating the server won't fix the problem if the key exchange is still in the clear. You'd need a strong key exchange (diffie-hellman, SRP, etc), even then there will be a number of issues. Browser based crypto is hardly ever a good idea. Perhaps instead of describing your solution to a problem you should describe the problem in detail (leave out the solution) and there are probably some very standard crypto protocols that will solve your problem. –  mikeazo Oct 4 '13 at 21:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.