[erlang-questions] Erlang - Java symmetric encryption

Manuel Durán Aguete manuel@REDACTED
Fri Mar 6 08:18:59 CET 2015


Hello,

You can try something like
http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange to
exchange keys.

Regards.

2015-03-05 19:45 GMT+01:00 Antonis Kouzoupis <kouzan@REDACTED>:

> Hi,
>
> I'm trying to build a system where mobile devices (Android) will
> communicate
> each other encrypted TCP messages and the symmetric key distribution will
> be handled by a server in Erlang. As an Erlang *newbie*, I've been
> confused with
> the key derivation and encryption/decryption.
>
> What I want is to produce the same key both in mobile (java) and in server
> (erlang),
> Supposedly that the salt is the same. I use the erlang-pbkdf2 [0] module
> to generate
> the key in server and bouncy castle in java. Also I use AES in CTR mode in
> both
> sides to encrypt/decrypt, again the IV is known to both sides. So far the
> decrypted ciphertext on server is not the same as the cleartext on mobile.
> Can you give me any hint on how to correctly produce the same key (password
> based) both in Erland and in Java?
>
> [0] https://github.com/whitelynx/erlang-pbkdf2
>
> Thank you for your time,
> --
> Αντώνης Κουζούπης
> Antonis Kouzoupis
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150306/4cfbb062/attachment.htm>


More information about the erlang-questions mailing list