mirror of
https://github.com/Legrandin/pycryptodome.git
synced 2025-12-08 05:19:46 +00:00
Hide initializers for cipher mode objects
This commit is contained in:
parent
7fab9f2e6f
commit
b6eb4ba7f0
11 changed files with 24 additions and 1 deletions
|
|
@ -69,6 +69,8 @@ class CbcMode(object):
|
||||||
See `NIST SP800-38A`_ , Section 6.2 .
|
See `NIST SP800-38A`_ , Section 6.2 .
|
||||||
|
|
||||||
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, block_cipher, iv):
|
def __init__(self, block_cipher, iv):
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,8 @@ class CcmMode(object):
|
||||||
.. _`NIST SP800-38C`: http://csrc.nist.gov/publications/nistpubs/800-38C/SP800-38C.pdf
|
.. _`NIST SP800-38C`: http://csrc.nist.gov/publications/nistpubs/800-38C/SP800-38C.pdf
|
||||||
.. _RFC3610: https://tools.ietf.org/html/rfc3610
|
.. _RFC3610: https://tools.ietf.org/html/rfc3610
|
||||||
.. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html
|
.. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, factory, key, nonce, mac_len, msg_len, assoc_len,
|
def __init__(self, factory, key, nonce, mac_len, msg_len, assoc_len,
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,8 @@ class CfbMode(object):
|
||||||
See `NIST SP800-38A`_ , Section 6.3.
|
See `NIST SP800-38A`_ , Section 6.3.
|
||||||
|
|
||||||
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, block_cipher, iv, segment_size):
|
def __init__(self, block_cipher, iv, segment_size):
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,8 @@ class CtrMode(object):
|
||||||
Appendix B (for how to manage the *initial counter block*).
|
Appendix B (for how to manage the *initial counter block*).
|
||||||
|
|
||||||
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, block_cipher, initial_counter_block,
|
def __init__(self, block_cipher, initial_counter_block,
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@ class EaxMode(object):
|
||||||
|
|
||||||
.. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html
|
.. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html
|
||||||
.. __: http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/eax/eax-spec.pdf
|
.. __: http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/eax/eax-spec.pdf
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, factory, key, nonce, mac_len, cipher_params):
|
def __init__(self, factory, key, nonce, mac_len, cipher_params):
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ class EcbMode(object):
|
||||||
See `NIST SP800-38A`_ , Section 6.1.
|
See `NIST SP800-38A`_ , Section 6.1.
|
||||||
|
|
||||||
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, block_cipher):
|
def __init__(self, block_cipher):
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@ class GcmMode(object):
|
||||||
|
|
||||||
.. _`NIST SP800-38D`: http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf
|
.. _`NIST SP800-38D`: http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf
|
||||||
.. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html
|
.. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, factory, key, nonce, mac_len, cipher_params):
|
def __init__(self, factory, key, nonce, mac_len, cipher_params):
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,10 @@ _raw_ocb_lib = load_pycryptodome_raw_lib("Crypto.Cipher._raw_ocb", """
|
||||||
|
|
||||||
|
|
||||||
class OcbMode(object):
|
class OcbMode(object):
|
||||||
"""Offset Codebook (OCB) mode."""
|
"""Offset Codebook (OCB) mode.
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, factory, nonce, mac_len, cipher_params):
|
def __init__(self, factory, nonce, mac_len, cipher_params):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,8 @@ class OfbMode(object):
|
||||||
See `NIST SP800-38A`_ , Section 6.4.
|
See `NIST SP800-38A`_ , Section 6.4.
|
||||||
|
|
||||||
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, block_cipher, iv):
|
def __init__(self, block_cipher, iv):
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ class OpenPgpMode(object):
|
||||||
therefore 2 bytes longer than the clean IV.
|
therefore 2 bytes longer than the clean IV.
|
||||||
|
|
||||||
.. _OpenPGP: http://tools.ietf.org/html/rfc4880
|
.. _OpenPGP: http://tools.ietf.org/html/rfc4880
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, factory, key, iv, cipher_params):
|
def __init__(self, factory, key, iv, cipher_params):
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,8 @@ class SivMode(object):
|
||||||
.. _RFC5297: https://tools.ietf.org/html/rfc5297
|
.. _RFC5297: https://tools.ietf.org/html/rfc5297
|
||||||
.. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html
|
.. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html
|
||||||
.. __: http://www.cs.ucdavis.edu/~rogaway/papers/keywrap.pdf
|
.. __: http://www.cs.ucdavis.edu/~rogaway/papers/keywrap.pdf
|
||||||
|
|
||||||
|
:undocumented: __init__
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, factory, key, nonce, kwargs):
|
def __init__(self, factory, key, nonce, kwargs):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue