Our goal is to send SOAP messages to a web service, signing these messages using TripleDesRSA15 algorithm.
Web service staff sent us a .pfx file, where certificate for encryption is stored. I'm able to extract private key from this certificate and its first line is
BEGIN RSA PRIVATE KEY.
Then I store this private key in a server and use it for encryption using python:
pkey=open("pkey.key", "rb").read() from pyDes import * pyDes=triple_des(pkey)
But python module pyDes complaints:
*** ValueError: Invalid triple DES key size. Key must be either 16 or 24 bytes long
Did I use wrong key or use it in a wrong way?