aMule Forum

English => aMule Help => Topic started by: jhoderd on December 29, 2005, 11:09:59 AM

Title: Multiple users without same cryptkey
Post by: jhoderd on December 29, 2005, 11:09:59 AM
Hi,

We have multiple users sharing the same computer (3 people right now),
on Kubuntu Linux.  Since we each want to use aMule, we are using multiple
amule daemons (amuled) listening on different ports.  It works mostly fine,
but for one little problem: the generated cryptkey is identical for all of us!

I assume that amule only takes the hostname as a seed when generating
the cryptkey.  This is fine for most purposes, but not in our case!  The question
is: how can we get aMule to generate new (random) cryptkeys?

Btw, the cryptkey is just a base64 text file: if we manually change it at random,
will everything work?

Thanks in advance for your help!
Jean
Title: Re: Multiple users without same cryptkey
Post by: skolnick on December 29, 2005, 04:51:19 PM
cryptkey and preferences.dat must match for amule to work, so if you modify one, the other should be modified also. I can only suggest you to use amule on a windows computer, generate several pairs of cryptkey.dat/preferences.dat files, and use one pair for every user. Although, is strange, since when I delete my .aMule folder, it seems to genereate a different userhash, even when using my same computer and even the same user.

Regards.
Title: Still the same
Post by: jhoderd on December 29, 2005, 06:13:46 PM
Hi,

And thanks for your reply.  Well, I just created a new "fresh" user,
ran aMule for the first time, and voila: exactly the same cryptkey
was generated. (I am using 2.0.3-1ubuntu4).

Can anyone else replicate this?

Cheers,
Jean
Title: Re: Multiple users without same cryptkey
Post by: Kry on December 29, 2005, 07:46:24 PM
I blame ubuntu.
Title: Re: Multiple users without same cryptkey
Post by: wuischke on December 29, 2005, 07:51:36 PM
Lets see whom to blame...I'll test it. ;)
Edit: Confirmed on Ubuntu 6.04 Flight 2 with todays CVS.
Title: Re: Multiple users without same cryptkey
Post by: Kry on December 29, 2005, 08:52:35 PM
Code: [Select]
user@Edelweiss:~$ rm .aMule/cryptkey.dat
user@Edelweiss:~$ /home/kry/aMule/amule-dev/src/amuled > /dev/null
user@Edelweiss:~$ mv .aMule/cryptkey.dat .
user@Edelweiss:~$ /home/kry/aMule/amule-dev/src/amuled > /dev/null
user@Edelweiss:~$ diff cryptkey.dat .aMule/cryptkey.dat
--- cryptkey.dat        2005-12-29 21:09:36.000000000 +0100
+++ .aMule/cryptkey.dat 2005-12-29 21:09:53.000000000 +0100
@@ -1,5 +1,5 @@
-MIIBCQIBADANBgkqhkiG9w0BAQEFAASB9DCB8QIBAAIxALFz1ZIKnoGS0twC2zJ9jPLnPVIU
-TbpnzVprhLR+Im7rMnRXa+cA5eC2k2FQhYd8vQIBEQIwFOBzepfWaZjNg0uhUTvydu4HNtU2
-UipUMk4ce/eeshH7ZR0WSSdGvx2B3Nlexe0pAhkA9qN74VHIFpcbhfThl2uTgRUQlW7+ihk3
-AhkAuDAWtXOVbrs+EutM4cd5Byay9qnhawOrAhkAvJsifyBr1QokGySsgtnLJnmFJvqGaZrP
-Ahhhgt7YiHxJrmwoIjfC0wPWnARkeA3tXEsCGQDFVfZNHRYcjaiG3WN+zIzlOzs6QFsQCok=
+MIIBCQIBADANBgkqhkiG9w0BAQEFAASB9DCB8QIBAAIxANkkKvlUgz/80MJ/V8qihTPyXsjT
+Ts7uPQVA131DozewfFx2+f3ZE+YPm3PuhkR/+QIBEQIwDMXkaQT4qWk5dNpQdVTaqLPndTmb
+OVlOxl7HFGTYEZPak8S/C56s/CUm5Bz1qFUVAhkA/sTYWBaZ3dN0ebOrAX8qml1hgncVq6ub
+AhkA2jDGynqwLwuEErKfNtBsjTqky4sgay37AhkAhuCuxTkkSELFMV8eTBYlnQRCrntHtTy7
+AhkAwIVkHBHmwBk4TLu5qNYFbY4Y79Ucms43AhgHHMxXSTGn3/zSoAueMdtXTTzd1pQEqp0=

IWH.
Title: That's my cryptkey!
Post by: jhoderd on December 29, 2005, 10:14:55 PM
Hi,

Hey, it's even worse than I thought: that is the exact same cryptkey generated
on my machine!  Can someone please confirm if this problem is limited to the
ubuntu build?

