Run

Module for the “test wrapper” command.

enum crypto_condor.cli.run.AesStrKeyLength(value)

Bases: StrEnum

Workaround for using IntEnum with Typer.

Typer/Click don’t handle ints as choices from an enum, so mimic the real enum with str values and convert back when calling the function.

Member Type:

str

Valid values are as follows:

ALL = <AesStrKeyLength.ALL: '0'>
AES128 = <AesStrKeyLength.AES128: '128'>
AES192 = <AesStrKeyLength.AES192: '192'>
AES256 = <AesStrKeyLength.AES256: '256'>
crypto_condor.cli.run.aes(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Runs an AES wrapper.

Parameters:

wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d328e590>]) – The wrapper to test.

Keyword Arguments:
  • compliance – Whether to use compliance test vectors.

  • resilience – Whether to use resilience test vectors.

  • filename – Name of the file to save results.

  • no_save – Do not save results or prompt the user.

  • debug – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.ecdsa(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Runs an ECDSA wrapper.

Parameters:

wrapper (Annotated[str, <typer.models.ArgumentInfo object at 0x7ff9d2a3af50>]) – The wrapper to test.

Keyword Arguments:
  • compliance – Whether to use compliance test vectors.

  • resilience – Whether to use resilience test vectors.

  • filename – Name of the file to save results.

  • no_save – If True, results are not saved and the user is not prompted.

  • debug – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.sha(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Runs a SHA wrapper.

Parameters:

wrapper (Annotated[str, <typer.models.ArgumentInfo object at 0x7ff9d2a3b110>]) – The wrapper to test.

Keyword Arguments:
  • compliance – Whether to use compliance test vectors.

  • resilience – Whether to use resilience test vectors.

  • filename – Name of the file to save results.

  • no_save – Do not save results or prompt the user.

  • debug – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.shake(
wrapper,
filename='',
no_save=False,
debug=None,
compliance=True,
resilience=False,
)

Runs a SHAKE wrapper.

Parameters:

wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d2a3b2d0>]) – The wrapper to test.

Keyword Arguments:
  • filename – Name of the file to save results.

  • no_save – Do not save results or prompt the user.

  • debug – When saving the results to a file, whether to add the debug data.

  • compliance – Whether to use compliance test vectors.

  • resilience – Whether to use resilience test vectors.

crypto_condor.cli.run.rsassa(
language,
scheme,
sha,
mgf_sha=None,
sign=True,
verify=True,
filename='',
no_save=False,
debug=None,
)

Runs an RSA wrapper.

Parameters:
  • language (Annotated[Wrapper, <typer.models.ArgumentInfo object at 0x7ff9d519ef90>]) – The language of the wrapper to run.

  • scheme (Annotated[Scheme, <typer.models.ArgumentInfo object at 0x7ff9d2a3b450>]) – The RSA scheme to test.

  • sha (Annotated[Hash, <typer.models.ArgumentInfo object at 0x7ff9d2a3b550>]) – The SHA to use.

  • mgf_sha (Annotated[Hash | None, <typer.models.OptionInfo object at 0x7ff9d2a3b7d0>]) – (RSASSA-PSS only) The SHA to use with MGF1.

  • sign (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d3200d90>]) – Whether to test the signing function.

  • verify (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d328aad0>]) – Whether to test the verifying function.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • no_save (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d52ee050>]) – Do not save results or prompt the user.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.rsaes(
language,
scheme,
sha=None,
mgf_sha=None,
filename='',
no_save=False,
debug=None,
)

Runs a RSAES wrapper.

