From d5f990d568e2607ac81cecab0fce1825118b21f16e5190d6ca47be6f2408a745 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 21 Apr 2025 10:27:22 +0300 Subject: [PATCH] Unify cm.* usage --- go/cm/cmd/cmenctool/main.go | 2 +- go/cm/cmd/cmenctool/usage.go | 2 +- go/cm/cmd/cmhshtool/main.go | 2 +- go/cm/cmd/cmsigtool/main.go | 2 +- go/cm/cmd/cmsigtool/usage.go | 2 +- go/cm/sign/signed.go | 2 +- spec/cm/encrypted.texi | 2 +- spec/cm/pub.texi | 4 ++-- spec/cm/signed.texi | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go/cm/cmd/cmenctool/main.go b/go/cm/cmd/cmenctool/main.go index 15d959d..3b6efde 100644 --- a/go/cm/cmd/cmenctool/main.go +++ b/go/cm/cmd/cmenctool/main.go @@ -1,4 +1,4 @@ -// cmenctool -- dealing with KEKS-encoded cm-encrypted utility +// cmenctool -- dealing with KEKS-encoded cm/encrypted utility // Copyright (C) 2024-2025 Sergey Matveev // // This program is free software: you can redistribute it and/or modify diff --git a/go/cm/cmd/cmenctool/usage.go b/go/cm/cmd/cmenctool/usage.go index 2167448..937e5d5 100644 --- a/go/cm/cmd/cmenctool/usage.go +++ b/go/cm/cmd/cmenctool/usage.go @@ -1,4 +1,4 @@ -// cmenctool -- dealing with KEKS-encoded cm-encrypted utility +// cmenctool -- dealing with KEKS-encoded cm/encrypted utility // Copyright (C) 2024-2025 Sergey Matveev // // This program is free software: you can redistribute it and/or modify diff --git a/go/cm/cmd/cmhshtool/main.go b/go/cm/cmd/cmhshtool/main.go index 328ad5a..e4ddc5b 100644 --- a/go/cm/cmd/cmhshtool/main.go +++ b/go/cm/cmd/cmhshtool/main.go @@ -1,4 +1,4 @@ -// cmhshtool -- dealing with KEKS-encoded cm-hashed utility +// cmhshtool -- dealing with KEKS-encoded cm/hashed utility // Copyright (C) 2024-2025 Sergey Matveev // // This program is free software: you can redistribute it and/or modify diff --git a/go/cm/cmd/cmsigtool/main.go b/go/cm/cmd/cmsigtool/main.go index 412c7d9..e57c650 100644 --- a/go/cm/cmd/cmsigtool/main.go +++ b/go/cm/cmd/cmsigtool/main.go @@ -1,4 +1,4 @@ -// cmsigtool -- dealing with KEKS-encoded cm-signed utility +// cmsigtool -- dealing with KEKS-encoded cm/signed utility // Copyright (C) 2024-2025 Sergey Matveev // // This program is free software: you can redistribute it and/or modify diff --git a/go/cm/cmd/cmsigtool/usage.go b/go/cm/cmd/cmsigtool/usage.go index 6f50677..6eb4d64 100644 --- a/go/cm/cmd/cmsigtool/usage.go +++ b/go/cm/cmd/cmsigtool/usage.go @@ -1,4 +1,4 @@ -// cmsigtool -- dealing with KEKS-encoded cm-signed utility +// cmsigtool -- dealing with KEKS-encoded cm/signed utility // Copyright (C) 2024-2025 Sergey Matveev // // This program is free software: you can redistribute it and/or modify diff --git a/go/cm/sign/signed.go b/go/cm/sign/signed.go index f24ced7..d5c03fb 100644 --- a/go/cm/sign/signed.go +++ b/go/cm/sign/signed.go @@ -65,7 +65,7 @@ type Signed struct { Sigs []*Sig `keks:"sigs,omitempty"` } -// Parse and validate cm-signed from KEKS-encoded data. +// Parse and validate cm/signed from KEKS-encoded data. func Parse(data []byte) (signed *Signed, tail []byte, err error) { { var magic keks.Magic diff --git a/spec/cm/encrypted.texi b/spec/cm/encrypted.texi index 42a0682..31acc3f 100644 --- a/spec/cm/encrypted.texi +++ b/spec/cm/encrypted.texi @@ -34,7 +34,7 @@ additional fields supplementing the decryption process, like initialisation vector. If @code{/payload} is absent, then ciphertext is provided by other -means, for example just by following the @code{cm-encrypted} structure. +means, for example just by following the @code{cm/encrypted} structure. It is recommended to encode it as a BLOB, which chunk's length depends on DEM algorithm. diff --git a/spec/cm/pub.texi b/spec/cm/pub.texi index deefcad..7d5296f 100644 --- a/spec/cm/pub.texi +++ b/spec/cm/pub.texi @@ -3,7 +3,7 @@ @cindex cm/pub @section cm/pub format -Public key is the @code{@ref{cm-signed}} structure. +Public key is the @code{@ref{cm-signed, cm/signed}} structure. Stored in a file, it should begin with "cm/pub" @ref{MAGIC, magic}. @@ -52,7 +52,7 @@ It @strong{must} be absent if empty. Values are extension specific. @end table -@code{cm-signed}'s @code{sig-tbs} @strong{must} contain additional fields: +@code{cm/signed}'s @code{sig-tbs} @strong{must} contain additional fields: @verbatiminclude ../tcl/schemas/pub-sig-tbs.tcl diff --git a/spec/cm/signed.texi b/spec/cm/signed.texi index 315467e..da70afd 100644 --- a/spec/cm/signed.texi +++ b/spec/cm/signed.texi @@ -31,9 +31,9 @@ Signature is created by signing the: @end verbatim If no @code{/load/v} is provided, then the data is detached from the -@code{cm-signed} structure itself and it is fed into hasher before that +@code{cm/signed} structure itself and it is fed into hasher before that structure. You can provide it any way you wish, but for keeping that -detached data closely to the @code{cm-signed}, you should use the +detached data closely to the @code{cm/signed}, you should use the following approach: @verbatim -- 2.48.1