Open itsNeutron opened 8 years ago
Development of CoCSharp was and is done completely on Windows with Visual Studio, and I don't have a Linux machine yet, so I can't really help you there.
However from the stack trace it seems like it is a libsodium-net which is a wrapper around libsodium and is used by CoCSharp to handle encryption. And I can't really help you here either.
But the IncrementNonce(byte[])
function is not a very complicated function, it just increments the given byte array by 2. A quick fix could be done by replacing the lines here by this:
public static void IncrementNonce(byte[] nonce)
{
for (int j = 0; j < 2; j++)
{
ushort c = 1;
for (uint i = 0; i < nonce.Length; i++)
{
c += nonce[i];
nonce[i] = (byte)c;
c >>= 8;
}
}
}
I am planning on using or implementating a managed version of libsodium instead. That way we don't have to deal with native/unmanaged related issues and should hopefully increase portability.
If you have a ubuntu system you can install libsodium like this
sudo add-apt-repository ppa:chris-lea/libsodium; sudo echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list; sudo echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list; sudo apt-get update && sudo apt-get install libsodium-dev;
Actually, if you launch mono CoCSharp.Server.exe it starts but when you try to login this happens: