scared 0.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scared/__init__.py +58 -0
- scared/aes/__init__.py +2 -0
- scared/aes/base.py +655 -0
- scared/aes/selection_functions/__init__.py +1 -0
- scared/aes/selection_functions/decrypt.py +56 -0
- scared/aes/selection_functions/encrypt.py +149 -0
- scared/analysis/__init__.py +11 -0
- scared/analysis/_analysis.py +71 -0
- scared/analysis/base.py +261 -0
- scared/analysis/template.py +152 -0
- scared/container.py +237 -0
- scared/des/__init__.py +2 -0
- scared/des/base.py +965 -0
- scared/des/selection_functions/__init__.py +1 -0
- scared/des/selection_functions/decrypt.py +89 -0
- scared/des/selection_functions/encrypt.py +211 -0
- scared/discriminants.py +97 -0
- scared/distinguishers/__init__.py +11 -0
- scared/distinguishers/base.py +126 -0
- scared/distinguishers/cpa.py +94 -0
- scared/distinguishers/dpa.py +63 -0
- scared/distinguishers/mia.py +122 -0
- scared/distinguishers/partitioned.py +262 -0
- scared/distinguishers/template.py +117 -0
- scared/models.py +207 -0
- scared/preprocesses/__init__.py +3 -0
- scared/preprocesses/_base.py +67 -0
- scared/preprocesses/first_order.py +148 -0
- scared/preprocesses/high_order/__init__.py +2 -0
- scared/preprocesses/high_order/_base.py +115 -0
- scared/preprocesses/high_order/standard.py +117 -0
- scared/preprocesses/high_order/time_freq.py +192 -0
- scared/scared.py +1 -0
- scared/selection_functions/__init__.py +1 -0
- scared/selection_functions/base.py +188 -0
- scared/selection_functions/guesses.py +161 -0
- scared/signal_processing/__init__.py +6 -0
- scared/signal_processing/base.py +86 -0
- scared/signal_processing/filters.py +106 -0
- scared/signal_processing/frequency_analysis.py +53 -0
- scared/signal_processing/moving_operators.py +173 -0
- scared/signal_processing/pattern_detection.py +149 -0
- scared/signal_processing/peaks_detection.py +185 -0
- scared/synchronization.py +201 -0
- scared/ttest.py +235 -0
- scared/utils/__init__.py +1 -0
- scared/utils/fast_astype.py +41 -0
- scared/utils/inplace_dot_sum.py +68 -0
- scared/utils/misc.py +22 -0
- scared-0.0.0.dist-info/METADATA +149 -0
- scared-0.0.0.dist-info/RECORD +55 -0
- scared-0.0.0.dist-info/WHEEL +5 -0
- scared-0.0.0.dist-info/licenses/AUTHORS.md +19 -0
- scared-0.0.0.dist-info/licenses/LICENSE +661 -0
- scared-0.0.0.dist-info/top_level.txt +1 -0
scared/__init__.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
import logging
|
|
3
|
+
|
|
4
|
+
import estraces as traces # noqa: F401
|
|
5
|
+
|
|
6
|
+
from .selection_functions.base import selection_function, attack_selection_function, reverse_selection_function, SelectionFunctionError # noqa: F401
|
|
7
|
+
from .models import HammingWeight, Value, Monobit, Model # noqa: F401
|
|
8
|
+
from .discriminants import discriminant, nanmax, maxabs, opposite_min, nansum, abssum # noqa: F401
|
|
9
|
+
from .distinguishers import ( # noqa: F401
|
|
10
|
+
DistinguisherError, Distinguisher, DistinguisherMixin,
|
|
11
|
+
DPADistinguisherMixin, DPADistinguisher,
|
|
12
|
+
CPADistinguisherMixin, CPAAlternativeDistinguisherMixin, CPADistinguisher, CPAAlternativeDistinguisher,
|
|
13
|
+
PartitionedDistinguisherMixin, PartitionedDistinguisher, ANOVADistinguisherMixin, ANOVADistinguisher,
|
|
14
|
+
NICVDistinguisherMixin, NICVDistinguisher, SNRDistinguisherMixin, SNRDistinguisher,
|
|
15
|
+
MIADistinguisher, TemplateAttackDistinguisherMixin
|
|
16
|
+
)
|
|
17
|
+
from .ttest import TTestThreadAccumulator, TTestAnalysis, TTestError, TTestContainer # noqa:F401
|
|
18
|
+
from .analysis import ( # noqa:F401
|
|
19
|
+
BaseAttack, CPAAttack, DPAAttack,
|
|
20
|
+
ANOVAAttack, NICVAttack, SNRAttack,
|
|
21
|
+
BasePartitionedAttack, MIAAttack,
|
|
22
|
+
BaseReverse, CPAReverse, DPAReverse,
|
|
23
|
+
ANOVAReverse, NICVReverse, SNRReverse,
|
|
24
|
+
BasePartitionedReverse, MIAReverse,
|
|
25
|
+
TemplateAttack, TemplateDPAAttack
|
|
26
|
+
)
|
|
27
|
+
from .preprocesses import preprocess, Preprocess, PreprocessError # noqa:F401
|
|
28
|
+
from .synchronization import Synchronizer, ResynchroError, SynchronizerError # noqa:F401
|
|
29
|
+
from . import preprocesses # noqa: F401
|
|
30
|
+
from . import signal_processing # noqa: F401
|
|
31
|
+
from . import aes # noqa: F401
|
|
32
|
+
from . import des # noqa: F401
|
|
33
|
+
from . import container as _container
|
|
34
|
+
from .container import set_batch_size # noqa: F401
|
|
35
|
+
from . import utils as _utils # noqa: F401 # for backwards compatibility
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Container = _container.Container
|
|
39
|
+
# Set default logging handler to avoid "No handler found" warnings.
|
|
40
|
+
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
|
41
|
+
# Always display DeprecationWarning by default.
|
|
42
|
+
warnings.simplefilter('default', category=DeprecationWarning)
|
|
43
|
+
|
|
44
|
+
# Get version from setuptools-scm
|
|
45
|
+
try:
|
|
46
|
+
from ._version import __version__
|
|
47
|
+
except ImportError:
|
|
48
|
+
# Fallback for development installations without setuptools-scm
|
|
49
|
+
try:
|
|
50
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
51
|
+
try:
|
|
52
|
+
__version__ = version("scared")
|
|
53
|
+
except PackageNotFoundError:
|
|
54
|
+
__version__ = "unknown"
|
|
55
|
+
except ImportError:
|
|
56
|
+
__version__ = "unknown"
|
|
57
|
+
|
|
58
|
+
VERSION = __version__
|
scared/aes/__init__.py
ADDED