giz

Encrypted Archives that Expire

An encrypted, self-repairing archiver with post-quantum protection and optional limits on how long and how often an archive can be opened.

What it does

giz packs files and folders into a single encrypted archive (a .giz file), much as zip or 7-Zip do, but built around security first and size second.

  • Two passwords. Every archive has a create password, held by its owner, and an extract password, given to the people who need the contents. Either password opens the archive. Only the create password can change it or read its access log.
  • Optional limits. A restricted archive can be opened only for a set number of days (at most 365) and/or a set number of times. Once a limit is reached the archive can never be opened again, by anyone, including GEN.
  • Self-repairing. Each archive carries recovery records (10% by default). Damage in transit, such as corrupted, missing or extra bytes, is repaired automatically on extraction, up to that amount.
  • No accounts. Nobody signs up or logs in. Possession of the archive and a password is the only proof needed.
  • Licensed creation. Creating and changing archives needs a giz licence. Opening, checking and repairing them does not.

A restricted archive depends on the giz service at api.gen.uk, which holds one piece of its key and enforces the limits. An unrestricted archive never contacts anything.

How secure is it

The encryption

  • The contents are encrypted twice, with XChaCha20-Poly1305 inside AES-256-GCM, each under its own 256-bit key. An attacker would have to break both. Other suites are available; this cascade is the default.
  • Passwords are hardened with Argon2id using 256 MiB of memory per attempt, which makes guessing slow and expensive even on specialist hardware.
  • Everything is authenticated. Altering a single byte, including the visible header details, makes the archive refuse to open rather than produce altered content.

Quantum computers

