|
PACS System 0.1.0
PACS DICOM system library
|
At-rest encryption for ATNA audit log records (ISO 27799 compliance) More...
#include "kcenon/pacs/core/result.h"#include <array>#include <cstddef>#include <cstdint>#include <mutex>#include <string>#include <unordered_map>#include <vector>

Go to the source code of this file.
Classes | |
| struct | kcenon::pacs::security::audit_cipher_key |
| A versioned symmetric key pair (data encryption + MAC) More... | |
| class | kcenon::pacs::security::audit_key_manager |
| Holds the active encryption key and any retired keys for decryption of historical records. More... | |
| class | kcenon::pacs::security::audit_log_cipher |
| Encrypts and decrypts single audit log records. More... | |
Namespaces | |
| namespace | kcenon |
| namespace | kcenon::pacs |
| namespace | kcenon::pacs::security |
| namespace | kcenon::pacs::security::detail |
Functions | |
| std::string | kcenon::pacs::security::detail::base64_encode (const std::uint8_t *data, std::size_t size) |
| Standard base64 encode (no line breaks) | |
| bool | kcenon::pacs::security::detail::base64_decode (const std::string &in, std::vector< std::uint8_t > &out) |
| Standard base64 decode; returns false on malformed input. | |
| bool | kcenon::pacs::security::detail::hex_decode (const std::string &in, std::uint8_t *out, std::size_t out_size) |
| Hex decode (lowercase or uppercase); returns false on malformed input. | |
| bool | kcenon::pacs::security::detail::constant_time_equal (const std::uint8_t *a, const std::uint8_t *b, std::size_t n) noexcept |
| Constant-time equality on byte buffers of equal length. | |
Variables | |
| constexpr const char * | kcenon::pacs::security::audit_cipher_format_tag = "PACSAUDIT" |
| Format version string embedded in every encrypted record. | |
| constexpr const char * | kcenon::pacs::security::audit_cipher_format_version = "v1" |
| constexpr std::size_t | kcenon::pacs::security::audit_cipher_key_bytes = 32 |
| AES-256 key length in bytes. | |
| constexpr std::size_t | kcenon::pacs::security::audit_cipher_mac_key_bytes = 32 |
| HMAC-SHA256 key length in bytes (equal to block size for full strength) | |
| constexpr std::size_t | kcenon::pacs::security::audit_cipher_iv_bytes = 12 |
| GCM IV length in bytes (NIST SP 800-38D recommended 96 bits) | |
| constexpr std::size_t | kcenon::pacs::security::audit_cipher_tag_bytes = 16 |
| GCM authentication tag length in bytes. | |
At-rest encryption for ATNA audit log records (ISO 27799 compliance)
Provides AES-256-GCM authenticated encryption with HMAC-SHA256 integrity signing for audit log records. Supports key rotation by embedding a key identifier in every record so that historical records remain decryptable after rotation.
Record format (ASCII, single line, terminated by '
'):
* PACSAUDIT|v1|<key_id>|<iv_b64>|<ciphertext_b64>|<tag_b64>|<hmac_b64> *
Where:
Definition in file audit_log_cipher.h.