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.
Files changed (55) hide show
  1. scared/__init__.py +58 -0
  2. scared/aes/__init__.py +2 -0
  3. scared/aes/base.py +655 -0
  4. scared/aes/selection_functions/__init__.py +1 -0
  5. scared/aes/selection_functions/decrypt.py +56 -0
  6. scared/aes/selection_functions/encrypt.py +149 -0
  7. scared/analysis/__init__.py +11 -0
  8. scared/analysis/_analysis.py +71 -0
  9. scared/analysis/base.py +261 -0
  10. scared/analysis/template.py +152 -0
  11. scared/container.py +237 -0
  12. scared/des/__init__.py +2 -0
  13. scared/des/base.py +965 -0
  14. scared/des/selection_functions/__init__.py +1 -0
  15. scared/des/selection_functions/decrypt.py +89 -0
  16. scared/des/selection_functions/encrypt.py +211 -0
  17. scared/discriminants.py +97 -0
  18. scared/distinguishers/__init__.py +11 -0
  19. scared/distinguishers/base.py +126 -0
  20. scared/distinguishers/cpa.py +94 -0
  21. scared/distinguishers/dpa.py +63 -0
  22. scared/distinguishers/mia.py +122 -0
  23. scared/distinguishers/partitioned.py +262 -0
  24. scared/distinguishers/template.py +117 -0
  25. scared/models.py +207 -0
  26. scared/preprocesses/__init__.py +3 -0
  27. scared/preprocesses/_base.py +67 -0
  28. scared/preprocesses/first_order.py +148 -0
  29. scared/preprocesses/high_order/__init__.py +2 -0
  30. scared/preprocesses/high_order/_base.py +115 -0
  31. scared/preprocesses/high_order/standard.py +117 -0
  32. scared/preprocesses/high_order/time_freq.py +192 -0
  33. scared/scared.py +1 -0
  34. scared/selection_functions/__init__.py +1 -0
  35. scared/selection_functions/base.py +188 -0
  36. scared/selection_functions/guesses.py +161 -0
  37. scared/signal_processing/__init__.py +6 -0
  38. scared/signal_processing/base.py +86 -0
  39. scared/signal_processing/filters.py +106 -0
  40. scared/signal_processing/frequency_analysis.py +53 -0
  41. scared/signal_processing/moving_operators.py +173 -0
  42. scared/signal_processing/pattern_detection.py +149 -0
  43. scared/signal_processing/peaks_detection.py +185 -0
  44. scared/synchronization.py +201 -0
  45. scared/ttest.py +235 -0
  46. scared/utils/__init__.py +1 -0
  47. scared/utils/fast_astype.py +41 -0
  48. scared/utils/inplace_dot_sum.py +68 -0
  49. scared/utils/misc.py +22 -0
  50. scared-0.0.0.dist-info/METADATA +149 -0
  51. scared-0.0.0.dist-info/RECORD +55 -0
  52. scared-0.0.0.dist-info/WHEEL +5 -0
  53. scared-0.0.0.dist-info/licenses/AUTHORS.md +19 -0
  54. scared-0.0.0.dist-info/licenses/LICENSE +661 -0
  55. 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
@@ -0,0 +1,2 @@
1
+ from .base import * # noqa: F401, F403
2
+ from . import selection_functions # noqa: F401