]> Cypherpunks repositories - keks.git/commitdiff
Include schemas during HTML rendering
authorSergey Matveev <stargrave@stargrave.org>
Sat, 10 May 2025 15:10:13 +0000 (18:10 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 10 May 2025 15:10:13 +0000 (18:10 +0300)
spec/cm/encrypted/index
spec/cm/hashed/index
spec/cm/kem/balloon-blake2b-hkdf
spec/cm/kem/gost3410-hkdf
spec/cm/kem/mceliece6960119-x25519-hkdf-shake256
spec/cm/kem/pbkdf2
spec/cm/kem/sntrup4591761-x25519-hkdf-blake2b
spec/cm/prv/index
spec/cm/pub/index
spec/cm/signed/index
spec/schema/tcl

index 7a4c148f63c7e98987ee4f6e1294d99f97afd5b908a63f1442d059030469d29a..1d449952977962ad3d873f5058b9f7af8a4e9f84a3372a1019abcd3797281283 100644 (file)
@@ -16,7 +16,8 @@ EnvelopedData, LibrePGP or age.
 * Ability to safely encrypt to multiple recipients
 
 Stored in a file, it should begin with "cm/encrypted" [encoding/MAGIC].
-[schemas/encrypted.tcl]
+
+include [schemas/encrypted.tcl]\r
 
 "/payload" contains the ciphertext. It is encrypted with random "content
 encryption key" (CEK) with an algorithm specified in "/dem/a" (data
index 109b4363b47fa97afa4dd96efa5f1437a024c08f679a8bc334f7dfac852f2d57..152545ab1705241ffb7de30543e36e57a3c42d8f25fb597378446024679f1ef9 100644 (file)
@@ -2,7 +2,9 @@ Integrity protected container, analogue to ASN.1-based CMS DigestedData.
 => https://datatracker.ietf.org/doc/html/rfc5652 CMS\r
 
 Stored in a file, it should begin with "cm/hashed" [encoding/MAGIC].
-[schemas/hashed.tcl]
+
+include [schemas/hashed.tcl]\r
+
 "/a" tells what algorithms will be used to hash the data.
 "/t" tells the type of the data inside.
 "/hash" contains the hash values for all corresponding "/a" algorithms.
index eb565fd4e6b844ebe68d448501f8aad7aa664164414c4d6ce50ca910c3618b93..0c578d3f2091a8b7c7678a0fd7d0d695ddc67bfb293fd9fcbd6a7324cff7b189 100644 (file)
@@ -1,5 +1,7 @@
 Balloon-BLAKE2b+HKDF KEM.
-[schemas/kem-balloon-blake2b-hkdf.tcl]
+
+include [schemas/kem-balloon-blake2b-hkdf.tcl]\r
+
 Balloon memory-hardened password hasher must be used with BLAKE2b hash.
 => https://crypto.stanford.edu/balloon/ Balloon\r
 
index 92923ddd93ab836e9183d0df79c135949e3e397b5bb7ae813d6e1fd40a43948b..a805fb38373b8e585813cce53067e9a77759e4940c8dda44c01babf6921c95ad 100644 (file)
@@ -1,5 +1,7 @@
 GOST R 34.10+HKDF KEM.
-[schemas/kem-gost3410-hkdf.tcl]
+
+include [schemas/kem-gost3410-hkdf.tcl]\r
+
 GOST R 34.10-2012 VKO parameter set A/C ("gost3410-256A", "gost3410-512C")
 must be used for DH operation, with UKM taken from the structure. VKO's
 output is 512- or 1024-bit "BE(X)||BE(Y)" point, used in HKDF below:
index 9c260f1b8248d7862872e16e7230a12cba19151f39e0a49996b00181cb82604a..1aea1212eb8412fd6480f4fa299a6775f94ac78ad110a2fe5db6dfb35028b064 100644 (file)
@@ -1,5 +1,7 @@
 Classic McEliece 6960-119+X25519+HKDF-SHAKE256 KEM.
-[schemas/kem-with-encap.tcl]
+
+include [schemas/kem-with-encap.tcl]\r
+
 "/kem/*/a" equals to "mceliece6960119-x25519-hkdf-shake256".
 Recipient public key with [cm/pub/mceliece6960119-x25519]
 algorithm must be used. It should have "kem" key usage set.
index ad8d62ec949e1cacbea0035323f658c7b0ff5a1c3edb958924683dd4e9fb5046..054be7edb98c2f18330fe4e9330d02164757dc3b62c7fb3f42252a5d295d73af 100644 (file)
@@ -1,5 +1,7 @@
 PBKDF2 KEM.
-[schemas/kem-pbkdf2.tcl]
+
+include [schemas/kem-pbkdf2.tcl]\r
+
 PBKDF2 is RFC 2898 algorithm.
 Key length equal to key wrapping algorithm requirements.
 => https://datatracker.ietf.org/doc/html/rfc2898 RFC 2898\r
index e219c82ef81dc9666c48aec469da8039b15e2087d3d7ce95c947e97873c2088c..6b849b45665be6c12f42cab1fdaea23ab54f256c2af86fa4b4834bd31c0ded4a 100644 (file)
@@ -1,5 +1,7 @@
 SNTRUP4591761+X25519+HKDF-BLAKE2b KEM.
-[schemas/kem-with-encap.tcl]
+
+include [schemas/kem-with-encap.tcl]\r
+
 "/kem/*/a" equals to "sntrup4591761-x25519-hkdf-blake2b".
 Recipient public key with [cm/pub/sntrup4591761-x25519]
 algorithm must be used. It should have "kem" key usage set.
index 38c67140a159b3eca8f680819b0f90718083dfbbb3d28e134fe9325d7c383639..35e14d5d0bdf30f29d865b652ab6c7712a4eba6959cad90602586a1f57ebcb9a 100644 (file)
@@ -1,5 +1,7 @@
 Private key container.
-[schemas/av.tcl]
+
+include [schemas/av.tcl]\r
+
 Stored in a file, it should begin with "cm/prv" [encoding/MAGIC].
 
 do-backs\r
index ec9bb5170ca2c12b98925b69170c29cd82c1d4adf121c58d066412fca52b4dba..b80e0ac12e07540577cefce02ee92a79e589b1759cedf004f3e571353af4740f 100644 (file)
@@ -2,7 +2,8 @@ Public key is the [cm/signed/] structure.
 Stored in a file, it should begin with "cm/pub" [encoding/MAGIC].
 
 Its "/load/t" equals to "pub". "/load/v" contains "cm/pub/load":
-[schemas/pub-load.tcl]
+
+include [schemas/pub-load.tcl]\r
 
 sub:
     Subject is a map of arbitrary strings. Currently no constraints on
@@ -33,7 +34,9 @@ crit:
     ones may be placed outside that map, directly in cm/pub/load.
     It *must* be absent if empty. Values are extension specific.
 
-[cm/signed/]'s "sig-tbs" *must* contain additional fields: [schemas/pub-sig-tbs.tcl]
+[cm/signed/]'s "sig-tbs" *must* contain additional fields:
+
+include [schemas/pub-sig-tbs.tcl]\r
 
 sid: Signing public key's fingerprint.
 cid: Certification unique identifier. UUIDv7 is a good choice.
index ce658feeb7eb92830ba9c5eb2929785538c189c0617750ce05e39a1851e807c9..330ce7085ae0c750a4fad04f23c59b96ce031b32e79430787d1e9602ec24dbda 100644 (file)
@@ -13,7 +13,9 @@ Signed container, some kind of analogue to ASN.1-based CMS SignedData.
 Stored in a file, it should begin with "cm/signed" [encoding/MAGIC],
 unless it is a [cm/pub/]lic key.
 
-[schemas/av.tcl] [schemas/fpr.tcl] [schemas/signed.tcl]
+include [schemas/av.tcl]\r
+include [schemas/fpr.tcl]\r
+include [schemas/signed.tcl]\r
 
 Signature is created by signing the:
 
@@ -27,7 +29,7 @@ following approach:
 
     cm/signed/prehash || BLOB(detached-data) || cm/signed
 
-[schemas/signed-prehash.tcl]
+include [schemas/signed-prehash.tcl]\r
 
 With "cm/signed/prehash" you initialise your hashers used during signing
 process and feed BLOB's contents (not the encoded BLOB itself!) into the them.
index a2f37cbe0ed5664ca30874736aa386786a54c2dc33585a68e3bf6487897fb98b..a6c9dfdb3ffe4ef0810b33dc2f73c48843ed377076b50c6dbdd38e8d3d27dbfe 100644 (file)
@@ -16,10 +16,11 @@ Example with "our" structure ([schema/cmds]) can be written as:
     }
 
 and [cm/pub/] as:
-[schemas/pub.tcl]
-[schemas/fpr.tcl]
-[schemas/pub-load.tcl]
-[schemas/pub-sig-tbs.tcl]
+
+include [schemas/pub.tcl]\r
+include [schemas/fpr.tcl]\r
+include [schemas/pub-load.tcl]\r
+include [schemas/pub-sig-tbs.tcl]\r
 
 schema.tcl calls "schemas {s0 cmds0 s1 cmds1 ...}"
 commands to produce an encoded map with "cmds*" commands for