And I'm aware of that performance loss but for some political reasons I'll encrypt all data.
I'd suggest to use a light approach if possible, encryption can really kill the performance if you want to use the SSL, bank-like, standards.
And I'm aware of that performance loss but for some political reasons I'll encrypt all data.
sfs_game wrote:100 miles away is not the problem.
But someone could be close in the same lan with you and we would need to make sure that he cannot sniff out cards.
I.e. if you knew where someone lives you could get into his lan and try to sniff out the messages. this was the cause for some security flaw in some online poker software a while back.
I guess what I am trying to say - it would be REALLY nice if you guys released support for SSL. Maybe (if you dont think that it will be benefit everyone) you can publish it as an optional extension to SFS?
Being part of the core engine it doesn't fit the "extension" type very well, but in any case it's in our todo list, just no very high in priority.
Encrypting packets is impractical (and actually impossible).
Code: Select all
using System.IO;
using System.Text;
using System.Security.Cryptography;
protected void Encrypt(object sender, EventArgs e) { lblEncryptedText.Text = this.Encrypt(txtOriginalText.Text.Trim());}
private string Encrypt(string clearText)
{
string EncryptionKey = "MAKV2SPBNI99212";
byte[] clearBytes = Encoding.Unicode.GetBytes(clearText);
using (Aes encryptor = Aes.Create())
{
Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 });
encryptor.Key = pdb.GetBytes(32);
encryptor.IV = pdb.GetBytes(16);
using (MemoryStream ms = new MemoryStream())
{
using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateEncryptor(), CryptoStreamMode.Write))
{
cs.Write(clearBytes, 0, clearBytes.Length);
cs.Close();
}
clearText = Convert.ToBase64String(ms.ToArray());
}
}
return clearText;
}
Users browsing this forum: No registered users and 112 guests