Parameters:
  • language (Annotated[Wrapper, <typer.models.ArgumentInfo object at 0x7ff9d519ef90>]) – The language of the wrapper to run.

  • scheme (Annotated[Scheme, <typer.models.ArgumentInfo object at 0x7ff9d2a3b9d0>]) – The RSA scheme to test.

  • sha (Annotated[Hash | None, <typer.models.OptionInfo object at 0x7ff9d2a3bc50>]) – The SHA to use in RSAES-OAEP.

  • mgf_sha (Annotated[Hash | None, <typer.models.OptionInfo object at 0x7ff9d2a3bcd0>]) – The SHA to use with MGF1 in RSAES-OAEP.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • no_save (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d52ee050>]) – Do not save results or prompt the user.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.chacha20(wrapper, compliance=True, resilience=True, filename='', debug=None)

Runs an ChaCha20 wrapper.

Parameters:
  • wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d2a3be50>]) – Path to the harness.

  • compliance (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d519c6d0>]) – Whether to use compliance test vectors.

  • resilience (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d2e99310>]) – Whether to use resilience test vectors.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.hmac(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Runs an HMAC wrapper.

crypto_condor.cli.run.ecdh(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Runs an ECDH wrapper.

Parameters:
  • lang – The language of the wrapper.

  • curve – The elliptic curve to use.

  • wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d2a58190>]) – The name of the wrapper, ECDH_wrapper.py by default.

  • compliance (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d519c6d0>]) – Whether to use compliance test vectors.

  • resilience (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d2e99310>]) – Whether to use resilience test vectors.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • no_save (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d52ee050>]) – Do not save results or prompt the user.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.mlkem(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Runs a ML-KEM wrapper.

Parameters:
  • wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d2a58310>]) – The wrapper to test.

  • compliance (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d519c6d0>]) – Whether to use compliance test vectors.

  • resilience (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d2e99310>]) – Whether to use resilience test vectors.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • no_save (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d52ee050>]) – Do not save results or prompt the user.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.mldsa(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Runs a ML-DSA wrapper.

Parameters:
  • wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d2a58490>]) – The wrapper to test.

  • compliance (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d519c6d0>]) – Whether to use compliance test vectors.

  • resilience (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d2e99310>]) – Whether to use resilience test vectors.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • no_save (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d52ee050>]) – Do not save results or prompt the user.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.hqc(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Tests an HQC wrapper.

Parameters:

wrapper (Annotated[str, <typer.models.ArgumentInfo object at 0x7ff9d2a58610>]) – The wrapper to test.

Keyword Arguments:
  • compliance – Whether to use compliance test vectors.

  • resilience – Whether to use resilience test vectors.

  • filename – Name of the file to save results.

  • no_save – Do not save results or prompt the user.

  • debug – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.slhdsa(
wrapper,
compliance=True,
resilience=False,
filename='',
no_save=False,
debug=None,
)

Runs a SLH-DSA wrapper.

Parameters:
  • wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d2a58750>]) – The wrapper to test.

  • compliance (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d519c6d0>]) – Whether to use compliance test vectors.

  • resilience (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d2e99310>]) – Whether to use resilience test vectors.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • no_save (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d52ee050>]) – Do not save results or prompt the user.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.ed25519(wrapper, compliance=True, resilience=False, filename='', debug=None)

Runs an Ed25519 wrapper.

Parameters:
  • wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d2a588d0>]) – The wrapper to test.

  • compliance (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d519c6d0>]) – Whether to use compliance test vectors.

  • resilience (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d2e99310>]) – Whether to use resilience test vectors.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.

crypto_condor.cli.run.x25519(wrapper, compliance=True, resilience=False, filename='', debug=None)

Runs a X25519 wrapper.

Parameters:
  • wrapper (Annotated[Path, <typer.models.ArgumentInfo object at 0x7ff9d2a58a50>]) – The wrapper to test.

  • compliance (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d519c6d0>]) – Whether to use compliance test vectors.

  • resilience (Annotated[bool, <typer.models.OptionInfo object at 0x7ff9d2e99310>]) – Whether to use resilience test vectors.

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7ff9d536ec90>]) – Name of the file to save results.

  • debug (Annotated[bool | None, <typer.models.OptionInfo object at 0x7ff9d328d790>]) – When saving the results to a file, whether to add the debug data.