Home | Trees | Indices | Help |
|
---|
|
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Method Details |
Protect associated data When using an AEAD mode like CCM, EAX, GCM or SIV, and if there is any associated data, the caller has to invoke this function one or more times, before using decrypt or encrypt. By associated data it is meant any data (e.g. packet headers) that will not be encrypted and will be transmitted in the clear. However, the receiver is still able to detect any modification to it. In CCM and GCM, the associated data is also called additional authenticated data (AAD). In EAX, the associated data is called header. If there is no associated data, this method must not be called. The caller may split associated data in segments of any size, and invoke this method multiple times, each time with the next segment.
|
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. For MODE_SIV (always) and MODE_CCM (when msg_len was not passed at initialization), this method can be called only once. For all other modes, the data to encrypt can be broken up in two or more pieces and encrypt can be called multiple times. That is, the statement:
is equivalent to:
That also means that you cannot reuse an object for encrypting or decrypting other data with the same key. This function does not add any padding to the plaintext.
|
Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. For MODE_SIV (always) and MODE_CCM (when msg_len was not passed at initialization), this method can be called only once. For all other modes, the data to decrypt can be broken up in two or more pieces and decrypt can be called multiple times. That is, the statement:
is equivalent to:
That also means that you cannot reuse an object for encrypting or decrypting other data with the same key. This function does not remove any padding from the plaintext.
|
Compute the binary MAC tag in an AEAD mode. When using an AEAD mode like CCM or EAX, the caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext.
|
Compute the printable MAC tag in an AEAD mode. This method is like digest.
|
Validate the binary MAC tag in an AEAD mode. When using an AEAD mode like CCM or EAX, the caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit.
|
Validate the printable MAC tag in an AEAD mode. This method is like verify.
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Aug 13 12:22:34 2015 | http://epydoc.sourceforge.net |