Skip to content

Commit

Permalink
Merge branch 'main' into cpa
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxrdv authored Feb 4, 2025
2 parents a3e673b + 628e8fc commit ad055bc
Show file tree
Hide file tree
Showing 3 changed files with 699 additions and 1,642 deletions.
11 changes: 6 additions & 5 deletions scaaml/capture/aes/capture_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import chipwhisperer as cw
from chipwhisperer.common.traces import Trace
from chipwhisperer.common.utils import util as cw_util

from scaaml.capture.capture_runner import AbstractCaptureRunner
from scaaml.capture.crypto_input import AbstractCryptoInput
Expand Down Expand Up @@ -58,9 +57,10 @@ def capture_trace(self, crypto_input: CryptoInput) -> Optional[Trace]:
AssertionError: If the textin in the trace is different from
plaintext.
"""
# Convert to cw bytearray, which has nicer __str__ and __repr__.
plaintext = cw_util.bytearray(crypto_input.plaintext)
key = cw_util.bytearray(crypto_input.key)
# Convert to cw bytearray, which has nicer __str__ and __repr__ (helps
# to comply with type-checking).
plaintext = cw.bytearray(crypto_input.plaintext)
key = cw.bytearray(crypto_input.key)

# Get the scope object.
scope = self._scope.scope
Expand All @@ -76,7 +76,8 @@ def capture_trace(self, crypto_input: CryptoInput) -> Optional[Trace]:
scope=scope, # type: ignore[arg-type]
target=target,
plaintext=plaintext,
key=key)
key=key,
)

return trace

Expand Down
Loading

0 comments on commit ad055bc

Please sign in to comment.