-// cmenctool -- dealing with KEKS-encoded cm-encrypted utility
+// cmenctool -- dealing with KEKS-encoded cm/encrypted utility
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
-// cmenctool -- dealing with KEKS-encoded cm-encrypted utility
+// cmenctool -- dealing with KEKS-encoded cm/encrypted utility
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
-// cmhshtool -- dealing with KEKS-encoded cm-hashed utility
+// cmhshtool -- dealing with KEKS-encoded cm/hashed utility
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
-// cmsigtool -- dealing with KEKS-encoded cm-signed utility
+// cmsigtool -- dealing with KEKS-encoded cm/signed utility
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
-// cmsigtool -- dealing with KEKS-encoded cm-signed utility
+// cmsigtool -- dealing with KEKS-encoded cm/signed utility
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
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
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.
@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}.
@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
@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