Package pyhsm :: Module aes_ecb_cmd :: Class YHSM_Cmd_AES_ECB_Compare
[frames] | no frames]

Class YHSM_Cmd_AES_ECB_Compare

cmd.YHSM_Cmd --+    
               |    
YHSM_Cmd_AES_ECB --+
                   |
                  YHSM_Cmd_AES_ECB_Compare

Have the YubiHSM AES ECB decrypt something using the key of a key handle, and then compare it with a plaintext we supply.

Requires you to know the plaintext to verify if the ciphertext matches it, providing added security in some applications.

Instance Methods
 
__init__(self, stick, key_handle, ciphertext, plaintext)
The base class for all YSM_ commands.
 
parse_result(self, data)
This function is intended to be overridden by sub-classes that implements commands that should not just return the data read from the YubiHSM.

Inherited from YHSM_Cmd_AES_ECB: __repr__

Inherited from cmd.YHSM_Cmd: execute

Class Variables

Inherited from YHSM_Cmd_AES_ECB: key_handle, status

Inherited from cmd.YHSM_Cmd: executed, response_status

Method Details

__init__(self, stick, key_handle, ciphertext, plaintext)
(Constructor)

 

The base class for all YSM_ commands.

Parameters:
  • stick - Reference to a YubiHSM
  • command - The YSM_xxx command defined in pyhsm.defines.
  • payload - a packed C struct, represented as a Python string
Overrides: cmd.YHSM_Cmd.__init__
(inherited documentation)

parse_result(self, data)

 

This function is intended to be overridden by sub-classes that implements commands that should not just return the data read from the YubiHSM.

Overrides: cmd.YHSM_Cmd.parse_result
(inherited documentation)