Skip to content

Instantly share code, notes, and snippets.

View swizzyswizzy's full-sized avatar
🐈

SwizzySwizzy swizzyswizzy

🐈
View GitHub Profile
@swizzyswizzy
swizzyswizzy / ecdh_eke.py
Created April 20, 2020 20:22 — forked from byt3bl33d3r/ecdh_eke.py
ECDH Encrypted Key Exchange (Python 3.6+)
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, padding
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from secrets import token_bytes
class DiffieHellman:
def __init__(self):