ANT.zip and ANT.enx (ENcrypted eXchange) are a signed format and an encrypted format respectively. they are used throughout the Favispecs which defines all sorts of use cases.
this document written on is Semantic version 0.1.0. this document is self-published independently.
to be a valid ANT.zip, the file MUST
ANT.json in the ziproot.
ANT.sig in the ziproot.
to be a valid ANT.json, the file MUST
did key set to the author's FaviDiD.
compat key.
fileIntegrity with an array of
fileIntegrity objects.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ANT.zip Configuration",
"type": "object",
"required": [
"specVersion",
"did",
"fileIntegrity"
],
"properties": {
"did": {
"type": "string",
"pattern": "^did:favidid:ed25519:[1-9A-HJ-NP-Za-km-z]+$",
"description": "the signer's did"
},
"specVersion": {
"type": "string",
"pattern": "^0\\.1\\.0$",
"description": "the specification version. MUST be matched against the specification for disambiguation. in this schema it MUST be {\"0.1.0\"}. SHOULD be matched to disambiguate specifics of a ANT.zip spec",
"$comment": "in terms of regex it must be {\"^\\d+\\.\\d+\\.\\d+$\"}"
},
"fileIntegrity": {
"type": "array",
"description": "MUST be an array of {{fileIntegrity}} objects",
"items": {
"$ref": "#/definitions/fileIntegrity"
}
}
},
"definitions": {
"fileIntegrity": {
"type": "object",
"description": "a layer",
"required": [
"path",
"integrity"
],
"properties": {
"path": {
"type": "string",
"description": "the File's path relative to {\"ANT.json\"}, MUST start with {\"/\"}. MUST be Normalized."
},
"integrity": {
"type": "string",
"pattern": "^(?:SHA(?:256|512)|BLAKE3)-[1-9A-HJ-NP-Za-km-z]+$",
"description": "the algorithm and a base58 (bitcoin alphabet) hash of that hash function"
},
"mimetype": {
"type": "string",
"pattern": "^[a-z]+/[a-z\\-]+(?:\\+[a-z]+)?$",
"description": "the File's media type"
}
}
}
}
}
| Field Name | Type | Field Requirements | Required | Field Description |
|---|---|---|---|---|
did | string | string MUST match /^did:favidid:ed25519:[1-9A-HJ-NP-Za-km-z]+$/ json regxep | True | the signer's did |
specVersion | string | string MUST match /^0\.1\.0$/ json regxep | True | the specification version. MUST be matched against the specification for disambiguation. in this schema it MUST be 0.1.0. SHOULD be matched to disambiguate specifics of a ANT.zip spec
|
fileIntegrity | array | None | True | MUST be an array of fileIntegrity objects
|
| Field Name | Type | Field Requirements | Required | Field Description |
|---|---|---|---|---|
path | string | None | True | the File's path relative to ANT.json, MUST start with /. MUST be Normalized.
|
integrity | string | string MUST match /^(?:SHA(?:256|512)|BLAKE3)-[1-9A-HJ-NP-Za-km-z]+$/ json regxep | True | the algorithm and a base58 (bitcoin alphabet) hash of that hash function |
mimetype | string | string MUST match /^[a-z]+/[a-z\-]+(?:\+[a-z]+)?$/ json regxep | False | the File's media type |
to sign an ANT.zip sign the ANT.json with the user's
Private-Key and put it in
ANT.sig
While the Full Path Sanitization is implementation-defined, implementations MUST make sure the path follows these rules.
\/:*?"<>|/ as the path separator.
..) or current
directory indicators (.).
Implementations MUST handle errors gracefully to maintain user data integrity. If a required file is missing,
the application SHOULD NOT crash, but rather notify the user. If the ANT.json
file is invalid or corrupted, the application MUST alert the user and refuse to load the data.
Sanitization of file paths is REQUIRED to prevent path traversal
vulnerabilities.
other than that programs SHOULD attempt to do the following when a spec Violation Occurs:
..)
or current directory indicators (.).
ANT.json.
ANT.json doesnt verify with the ANT.sig.
ANT.zip as Untrusted
when an ANT.zip is marked as Untrusted, a Program MUST notify the user of the Untrusted status,
a Program SHOULD be specific about what error was violated.
to sign an ANT.zip (ZipFile) using My-Private-Key, MUST follow these
steps.
"ANT" ignoring the extension then throw an Error.
{
"fileIntegrity": [],
"specVerson": "0.1.0",
"compat": {
"https://antrequest.nl/standard/PlanetSpec/0.0.2/": {
"main": true
},
"https://antrequest.nl/standard/ANTzip/0.1.0/": {
"main": true,
"DEFLATE": true,
"SHA256": true,
"SHA512": true,
"BLAKE3": true
}
}
}
(indentation whitespace is Edge-Defined)
fileIntegrity of JSON.
{
"path": <The File's Path>,
"integrity": The File's Integrity with an supported algorithm in the format <algo>-<base58Bytes>,
"mimetype": <the best guess of its mimetype>
}
to Array replacing my placeholders.
"ANT.json".
"ANT.json".
"ANT.sig".
to create an ANT.enx from an ANT.zip (ANTZip), MUST follow these steps.
crypto_sign_ed25519_pk_to_curve25519.)
ANT.zip archive called $new-ANT-enx."Blob.enx".
".enx".