Skip to content

Slog plain base64 - #5735

Draft
wwdenw wants to merge 2 commits into
syslog-ng:developfrom
nbsd:slog-plain-base64
Draft

wwdenw wants to merge 2 commits into
syslog-ng:developfrom
nbsd:slog-plain-base64

Conversation

@wwdenw

@wwdenw wwdenw commented Jun 25, 2026

Copy link
Copy Markdown

This Feature PR for secure-logging now provides three modes of logging:

  • plain direct
  • plain Base64
  • encrypted

The template for using the syslog-ng daemon has been changed for this.
Now the --logmode (direct|base64|enc) argument can be provided in the slog
template in the configuration file syslog-ng.conf.

--logmode direct provides the log message as is and adds a cryptographic checksum

--logmode base64 provides the log message encoded as a Base64 string and also adds a cryptographic checksum.

--logmode enc behaves exactly like the current version of secure-logging without the log mode, which means all log messages are encrypted and are also secured by an overall cryptographic checksum.

@kira-syslogng

Copy link
Copy Markdown
Contributor

Can one of the admins verify this patch?

1 similar comment
@kira-syslogng

Copy link
Copy Markdown
Contributor

Can one of the admins verify this patch?

@HofiOne

HofiOne commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks, we will review this, but I cannot give an estimate at the moment as to when that will happen.

In the meantime, please make sure that any new PR is based on the latest develop branch, as it has changed significantly since then.

Also, please split large commits, such as:

5bd425f

into smaller, logically separated commits to make the review process easier.

@wwdenw

wwdenw commented Jun 26, 2026

Copy link
Copy Markdown
Author

Also, please split large commits, such as:
5bd425f
into smaller, logically separated commits to make the review process easier.

Do you want me to withdraw the current PR and create several new PRs?
I can split current PR into 2 parts

  • slog-plain-base64-core
  • slog-plain-base64-test-scripts
    Do you agree?

@wwdenw
wwdenw force-pushed the slog-plain-base64 branch from d66510b to 043e9f8 Compare June 26, 2026 05:32
@HofiOne

HofiOne commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

You do not necessarily need to split this into multiple PRs or create a new one. I was referring to splitting the individual commits into smaller, logically separated commits to make the review process easier.

@wwdenw
wwdenw force-pushed the slog-plain-base64 branch from 043e9f8 to 582fe07 Compare June 26, 2026 07:00
@HofiOne

HofiOne commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

@wwdenw i see the following commit captions and descriptions

image

the problem is, that the content of multiple commits is absolutely unrelated, the commit content do not match the descriptions, also multiple commits contain unrelated changes

please review and correct the commits again, thank you

nbsd added 2 commits July 24, 2026 07:42
The previous implementation allowed an attacker to distinguish between
the pseudo-random function (PRF) and a real random function by supplying
specially crafted inputs to it. This leads to a predictable way of how
the PRF is generating output which should not by allowed by a good PRF.
The new implementation provides a variable input length and
constant output length PRF based on AES CMAC for key derivation using
the current key Ki, i.e. a key expansion of Ki using multiple iterations
is performed. Subsequently, with Ki as the key used in the PRF, the
input is defined as

(i || label || 0x00 || context || L)

with i as the number of the current iteration, L as the total length of
the requested output, label and context for parametrization of the PRF
output based on the intended purpose. See NIST reports SP-800-56cr2 and
SP.800-108r1 for more information on key derivation schemes with a PRF.

In the previous implementation, the input length was fixed
at 16 bytes regardless of the actual length of the input data.
This is also fixed in the new implementation.

Minor changes:
    - verification MAC fix
    - error logging macros
    - clean-up
    - file handling (DRY)
    - return values
    - source code formatting
    - use of GLib types

Provide also a --logmode|-l (direct|base64|enc) for secure logging
syslog-ng.conf template and cli tools.

Signed-off-by: Airbus Commercial Aircraft <secure-logging@airbus.com>
Cleanup history for PR

Signed-off-by: Airbus Commercial Aircraft <secure-logging@airbus.com>
@wwdenw
wwdenw force-pushed the slog-plain-base64 branch from 1bf082e to 7067ee0 Compare July 24, 2026 06:41
@HofiOne
HofiOne marked this pull request as draft July 28, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants