How long is Encryption available?

lazalong
edited September 2011 in Photon Server
The documentation says for PhotonPeer.IsEncryptionAvailable that "While it's true, encrpytion can be used for operations".

Does it mean that once encryption is set it will time-out?
Or is it set until the peer is disconnected?
Can encryption be "unset"? If yes how?

Do we need to test this value each time we want to send an encrypted operation?
Something like this:
void SendSecureOp(OpCustom(byte customOpCode, Dictionary<byte, object>
customOpParameters, bool sendReliable, byte channelId)
{
    if (photonPeer.IsEncryptionAvailable)
    {
        peer.OpCustom(cutomeOpCode, customOpParameters, sendReliable, true);
    }
   else
   {
       // TODO what?  Redo encryption and resent operation?
   }
}

Can we change the keys encryption method and if yes how?
What is the overhead of encryption?

Regards

Comments

  • lazalong wrote:
    The documentation says for PhotonPeer.IsEncryptionAvailable that "While it's true, encrpytion can be used for operations".

    Does it mean that once encryption is set it will time-out?
    no - you have to initialize encryption once, meaning the server and the client interchange keys.
    Or is it set until the peer is disconnected?
    yes
    Can encryption be "unset"? If yes how?
    no

    Do we need to test this value each time we want to send an encrypted operation?
    no

    ---snip 8<

    Can we change the keys encryption method and if yes how?
    Our encryption strategy is based on
    a) the Diffie–Hellman key exchange allgorithm (our implementation), see http://en.wikipedia.org/wiki/Diffie%E2% ... y_exchange
    b) the Rijndael symmetric encryption algorithm (.net), see http://msdn.microsoft.com/en-us/library ... ndael.aspx

    currently none of this can be changed.
    What is the overhead of encryption?
    After the key exchange it's "only" the overhead of the Rijndael encryption on the serialized opereationrequests flagged for encryption.
    Regards