From edeff5c26543f0402b9bbbf011ee84ae01b47fa1 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sat, 2 Sep 2023 00:47:50 +0800 Subject: [PATCH] feat: update spec --- TinyEncryptSpecV1.1.md | 53 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/TinyEncryptSpecV1.1.md b/TinyEncryptSpecV1.1.md index 071c392..444b37a 100644 --- a/TinyEncryptSpecV1.1.md +++ b/TinyEncryptSpecV1.1.md @@ -12,32 +12,33 @@ File format: 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` age1*** | -| ecdhEnvelop | String | `deprecated` KW:*** | -| ecdhPoint | String | `deprecated` 02*** | -| 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` | +| 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` age1*** | +| ecdhEnvelop | String | `deprecated` KW:*** | +| ecdhPoint | String | `deprecated` 02*** | +| envelop | String | `deprecated` KMS Encrypted DataKey | +| envelops | Envelop[] | Envelop Array | +| encryptionAlgorithm | String | `optional` Default `AES/GCM` | +| 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 | \ No newline at end of file +| Field | Type | Comment | +|--------------|--------|----------------------------------------| +| type | String | Type: `kms`, `pgp`, `age`, `ecdh`, ... | +| kid | String | Key ID | +| desc | String | `optional` Description | +| encryptedKey | String | `base64` Encrypted Key | \ No newline at end of file