
Originally Posted by
Sledmore
Could you show us your global crypto class or the InitializeRC4ToSession method?
Also, do the prime and generator keys match the keys in the banner/encryption file called by the client?
Naw, RC4 shouldn't be the cause of that. What revision are you working from? But just for a heads up, it should be in a similar order to;
GetClientVersionEvent (4000 always)
InitCryptoEvent -> Send the InitCryptoComposer
GenerateSecretKeyEvent -> Send the SecretKeyComposer
ClientVariablesEvent
UniqueIDEvent -> Send the SetUniqueIdComposer
SSO Ticket Event -> Manage auth, but within here you must send the AuthenticationOKComposer to actually successfully authenticate the user.
Just a thought, if it skips to GetUserInfo, then perhaps GetUserInfo is using the InitCryptoEvent packet.
This is the HabboEncryption class:
PHP Code:
using Butterfly.HabboHotel.GameClients;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HabboEncryption
{
public class HabboEncryption : DiffieHellman
{
private static BigInteger n = new BigInteger("86851DD364D5C5CECE3C883171CC6DDC5760779B992482BD1E20DD296888DF91B33B936A7B93F06D29E8870F703A216257DEC7C81DE0058FEA4CC5116F75E6EFC4E9113513E45357DC3FD43D4EFAB5963EF178B78BD61E81A14C603B24C8BCCE0A12230B320045498EDC29282FF0603BC7B7DAE8FC1B05B52B2F301A9DC783B7", 16);
private static BigInteger e = new BigInteger(3);
private static BigInteger d = new BigInteger("59AE13E243392E89DED305764BDD9E92E4EAFA67BB6DAC7E1415E8C645B0950BCCD26246FD0D4AF37145AF5FA026C0EC3A94853013EAAE5FF1888360F4F9449EE023762EC195DFF3F30CA0B08B8C947E3859877B5D7DCED5C8715C58B53740B84E11FBC71349A27C31745FCEFEEEA57CFF291099205E230E0C7C27E8E1C0512B", 16);
private RSA RSA;
public HabboEncryption()
: base(new BigInteger("114670925920269957593299136150366957983142588366300079186349531", 10), new BigInteger("1589935137502239924254699078669119674538324391752663931735947", 10))
{
this.RSA = new RSA(n, e, d, 0, 0, 0, 0, 0);
}
public Boolean InitializeRC4ToSession(GameClient Session, string ctext)
{
try
{
string publickey = this.RSA.Decrypt(ctext);
base.GenerateSharedKey(publickey.Replace(((char)0).ToString(), ""));
RC4.Init(base.SharedKey.getBytes(), ref Session.RC4Client);
Session.CryptoInitialized = true;
return true;
}
catch
{
return false;
}
}
}
}
I've just checked the prime and generator keys and they match the ones in rs4.php
- - - Updated - - -

Originally Posted by
The General
After sending the secretkey, does your emulator get another response from the client?
Yes, the clientvars get send and after that nothing happens anymore.