From: Sergey Matveev Date: Sat, 10 May 2025 16:23:09 +0000 (+0300) Subject: Indented includes X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=35d6764869473cb545664a9ff0b336b6c78f32fe50d171e717cdac802edde3d9;p=keks.git Indented includes --- diff --git a/spec/cm/encrypted/index b/spec/cm/encrypted/index index 1d44995..75d6326 100644 --- a/spec/cm/encrypted/index +++ b/spec/cm/encrypted/index @@ -17,7 +17,7 @@ EnvelopedData, LibrePGP or age. Stored in a file, it should begin with "cm/encrypted" [encoding/MAGIC]. -include [schemas/encrypted.tcl] +<< [schemas/encrypted.tcl] "/payload" contains the ciphertext. It is encrypted with random "content encryption key" (CEK) with an algorithm specified in "/dem/a" (data diff --git a/spec/cm/hashed/index b/spec/cm/hashed/index index 152545a..37b1480 100644 --- a/spec/cm/hashed/index +++ b/spec/cm/hashed/index @@ -3,7 +3,7 @@ Integrity protected container, analogue to ASN.1-based CMS DigestedData. Stored in a file, it should begin with "cm/hashed" [encoding/MAGIC]. -include [schemas/hashed.tcl] +<< [schemas/hashed.tcl] "/a" tells what algorithms will be used to hash the data. "/t" tells the type of the data inside. diff --git a/spec/cm/kem/balloon-blake2b-hkdf b/spec/cm/kem/balloon-blake2b-hkdf index 0c578d3..1878ce1 100644 --- a/spec/cm/kem/balloon-blake2b-hkdf +++ b/spec/cm/kem/balloon-blake2b-hkdf @@ -1,6 +1,6 @@ Balloon-BLAKE2b+HKDF KEM. -include [schemas/kem-balloon-blake2b-hkdf.tcl] +<< [schemas/kem-balloon-blake2b-hkdf.tcl] Balloon memory-hardened password hasher must be used with BLAKE2b hash. => https://crypto.stanford.edu/balloon/ Balloon diff --git a/spec/cm/kem/gost3410-hkdf b/spec/cm/kem/gost3410-hkdf index a805fb3..b7938f0 100644 --- a/spec/cm/kem/gost3410-hkdf +++ b/spec/cm/kem/gost3410-hkdf @@ -1,6 +1,6 @@ GOST R 34.10+HKDF KEM. -include [schemas/kem-gost3410-hkdf.tcl] +<< [schemas/kem-gost3410-hkdf.tcl] 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 diff --git a/spec/cm/kem/mceliece6960119-x25519-hkdf-shake256 b/spec/cm/kem/mceliece6960119-x25519-hkdf-shake256 index 1aea121..3b50269 100644 --- a/spec/cm/kem/mceliece6960119-x25519-hkdf-shake256 +++ b/spec/cm/kem/mceliece6960119-x25519-hkdf-shake256 @@ -1,6 +1,6 @@ Classic McEliece 6960-119+X25519+HKDF-SHAKE256 KEM. -include [schemas/kem-with-encap.tcl] +<< [schemas/kem-with-encap.tcl] "/kem/*/a" equals to "mceliece6960119-x25519-hkdf-shake256". Recipient public key with [cm/pub/mceliece6960119-x25519] diff --git a/spec/cm/kem/pbkdf2 b/spec/cm/kem/pbkdf2 index 054be7e..5ef507c 100644 --- a/spec/cm/kem/pbkdf2 +++ b/spec/cm/kem/pbkdf2 @@ -1,6 +1,6 @@ PBKDF2 KEM. -include [schemas/kem-pbkdf2.tcl] +<< [schemas/kem-pbkdf2.tcl] PBKDF2 is RFC 2898 algorithm. Key length equal to key wrapping algorithm requirements. diff --git a/spec/cm/kem/sntrup4591761-x25519-hkdf-blake2b b/spec/cm/kem/sntrup4591761-x25519-hkdf-blake2b index 6b849b4..074ec2b 100644 --- a/spec/cm/kem/sntrup4591761-x25519-hkdf-blake2b +++ b/spec/cm/kem/sntrup4591761-x25519-hkdf-blake2b @@ -1,6 +1,6 @@ SNTRUP4591761+X25519+HKDF-BLAKE2b KEM. -include [schemas/kem-with-encap.tcl] +<< [schemas/kem-with-encap.tcl] "/kem/*/a" equals to "sntrup4591761-x25519-hkdf-blake2b". Recipient public key with [cm/pub/sntrup4591761-x25519] diff --git a/spec/cm/prv/index b/spec/cm/prv/index index 35e14d5..acdd455 100644 --- a/spec/cm/prv/index +++ b/spec/cm/prv/index @@ -1,6 +1,6 @@ Private key container. -include [schemas/av.tcl] +<< [schemas/av.tcl] Stored in a file, it should begin with "cm/prv" [encoding/MAGIC]. diff --git a/spec/cm/pub/index b/spec/cm/pub/index index b80e0ac..130434e 100644 --- a/spec/cm/pub/index +++ b/spec/cm/pub/index @@ -3,7 +3,7 @@ Stored in a file, it should begin with "cm/pub" [encoding/MAGIC]. Its "/load/t" equals to "pub". "/load/v" contains "cm/pub/load": -include [schemas/pub-load.tcl] +<< [schemas/pub-load.tcl] sub: Subject is a map of arbitrary strings. Currently no constraints on @@ -36,7 +36,7 @@ crit: [cm/signed/]'s "sig-tbs" *must* contain additional fields: -include [schemas/pub-sig-tbs.tcl] +<< [schemas/pub-sig-tbs.tcl] sid: Signing public key's fingerprint. cid: Certification unique identifier. UUIDv7 is a good choice. diff --git a/spec/cm/signed/index b/spec/cm/signed/index index 330ce70..af77fb9 100644 --- a/spec/cm/signed/index +++ b/spec/cm/signed/index @@ -13,9 +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. -include [schemas/av.tcl] -include [schemas/fpr.tcl] -include [schemas/signed.tcl] +<< [schemas/av.tcl] +<< [schemas/fpr.tcl] +<< [schemas/signed.tcl] Signature is created by signing the: @@ -29,7 +29,7 @@ following approach: cm/signed/prehash || BLOB(detached-data) || cm/signed -include [schemas/signed-prehash.tcl] +<< [schemas/signed-prehash.tcl] 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. diff --git a/spec/index b/spec/index index bd8096b..1d4926c 100644 --- a/spec/index +++ b/spec/index @@ -27,7 +27,7 @@ requirements below. * It *should* differentiate binary and human-readable strings. * It *would* be nice to have human-editable intermediate representation. -include [ComparisonWithOtherCodecs] +<<[ComparisonWithOtherCodecs] [INSTALL] [encoding/] diff --git a/spec/schema/tcl b/spec/schema/tcl index a6c9dfd..f02d15f 100644 --- a/spec/schema/tcl +++ b/spec/schema/tcl @@ -17,10 +17,10 @@ Example with "our" structure ([schema/cmds]) can be written as: and [cm/pub/] as: -include [schemas/pub.tcl] -include [schemas/fpr.tcl] -include [schemas/pub-load.tcl] -include [schemas/pub-sig-tbs.tcl] +<< [schemas/pub.tcl] +<< [schemas/fpr.tcl] +<< [schemas/pub-load.tcl] +<< [schemas/pub-sig-tbs.tcl] schema.tcl calls "schemas {s0 cmds0 s1 cmds1 ...}" commands to produce an encoded map with "cmds*" commands for