Skip to content

auth/auth_keys.hpp

Namespaces

Name
rlpx
rlpx::auth

Classes

Name
struct rlpx::auth::AuthKeyMaterial
struct rlpx::auth::FrameSecrets

Source code

// Copyright 2025 GeniusVentures
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "../rlpx_types.hpp"

namespace rlpx::auth {

// Authentication key material generated during handshake
struct AuthKeyMaterial {
    PublicKey peer_public_key;
    PublicKey peer_ephemeral_public_key;
    PublicKey local_ephemeral_public_key;
    PrivateKey local_ephemeral_private_key;
    Nonce initiator_nonce;
    Nonce recipient_nonce;
    ByteBuffer initiator_auth_message;
    ByteBuffer recipient_ack_message;
};

// Derived frame encryption secrets
struct FrameSecrets {
    AesKey     aes_secret;
    MacKey     mac_secret;
    ByteBuffer egress_mac_seed;   
    ByteBuffer ingress_mac_seed;  
};

} // namespace rlpx::auth

Updated on 2026-04-13 at 23:22:46 -0700