RVZWN encryption format, version 1 ================================== Used by tools.rvzwn.com / Encrypt & Decrypt. Files end in ".rvz". Everything is big-endian. You can decrypt a file without the website by following this description. Primitives Argon2id (RFC 9106), AES-256-GCM (NIST SP 800-38D, 16-byte tag, 12-byte nonce), SHA-256. Header (48 bytes, always readable, but authenticated) 0 8 magic "RVZWNENC" 8 1 version 1 9 1 kdf 1 = Argon2id 10 4 memory KiB (the tool writes 65536) 14 1 passes (t) (the tool writes 3) 15 1 parallelism (p) (the tool writes 1) 16 1 flags bit 0: a key file is required 17 3 reserved zero 20 16 salt random 36 8 nonce prefix random 44 4 chunk size plaintext bytes per data chunk (the tool writes 1048576) Key secret = UTF-8( NFC( password ) ) if no key file secret = UTF-8( NFC( password ) ) || SHA-256(keyfile) if bit 0 of the flags is set (the password may be empty) key = Argon2id(secret, salt, memory, passes, parallelism, 32 bytes of output) Body (starts at byte 48) 4 bytes length L of the metadata ciphertext L bytes metadata chunk: AES-256-GCM of a UTF-8 JSON object {"n": file name, "t": media type, "m": modified time} then data chunks, each chunk-size plaintext bytes (the last one may be shorter, an empty file has one empty chunk); each ciphertext is plaintext length + 16 bytes of tag. Per chunk chunk number i: 0 for the metadata chunk, 1, 2, 3 ... for the data chunks nonce = nonce prefix (8 bytes) || i as 4 bytes additional authenticated data = the 48 header bytes || one byte, 1 for the very last data chunk, otherwise 0 A wrong password, a changed header, reordered chunks or a cut-short file all make a tag check fail. Text messages The same bytes (header + body), Base64-encoded in lines of 64 characters between "-----BEGIN RVZWN ENCRYPTED MESSAGE-----" and "-----END RVZWN ENCRYPTED MESSAGE-----". The text is stored as UTF-8 in the data chunk.