Cheers,
Jean
Title: Re: Multiple users without same cryptkey
Post by: Xaignar on December 29, 2005, 10:29:37 PM
Works here.
Title: Re: Multiple users without same cryptkey
Post by: wuischke on December 29, 2005, 10:56:58 PM
I got the same Key as well.

To be honest I don't really have a clue (I was not patient and I'm not awake enough to look through the code, I gave up), but maybe it's due to some external libcrypto-thingy on Ubuntu.
Title: Re: Multiple users without same cryptkey
Post by: Gerd78 on December 29, 2005, 11:43:28 PM
On SuSE 10.0:
Code: [Select]
$ cd $HOME
$ mv .aMule .aMule.bak
$ amuled > /dev/null
$ mv .aMule .aMule.1
$ amuled > /dev/null
$ mv .aMule .aMule.2
$ diff .aMule.1/cryptkey.dat .aMule.2/cryptkey.dat
1,5c1,5
< MIIBCAIBADANBgkqhkiG9w0BAQEFAASB8zCB8AIBAAIxALOFN9qZxD36KHstcriAmg4+lWPb
< 7On/LX7fa5/XYwRoDL0EKWPD5j2OkbS751pF+QIBEQIwRKPgpmf4NdCXAeu67DEr2EUbAIjL
< hqVUg9Y+zAXNZeroTUeAztBmvkLUHD2KeBtDAhkA8gqB3A8diwuHIuMcO55pcfpXWn+xon7v
< AhkAvd+n/PQsR2xNbY1tgWbmPG9KreoGpQmXAhg482nZbPfkey7bCELg2fqxaBSNw7FTaSkC
< GGSFdw1yNY85VirwhUSBxS8Nvh/WP8DI1wIZAMiO9f2YcxaX8rROzlSf0gImVUwjTuRpFw==
---
> MIIBCAIBADANBgkqhkiG9w0BAQEFAASB8zCB8AIBAAIxAMASuVwHQ7iRhUoiaPL2+SdZh/oT
> Tsq2MI0b0evMKbclZzpcNhstbEAovnRuLEsuXQIBEQIwA8QhwIyxA552EIMvO/rNq3Av17oa
> pJopEyClvX/hoPoIocS2J7lVT/mTcbMipyTRAhkAyR5/w+icLLsmB7dQm374tCDLLZoowKy1
> AhkA9HxNZ2maeJqI+HSblcJ0nU+ToCQcPiwJAhgjfdpPv6MW89mI5B1Ine+nURTLz+kS8U0C
> GQDXuPkA5LV5eUuuDIlH59BOkYJCAb6RNekCGBxEB09NS1a+sfhzcHOp7EtOtsrqpt7zuA==
$ rm -r .aMule.1 .aMule.2
$ mv .aMule.bak .aMule
Tested with aMule CVS 20051229.
Title: Re: Multiple users without same cryptkey
Post by: jhoderd on December 29, 2005, 11:45:58 PM
Hi,

Here's the output from 'ldd amuled' on my system:

        linux-gate.so.1 =>  (0xffffe000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7f0e000)
        libwx_baseu-2.6.so.0 => /usr/lib/libwx_baseu-2.6.so.0 (0xb7dea000)
        libwx_baseu_net-2.6.so.0 => /usr/lib/libwx_baseu_net-2.6.so.0 (0xb7dc1000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7dad000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7cc7000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7ca4000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7c99000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7b6b000)
        /lib/ld-linux.so.2 (0xb7f33000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7b68000)

None of which seem crypto related...

Anyway, I have just compiled amule myself, and guess what: it generates
the same infamous cryptkey!  The plot thickens...

Cheers,
Jean
Title: Re: Multiple users without same cryptkey
Post by: Xaignar on December 29, 2005, 11:54:17 PM
Quote
Originally posted by wuischke
I got the same Key as well.

To be honest I don't really have a clue (I was not patient and I'm not awake enough to look through the code, I gave up), but maybe it's due to some external libcrypto-thingy on Ubuntu.

Can you try using the included CryptoPP files?
Title: Re: Multiple users without same cryptkey
Post by: Gerd78 on December 29, 2005, 11:55:16 PM
Are you sure you used "--enable-embedded-crypto" to configure aMule? What are the last lines of the ./configure script?

The fact that "ldd" doesn't show any results doesn't necessarily mean that your aMule doesn't use an external libcryptopp. libcryptopp is only built as a static archive by default which means that "ldd" won't show anything, even if the external library is used.
Title: Re: Multiple users without same cryptkey
Post by: Kry on December 30, 2005, 12:25:06 AM
Sorry guys, how can you say "that is my key" when each one of us pasted two, DIFFERENT keys?
Title: Re: Multiple users without same cryptkey
Post by: wuischke on December 30, 2005, 10:12:55 AM
Sorry guys, you're right. I think I was to tired to see it...
Everything works fine, it was just me who only checked the first two lines which were similar but not identical.

If people want to see something it is easy to imagine to see it...

Sorry again for causing unneeded trouble.