57 mgf1_mask(*m_sha_x_full, mgf1_input.data(), mgf1_input.size(), digest.data(), digest.size());
65 m_padded_pub_seed_256 = std::vector<uint8_t>(64,
'\0');
67 std::copy(pub_seed.begin(), pub_seed.end(), m_padded_pub_seed_256.begin());
69 if(sphincs_params.
n() == 16) {
70 m_sha_x = std::make_unique<Truncated_Hash>(std::make_unique<SHA_256>(), sphincs_params.
n() * 8);
71 m_sha_x_full = std::make_unique<SHA_256>();
72 m_padded_pub_seed_x = m_padded_pub_seed_256;
75 m_sha_x = std::make_unique<Truncated_Hash>(std::make_unique<SHA_512>(), sphincs_params.
n() * 8);
76 m_sha_x_full = std::make_unique<SHA_512>();
78 m_padded_pub_seed_x = std::vector<uint8_t>(128,
'\0');
80 std::copy(pub_seed.begin(), pub_seed.end(), m_padded_pub_seed_x.begin());
83 if(m_sphincs_params.
n() < 32) {
84 m_sha_256 = std::make_unique<Truncated_Hash>(std::make_unique<SHA_256>(), m_sphincs_params.
n() * 8);
86 m_sha_256 = std::make_unique<SHA_256>();