I try to write a Python program which calculates the WPA-handshake, but I have problems with the hashes. For comparison I installed cowpatty (to see where I start beeing wrong) . My PMK-generation works fine, but the PTK-calculation alsways seems to be wrong. I am not sure if I have to format my input (macadresses and noces) or just give them into the function as a string. I will give you my routerinformation, which is no problem since I just set it up for testing. My program looks as follows: import hmac,hashlib,binascii passPhrase = "10zZz10ZZzZ" ssid = "Netgear 2/158" A = "Pairwise key