33 lines
885 B
C++
33 lines
885 B
C++
|
|
/// @file dpf/iknp_graphs.hpp
|
||
|
|
/// @brief IKNP setup as `schedule_round` lists (pulls Asio; keep out of app_plans).
|
||
|
|
#ifndef LIBDPF_INCLUDE_DPF_IKNP_GRAPHS_HPP__
|
||
|
|
#define LIBDPF_INCLUDE_DPF_IKNP_GRAPHS_HPP__
|
||
|
|
|
||
|
|
#include <cstddef>
|
||
|
|
#include <cstdint>
|
||
|
|
#include <memory>
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
#include "dpf/iknp.hpp"
|
||
|
|
#include "dpf/pad_graphs.hpp"
|
||
|
|
#include "dpf/protocol.hpp"
|
||
|
|
|
||
|
|
namespace dpf
|
||
|
|
{
|
||
|
|
namespace protocol
|
||
|
|
{
|
||
|
|
|
||
|
|
/// @brief IKNP `sample` wire frames as schedule rounds (count from setup_rounds).
|
||
|
|
inline std::vector<schedule_round> iknp_setup_graph(std::size_t nblock,
|
||
|
|
std::size_t nbit, std::size_t nb2a, std::size_t ncw,
|
||
|
|
const std::shared_ptr<std::vector<std::uint8_t>> & tape)
|
||
|
|
{
|
||
|
|
return make_pad_rounds(iknp::setup_rounds(nblock, nbit, nb2a, ncw), 16, tape,
|
||
|
|
edge_channel::peer);
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace protocol
|
||
|
|
} // namespace dpf
|
||
|
|
|
||
|
|
#endif // LIBDPF_INCLUDE_DPF_IKNP_GRAPHS_HPP__
|