TLS/SSL handshake No ratings yet.

  The combination of Diffie-Hellman and the use of ephemeral session keys are what enables “Forward Secrecy”: even if an attacker gains access to the server’s private key they are not able to passively listen in on the active session, nor can they decrypt previously recorded sessions. Diffie-Hellman Key Exchange Both A, B create the • Read More »

Digital certificate vs digital signature No ratings yet.

Digital Signature: how it works   Digital certificate is one use cases of digital signature. To create the digital signature, the CA generates a message digest from the certificate, encrypts the digest with its private key, and includes the digital signature as part of the certificate. Anyone can use the message digest function and the • Read More »

How C++11 lambda is implemented No ratings yet.

Quota from a good article from It turns out that the way lambdas are implemented is by creating a small class; this class overloads the operator(), so that it acts just like a function. A lambda function is an instance of this class; when the class is constructed, any variables in the surrounding enviroment • Read More »

Python @staticmethod, @classmethod No ratings yet.

Found a good one to explain: How @staticmethod and @classmethod are different. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 class Kls(object):     no_inst = 0   #( this would be class level variable)     def __init__(self, data): = data  #  (this would be instance variable)      def printd(self):         print( • Read More »