Skip to main content

RTT data generator

JSON-configurable data generator can execute external binaries to generate data (e.g., Sage scripts) in conjunction with CryptoStreams binary (e.g., to generate inputs / plaintexts for external binaries).

Template substitution

  • {{CRYPTOSTREAMS_BIN}} cryptostreams generator binary path

  • {{PYTHON_BIN}} Python3 binary path running RTT worker

  • {{SAGE_BIN}} SageMath binary path (if installed, otherwise defaults to sage)

  • {{RTT_EXEC}} /rtt_backend/rtt_execution directory

  • {{OFILE}} corresponds to argument --data-path of rtt-data-gen

  • {{FILE_X}} input file defined in the configuration file, X is sanitized upper-cased name. Usage: cryptostreams config used in exec as plaintext feeder.

  • {{CSFILE_X}} input file generated by cryptostreams generator according to the config defined in cstream_files. Usage: pre-generate encryption keys

Input files

JSON entry input_files in the json config root enables to specify a temporary files that can be used in exec template string.

Example:

{
  "input_files": {
    "CONFIG1.JSON": {
      "data": {
        "json_example_cfg": {"tmp": 1}
      }
    },
    "CONFIG2.BIN": {
      "data": "0102030405",
      "dtype": "hex"
    }
  }
}

Then {{FILE_CONFIG1.JSON}} is substituted for a path to a temporary file defined in the key CONFIG1.JSON. Data is serialized json.

Similarly, {{FILE_CONFIG2.BIN}} is substituted for a path to a temp file, which contains 0102030405 binary string.

Cryptostreams files

Usage: pre-generate temporary files with cryptostreams, e.g., encryption keys. For plaintext generators better use pipe in the exec template so no large temp file is created.

Example:

{
  "cstream_files": {
    "CSFILE1": {
      "data": {
        "seed": "4464a22651888b31",
        "stdout": true
      }
    }
  }
}

Examples

  • Generate simple plaintext template in counter mode, width 32 B per plaintext block

  • Plaintext: 01 | ... | 00 00 01

  • Pipe plaintext to a python script processing it, outputs on stdout.

{
  "stream": {
    "type": "shell",
    "direct_file": false,
    "exec": "{{CRYPTOSTREAMS_BIN}} -c={{FILE_CONFIG1.JSON}} | {{PYTHON_BIN}} {{RTT_EXEC}}/scripts/flipper.py -k=00"
  },
  "input_files": {
    "CONFIG1.JSON": {
      "note": "plaintext-ctr",
      "data": {
        "notes": "",
        "seed": "4464a22651888b31",
        "tv-size": null,
        "tv-count": null,
        "tv_size": 32,
        "tv_count": 6250000,
        "stdout": true,
        "file_name": "plain_ctr.bin",
        "stream": {
          "type": "xor_stream",
          "source": {
            "type": "tuple_stream",
            "sources": [
              {
                "type": "counter",
                "output_size": 32
              },
              {
                "type": "single_value_stream",
                "output_size": 32,
                "source": {
                  "type": "tuple_stream",
                  "sources": [
                    {
                      "type": "false_stream",
                      "output_size": 31
                    },
                    {
                      "type": "const_stream",
                      "output_size": 1,
                      "value": "01"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

Metadata

Release files for rtt-data-gen 0.0.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rtt-data-gen 0.0.19
File Size Uploaded
rtt-data-gen-0.0.19.tar.gz 25.5 kB Details

Release files / rtt-data-gen-0.0.19.tar.gz

Download URL rtt-data-gen-0.0.19.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2d05724a023ec6a993baf2b5581795d9eda011f0c25846e95f491bbabd0c22e8
BLAKE2b-256 checksum
How to use checksums
270a3f37c0838d9d4bfe0c2493c5a348607081095026cb65b38bdfd5dcc9271d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.0.19 This release

1 release file

0.0.18

1 release file

0.0.17

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.5

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page