feat: update tiny encrypt spec v1.1

This commit is contained in:
2023-02-12 22:12:52 +08:00
parent 2e63433a23
commit 6424d47878

View File

@@ -12,27 +12,27 @@ File format:
Meta format: Meta format:
| Field | Type | Comment | | Field | Type | Comment |
|---------|---------|----------------------------------------------| |---------|-----------|----------------------------------------------|
| version | String | Constant value: `1.1` | | version | String | Constant value: `1.1` |
| created | Long | Created time, Unix Epoch | | created | Long | Created time, Unix Epoch |
| userAgent | String | User Agent, e.g. `TinyEncrypt v0.5.1@MacOS` | | userAgent | String | User Agent, e.g. `TinyEncrypt v0.5.1@MacOS` |
| comment | String | `optional` Plain text comment | | comment | String | `optional` Plain text comment |
| encryptedComment | String | `optional` Encrypted comment | | encryptedComment | String | `optional` Encrypted comment |
| encryptedMeta | String | `optional` Encrypted Meta Data | | encryptedMeta | String | `optional` Encrypted Meta Data |
| pgpEnvelop | String | `deprecated` PGP Publickey Encrypted DataKey | | pgpEnvelop | String | `deprecated` PGP Publickey Encrypted DataKey |
| pgpFingerprint | String | `deprecated` Hex(Sha256(PGP Publickey)) | | pgpFingerprint | String | `deprecated` Hex(Sha256(PGP Publickey)) |
| envelop | String | `deprecated` KMS Encrypted DataKey | | envelop | String | `deprecated` KMS Encrypted DataKey |
| envelops | Envelop[] | Envelop Array | | envelops | Envelop[] | Envelop Array |
| nonce | byte[] | GCM Nonce | | nonce | String | `base64` GCM Nonce |
| fileLength | Long | File Length | | fileLength | Long | File Length |
| fileLastModified | Long | File Last Modified, Unix Epoch | | fileLastModified | Long | File Last Modified, Unix Epoch |
| compress | Boolean | Compressed or Not | | compress | Boolean | Compressed or Not |
Envelop format: Envelop format:
| Field | Type | Comment | | Field | Type | Comment |
|--------------|--------|-------------------| |--------------|--------|------------------------|
| type | String | `kms`, `pgp`, ... | | type | String | `kms`, `pgp`, ... |
| kid | String | Key ID | | kid | String | Key ID |
| encryptedKey | String | Encrypted Key | | encryptedKey | String | `base64` Encrypted Key |