58 mgf1_mask(*m_sha_x_full, mgf1_input.data(), mgf1_input.size(), digest.data(), digest.size());
66 m_padded_pub_seed_256 = std::vector<uint8_t>(64,
'\0');
68 std::copy(pub_seed.begin(), pub_seed.end(), m_padded_pub_seed_256.begin());
70 if(sphincs_params.
n() == 16) {
71 m_sha_x = std::make_unique<Truncated_Hash>(std::make_unique<SHA_256>(), sphincs_params.
n() * 8);
72 m_sha_x_full = std::make_unique<SHA_256>();
73 m_padded_pub_seed_x = m_padded_pub_seed_256;
76 m_sha_x = std::make_unique<Truncated_Hash>(std::make_unique<SHA_512>(), sphincs_params.
n() * 8);
77 m_sha_x_full = std::make_unique<SHA_512>();
79 m_padded_pub_seed_x = std::vector<uint8_t>(128,
'\0');
81 std::copy(pub_seed.begin(), pub_seed.end(), m_padded_pub_seed_x.begin());
84 if(m_sphincs_params.
n() < 32) {
85 m_sha_256 = std::make_unique<Truncated_Hash>(std::make_unique<SHA_256>(), m_sphincs_params.
n() * 8);
87 m_sha_256 = std::make_unique<SHA_256>();