Files
tiny-encrypt-java/TinyEncryptSpecV1.1.md
2023-03-25 15:50:39 +08:00

1.9 KiB

File ext: *.tinyenc

File format:

[TAG; 2 bytes; short; BE; Always 1]
[LENGTH; 4 bytes; int; BE]
[META; LENGTH bytes]
[ENCRYPTED_DATA; n bytes; AES/GCM]

Meta format:

Field Type Comment
version String Constant value: 1.1
created Long Created time, Unix Epoch
userAgent String User Agent, e.g. TinyEncrypt v0.5.1@MacOS
comment String optional Plain text comment
encryptedComment String optional Encrypted comment
encryptedMeta String optional Encrypted Meta Data
pgpEnvelop String deprecated PGP Publickey Encrypted DataKey
pgpFingerprint String deprecated Hex(Sha256(PGP Publickey))
ageEnvelop String deprecated PGP Publickey Encrypted DataKey
ageRecipient String deprecated Hex(Sha256(PGP Publickey))
envelop String deprecated KMS Encrypted DataKey
envelops Envelop[] Envelop Array
nonce String base64 GCM Nonce
fileLength Long File Length
fileLastModified Long File Last Modified, Unix Epoch
compress Boolean Compressed or Not, GZIP if true

Envelop format:

Field Type Comment
type String Type: kms, pgp, ...
kid String Key ID
desc String optional Description
encryptedKey String base64 Encrypted Key