xref: /aosp_15_r20/external/scapy/scapy/layers/tls/crypto/ciphers.py (revision 7dc08ffc4802948ccbc861daaf1e81c405c2c4bd)
1*7dc08ffcSJunyu Lai
2*7dc08ffcSJunyu Lai## This file is part of Scapy
3*7dc08ffcSJunyu Lai## Copyright (C) 2007, 2008, 2009 Arnaud Ebalard
4*7dc08ffcSJunyu Lai##                     2015, 2016 Maxence Tury
5*7dc08ffcSJunyu Lai## This program is published under a GPLv2 license
6*7dc08ffcSJunyu Lai
7*7dc08ffcSJunyu Lai"""
8*7dc08ffcSJunyu LaiTLS ciphers.
9*7dc08ffcSJunyu Lai"""
10*7dc08ffcSJunyu Lai
11*7dc08ffcSJunyu Laiclass CipherError(Exception):
12*7dc08ffcSJunyu Lai    """
13*7dc08ffcSJunyu Lai    Raised when .decrypt() or .auth_decrypt() fails.
14*7dc08ffcSJunyu Lai    """
15*7dc08ffcSJunyu Lai    pass
16*7dc08ffcSJunyu Lai
17*7dc08ffcSJunyu Lai
18*7dc08ffcSJunyu Lai# We have to keep these imports below CipherError definition
19*7dc08ffcSJunyu Lai# in order to avoid circular dependencies.
20*7dc08ffcSJunyu Laifrom scapy.layers.tls.crypto.cipher_aead import _tls_aead_cipher_algs
21*7dc08ffcSJunyu Laifrom scapy.layers.tls.crypto.cipher_block import _tls_block_cipher_algs
22*7dc08ffcSJunyu Laifrom scapy.layers.tls.crypto.cipher_stream import _tls_stream_cipher_algs
23*7dc08ffcSJunyu Lai
24*7dc08ffcSJunyu Lai_tls_cipher_algs = {}
25*7dc08ffcSJunyu Lai_tls_cipher_algs.update(_tls_block_cipher_algs)
26*7dc08ffcSJunyu Lai_tls_cipher_algs.update(_tls_stream_cipher_algs)
27*7dc08ffcSJunyu Lai_tls_cipher_algs.update(_tls_aead_cipher_algs)
28*7dc08ffcSJunyu Lai
29