Closed rosennej closed 1 year ago
Hi @rosennej - we use native python types as the 'params' to the mechanism here. You can use those like:
mech = Mechanism(mech_type=CKM_RSA_PKCS_PSS, params={"hashAlg": CKM_SHA256, "mgf": CKG_MGF1_SHA256, "usSaltLen": 32})
Alternatively, you can create the mechanism struct manually (and set CK_MECHANISM
fields explicitly to p), and pass that into the c_sign
call.
Thanks.
I am trying to use CKM_RSA_PKCS_PSS to sign a message, and get an error argument of type 'CK_RSA_PKCS_PSS_PARAMS' is not iterable.
The code: p = CK_RSA_PKCS_PSS_PARAMS(CKM_SHA256, CKG_MGF1_SHA256, 32) mechanism = Mechanism(mech_type=CKM_RSA_PKCS_PSS, params=p)