giz is designed to resist a future quantum computer, including an attacker who records everything today and decrypts it later.

  • The contents are protected only by symmetric encryption and hashing. The best known quantum attack on these (Grover's algorithm) roughly halves their strength, leaving the equivalent of 128-bit security, which remains far beyond reach.
  • No classical public-key cryptography (RSA, elliptic curves) protects the contents.
  • Conversations with the giz service use ML-KEM-1024, the NIST post-quantum standard, combined with X25519, inside TLS. Each reply, which is what carries a key share, is protected by a fresh key, so a recorded reply cannot be opened even if the service's long-term key is later stolen.
  • Licences are signed with ML-DSA-87, the NIST post-quantum signature standard.

Restricted archives

  • Opening a restricted archive needs three things together: the file, a password, and a key share that only the service holds.
  • The service never sees the contents, the passwords, or the keys that encrypt the contents. A copy of the service's database is useless without the archive files.
  • When the archive expires or runs out of extractions, the service destroys its share, and within three days every backup copy of it has gone too. From then on the contents are unrecoverable: there is no key left anywhere to recover.
  • Nothing in a restricted archive can confirm a password guess on its own: every guess has to go to the service, which slows repeated wrong attempts down and records each one in the archive's log.
  • Limits are fixed when the archive is made. There is deliberately no way for anyone to extend, change or withdraw an archive afterwards.
  • The limits are only as trustworthy as the service. Someone who took control of the service while an archive was live could defeat its limits, but only if they also had the file and a password.

What giz does not do

  • It is not copy protection. Once someone has extracted the files, they have them. Limits control how often and how long the archive can be opened, not what happens to the files afterwards.
  • Anyone holding the file and the extract password can open it within its limits. giz does not tie an archive to a person or a device.
  • Some details are visible without a password: whether the archive is restricted, when it was created and when it expires, its extraction limit, the cipher used, the licence ID and, roughly, its size (contents are padded to hide the exact size). File names, sizes, contents and the creator's details are all encrypted.
  • Lost passwords cannot be recovered. There is no back door, for GEN or anyone else.
  • Restricted archives need the service. If api.gen.uk cannot be reached, a restricted archive cannot be opened until it can.
  • The weaker password decides. Either password opens the archive, so a strong create password does not protect an archive with a weak extract password. giz therefore refuses any password you choose yourself whose estimated strength is below 50 bits. The estimate judges how an attacker would really guess it (dictionary words, names, repeats, keyboard patterns, dates and the like), not its length or mix of characters, so AaaaaaAaAaAaaA! is refused while a passphrase of four unrelated words is accepted. Generated passwords (160 random bits) are always accepted.

Choosing and sharing passwords

The encryption in giz is far stronger than any password people are likely to choose, so in practice an archive is exactly as safe as its passwords and the way they are passed on.

Choosing passwords

Let giz choose the extract password. --extract-pass-gen produces 160 random bits as 32 characters in groups of four, such as 4JAP-DASE-ZG4B-XF2B-8DYG-3KPA-XXZJ-6M66. It leaves out the easily confused letters I, L, O and U, so it can be read aloud a group at a time.

Strength comes from randomness, not appearance. What matters is how many possibilities an attacker would have to try, and that depends on how the password was chosen. Cracking tools model people: they try slogans, names, dates, common phrases, keyboard runs, letter-for-symbol swaps, and capitals, symbols and small numbers in the usual places. A password a person chose is guessed by guessing the person.

PasswordHow it was chosenStrength
testBy a personAbout 7 bits: guessed instantly
Password123!By a personAbout 15 bits
EveryLittleHelps!26By a person: a slogan plus decorationAbout 25 bits
AaaaaaAaAaAaaA!By a person: long, but a patternAbout 32 bits
10 random keyboard charactersBy a computerAbout 66 bits
5 random words, such as harbour violet tumble lantern meadowBy a computerAbout 65 bits
A giz-generated passwordBy giz160 bits

Dictionary words are only weak when a person picks them. Five words drawn at random from a list of 7,776 are as strong as ten random keyboard characters, even when the attacker knows the list, and far easier to say and type. If you use words, they must be picked at random (dice work) and used exactly as drawn: rearranging them into a sentence or swapping one for a nicer word brings human choice back.

The weaker password decides. Either password opens the archive, so a strong create password does nothing for an archive with a weak extract password. giz refuses any password you choose yourself whose estimated strength is below 50 bits. Treat that as a safety net, not a guarantee: the estimate catches the obviously weak, but it does not know every common phrase and can rate a person's clever invention more highly than an attacker would.

Keep the two passwords apart. The create password is yours alone. Use a different extract password for each archive and each recipient, so one careless recipient exposes only one archive.

Sharing passwords

Never send the password the same way as the archive. If the archive goes by email, the password goes by phone, video call, text message or in person. Someone who intercepts one channel then has only half of what they need.

Use a restricted archive for anything that matters. Nothing in a restricted archive can confirm a guess on its own: every guess has to go to the giz service, which slows repeated attempts down to a few dozen a day and records each one in the archive's log. A short lifetime and a low extraction limit (--days 7 --extractions 2, say) mean that a password which is intercepted, overheard or carelessly forwarded soon opens nothing at all.

On a call:

  • Call a number you already hold for the client, never one taken from the email that carried the archive.
  • Ask them to confirm the archive has arrived before you give the password, so nobody can intercept the email and then ring you asking for it.
  • Read the password aloud. Do not type it into the meeting chat, which is stored and searchable.
  • Before reading it out, make sure recording, transcription, live captions and any AI meeting assistant are switched off. Each of these writes the words down and keeps them, often on the provider's servers, and may email them to everyone invited.
  • Check who is on the call: no unexpected attendees or dial-in numbers.

Ask the recipient to use it, not keep it. They should not forward it by email, paste it into a shared document or leave it on a note. With a low extraction limit, once they have opened the archive the password is spent anyway.

Agreeing references in advance works too. People who already share context can pass a password without ever stating it: "the date we agreed", the last line of an email that means something only to the recipient. This is sound, provided the agreement itself was made in person or by another route, and the exact form (2000-08-17, not 17/08/2000) is settled in advance, because every byte must match.

If you suspect interception, check giz log for failed attempts (bad_token). An archive cannot be withdrawn once made, so send a new archive with a new extract password, and rely on the original's limits to close it. This is another reason to keep lifetimes short.

How to use it

Installing

Download the giz binary for your platform from the giz product page and copy it onto your path, for example /usr/local/bin on macOS or Linux. To create archives, install your licence once:

giz licence install --licence-file licence.txt
giz licence show

Creating an archive

giz create reports.giz reports/ --create-pass-gen --extract-pass-gen

This stores the reports folder and prints two generated passwords. Keep the create password; send the extract password to the recipient by a different route from the archive itself.

A folder named with a trailing slash (reports/) stores its contents; without one (reports) it is stored under its own name. Without password options, giz prompts for each password twice.

Creating a restricted archive

giz create contract.giz contract.pdf --days 14 --extractions 3 --receipt contract.rcpt

The archive can be opened at most 3 times in the next 14 days, whichever runs out first. The optional receipt is a small file that, with the create password, lets you check the status and log after you have sent the archive away. It cannot open the archive.

Opening an archive

giz list contract.giz
giz extract contract.giz -d out/
giz extract contract.giz -d out/ contract.pdf     # just one entry

giz asks for "password": either password works. Existing files are not overwritten unless you add --overwrite. On a restricted archive, each extract or list with the extract password counts as one extraction; opening with the create password is never counted.

Checking an archive

giz info contract.giz          # visible details, no password needed
giz status contract.giz        # days and extractions left
giz log contract.rcpt          # who opened it, when and from where (create password)
giz test contract.giz          # checks for damage, no password needed
giz test contract.giz --full   # also decrypts and verifies every file

Changing an archive

giz add reports.giz extra.xlsx
giz remove reports.giz old/
giz freshen reports.giz --from reports/

freshen replaces any file whose copy in the given folder is newer. Each of these needs the create password and produces a new archive with a new ID and a new extract password. The original keeps working for anyone who already holds it until its own limits run out. A restricted archive can only be changed while it is still live.

Repairing a damaged archive

Extraction repairs damage automatically when it can. To write a repaired copy:

giz repair damaged.giz -o repaired.giz

Repair needs no password. If the damage is greater than the recovery records can cover, giz says so and the archive cannot be saved.

Passwords

Each password can come from one of these sources:

SourceExtract passwordCreate password
Typed on the command line--extract-pass VALUE--create-pass VALUE
An environment variable--extract-pass-env NAME--create-pass-env NAME
A file--extract-pass-file PATH--create-pass-file PATH
Standard input--extract-pass-stdin--create-pass-stdin
Generated by giz--extract-pass-gen--create-pass-gen
Promptwhen no source is given

A password typed on the command line can be seen by other users of the same machine while giz runs, so prefer the other sources on shared systems.

The two passwords must differ, and a password you choose must pass the strength check described above. Passwords are used exactly as given. For a password that must survive any keyboard, system or language setting, or one that is binary, give it in hex with --hex:

giz extract archive.giz --hex --extract-pass 54657374

--hex applies to every password in that command. 54657374 is the same password as Test.

Scripts

--json, --sh and --env give machine-readable output; --secrets-file PATH writes it to a new file readable only by you instead of the screen.

eval "$(giz create weekly.giz /data/reports/ --create-pass-env GIZ_OWNER_PASS \
        --extract-pass-gen --days 30 --sh)"
echo "Send $GIZ_ARCHIVE, extract password $GIZ_EXTRACT_PASS"
VariableMeaning
GIZ_ARCHIVEArchive path
GIZ_IDArchive ID
GIZ_TYPErestricted or unrestricted
GIZ_EXPIRESExpiry, ISO 8601 UTC
GIZ_EXTRACTIONSExtraction limit
GIZ_EXTRACT_PASS, GIZ_CREATE_PASSPasswords, when generated or with --hex
GIZ_STATE, GIZ_DAYS_LEFT, GIZ_EXTRACTIONS_LEFTFrom status

If you capture output in a temporary file, delete it once the passwords have been used.

Creation options

OptionDefault
--days N, --extractions NMakes the archive restricted
--suite cascade|xchacha20|aes256cascadeCipher
--compress zstd|xz|none, --level Nzstd, 19Compression
--recovery PCT10Recovery records, 0 to 100%
--pad padme|nonepadmeSize padding
--creator-name, --creator-email, --creator-im, --creator-url, --creator-phonenoneYour contact details, encrypted, readable with either password (for a restricted archive, only while it is live)
--weak-pass-okoffAccept a chosen password below the strength minimum
--receipt PATHnoneWrite a receipt
--follow-symlinksoffStore what links point to, not the links

Defaults can be set in ~/.config/giz/config on Linux, ~/Library/Application Support/giz/config on macOS, or %AppData%\giz\config on Windows, one option = value per line, for example creator-email = ops@example.com. Passwords cannot be set there.

Exit codes

CodeMeaning
0Success
1General error
2Usage error
3Wrong password
4Archive expired
5Extractions used up
6Damaged beyond repair
7A newer giz is needed
8Service unreachable
9Licence missing, invalid or refused
10Too many failed attempts, try later