I'm trying to generate a secure session_id on python 3.
First of all, i just generate md5 hash value of timestamp (included microseconds) and then write the value via cookie. But this method could hijackable. for example, extract session_id value from browser A's cookie, and then modify session_id value to browser B's cookie. it's works WELL.
For more securely, switch to decryptable encryption from md5 hash. That is, session_id = decryptable_encryption(key:USER-AGENT, value:timestamp) and write cookie. it's works WELL for same browsers, but different browsers not.
Encryption with IP address is not good. because of it requires mobile environment which is changes ip address consistently.
Required more securely session_id, How do i generate it? I want to know about mechanism of generating session id. Please let me know.