//  SPDX-License-Identifier: AGPL-3.0-only
//
//  Copyright (C) 2020 - 2023  OpenVPN Inc <sales@openvpn.net>
//  Copyright (C) 2020 - 2023  Lev Stipakov <lev@openvpn.net>

syntax = "proto2";

package openvpn;

message DcoKeyConfig {
    required int32 key_id = 1;
    required int32 remote_peer_id = 2;
    required uint32 cipher_alg = 3;

    message KeyDirection {
        required bytes cipher_key = 1;
        optional bytes hmac_key = 2;
        optional bytes nonce_tail = 3;
        required uint32 cipher_key_size = 4;
    }

    required KeyDirection encrypt = 4;
    required KeyDirection decrypt = 5;
}