def generatePrivateKey(size): start=timer() private_key = dsa.generate_private_key(key_size=size,backend=default_backend()) end=timer() print("Time Taken to generate key is ",(end-start)) return private_key