Generating Md5 Signature of SFSObject

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
adenault
Posts: 42
Joined: 07 Feb 2011, 14:22

Generating Md5 Signature of SFSObject

Postby adenault » 24 Feb 2011, 14:22

Hi,

As a security measure, we are signing packets sent to and from the smartfox server using MD5 signature. However, we have having problems signing SFSObjects.

The idea is that we need a nice string representation of the SFSObject that is constant on both sides. First, we thought that we could JSON the SFSObject, but there is no garantee that the parameters will have the same order. Is there an efficient way already built-in to sign SFS objects?

On a side note, is there a very I can simply sign the packet itself (the byte representation of the payload) or is there any such protection built in?

Cheers,

Alex
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 24 Feb 2011, 15:43

I think encryption is actually on the todo list for version 1 if I recall. But the SFS guys can chime in here.

If so, no need for you to add that extra unless you need it right now

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
User avatar
adenault
Posts: 42
Joined: 07 Feb 2011, 14:22

Postby adenault » 24 Feb 2011, 16:53

Signing is not encryption. Encryption is designed to prevent a third party from viewing the message. Signing simply ensure authenticity and prevents tampering.

Cheers,

Alex
tchen
Posts: 191
Joined: 11 Dec 2010, 14:14

Postby tchen » 24 Feb 2011, 19:44

It's not built-in, but you could always try putting in all the signed stuff inside a POJO and deal with the ordering that way.

http://docs2x.smartfoxserver.com/Advanc ... ialization

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider], Stevenor and 67 guests