Package: tird
tirdtird(an acronym for "this is random data")is a tool for writing random bytes, encrypting file contents, and hiding encrypted data.tirdcan create files with random data, overwrite file contents with random data, encrypt file contents and comments, hide encrypted data among random data, minimize metadata leakage, and can provide some forms ofplausible deniability.tirdaims to provide a stable encryption format for long-term data storage using modern and standardized cryptographic primitives.GoalsProviding protection for individual files, including:symmetric encryption;reducing metadata leakage;hiding encrypted data;plausible deniability.Providing a stable encryption format with nocryptographic agilityfor long-term data storage.Simplicity and nofeature creep: refusal to implement features that are not directly related to primary security goals.Cryptographic primitivestirduses the following cryptographic primitives:BLAKE2(RFC 7693):salted and personalizedBLAKE2bfor hashing keyfiles and passphrases;keyedBLAKE2bfor message authentication.Argon2memory-hard function (RFC 9106) for key stretching and key derivation.ChaCha20cipher (RFC 7539) for data encryption.Encryption format (cryptoblob structure)512B          0+B
                 +----------+---------------+
                 | comments | file contents |
                 +----------+---------------+
  16B     0+B    |     plaintext/payload    | 64B     0+B     16B
+------+---------+--------------------------+-----+---------+------+
| salt | padding |        ciphertext        | MAC | padding | salt |
+------+---------+--------------------------+-----+---------+------+
|  random bytes  |    random-looking bytes        |  random bytes  |
+----------------+--------------------------------+----------------+Tradeoffs and limitationstirddoes not support public-key cryptography.tirddoes not support file compression.tirddoes not support ASCII armored output.tirddoes not support Reed–Solomon error correction.tirddoes not support splitting the output into chunks.tirddoes not support low-level device reading and writing when used on MS Windows (devices cannot be used as keyfiles, cannot be overwritten, cannot be encrypted or hidden).tirddoes not provide a graphical user interface.tirddoes not provide a password generator.tirddoes not wipe sensitive data from the heap.tirdcan only encrypt one file per iteration. Encryption of directories and multiple files is not supported.tirddoes not fake file timestamps (atime, mtime, ctime).tirdencryption speed is not very fast: up to 180 MiB/s (in my tests).Warnings⚠️ The author is not a cryptographer.⚠️tirdhas not been independently audited.⚠️tirdprobably won't help much when used in a compromised environment.⚠️tirdprobably won't help much when used with short and predictable keys.⚠️ Keys may leak into the swap space.⚠️tirdalways releases unverified plaintext (violatesThe Cryptographic Doom Principle).⚠️tirddoes not sort digests of keyfiles and passphrases in constant time.⚠️ Development is ongoing, there may be backward compatibility issues in the future.UsageYou don't need to remember command line options to usetird.Just starttird, select a menu option, and then answer the questions thattirdwill ask:$tirdDebugStarttirdwith the option--debugor-dto look under the hood while the program is running:$tird-dRequirementsPython >= 3.6PyNaCl>= 1.2.0 (providesArgon2)PyCryptodomex>= 3.6.2 (providesChaCha20)InstallInstallpython3andpython3-pip(orpython-pip), then run$pipinstalltirdStandalone executables (made withPyInstaller) are also available (seeReleases).TODOWrite documentation:Features;Specification;Design rationale;User guide.FeedbackFeel free to post any questions, feedback or criticisms to theDiscussions.LicenseThis project is licensed under the terms of theCreative Commons Zero v1.0 Universal License(Public Domain Dedication).