Key Generation and Management¶
Key Generation¶
Methods used to generate keys.
-
pypkcs11.key_generator.
c_copy_object
(h_session, h_object, template=None)¶ Method to call the C_CopyObject cryptoki command.
Parameters: Returns: (retcode, Handle to the new cloned object)
Return type: tuple
-
pypkcs11.key_generator.
c_derive_key
(h_session, h_base_key, template, mechanism=None)¶ Derives a key from another key.
Parameters: Returns: The result code, The derived key’s handle
-
pypkcs11.key_generator.
c_destroy_object
(h_session, h_object_value)¶ Deletes the object corresponsing to the passed in object handle
Parameters: Returns: Return code
-
pypkcs11.key_generator.
c_generate_key
(h_session, mechanism=None, template=None)¶ Generates a symmetric key of a given flavor given the correct template.
Parameters: Returns: (retcode, generated key handle)
Rtype tuple:
-
pypkcs11.key_generator.
c_generate_key_pair
(h_session, mechanism=None, pbkey_template=None, prkey_template=None)¶ Generates a private and public key pair for a given flavor, and given public and private key templates. The return value will be the handle for the key.
Parameters: Returns: (retcode, public key handle, private key handle)
Return type: tuple