I came up with a simple idea but I don't know if it is really secure or not. I know that you shouldn't create any algorithm on your own. I'm just curious, that's all.
Algorithm explanation:
First of all, Alice and Bob agree on a common secret password, lets say P1 (this should be done using a secure channel, like meeting in real life just a single time to exchange the password which is more practical than exchanging one time pads)
Alice chooses one secret passwords, lets say A1, which she keeps secret, Bob does the same, B1
Alice hashes her password and Bob does the same, so we have:
HA1 = hash(A1) Alice's hashed password
HB1 = hash(B1) Bob's hashed password
Alice sends her hashed password (HA1) to Bob, even on a insecure channel, because it's hashed. Bob does the same: he sends her his hash HB1
Let's say Alice wants to encrypt something. She would to the following:
Take P1 (the common password) and hash it so HP1 = hash(P1)
Take Bob's hashed password HB1
Encrypt the message using this long password (just a concatenated string) = (HB1 + HP1)
When Bob's gets the message, he has to:
Insert two different passwords: his private password + the common shared password
The algorithm transforms those two words in their hashes and then tries to decrypt the message
In my opinion, this would be great because:
If Alice encrypts a message with Bob's hashed password, even if someone knows the shared password, only Bob can decrypt the message
If someone finds Alice's or Bob's private password, he can't still encrypt/decrypt anything because he doesn't know the common one
Only Alice knows the common password, so Bob's is sure that the cypher is surely made by Alice (no MITM attacks, fake identity like in GPG)
You have to share a common word just once. This solves the key distribution problem of the OTP method
What do you guys think?