Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect value by Dilithium extract_message & extract_signature #179

Open
cyyber opened this issue Jul 9, 2022 · 0 comments
Open

Incorrect value by Dilithium extract_message & extract_signature #179

cyyber opened this issue Jul 9, 2022 · 0 comments
Assignees

Comments

@cyyber
Copy link
Member

cyyber commented Jul 9, 2022

extract_message & extract_signature functions doesn't work as expected and returns incorrect value.

extract_message should be replaced to

std::vector<uint8_t> Dilithium::extract_message(std::vector<uint8_t> &message_output)
{
    return std::vector<uint8_t>(message_output.begin() + CRYPTO_BYTES, message_output.end());
}

extract_signature should be replaced to

std::vector<uint8_t> Dilithium::extract_signature(std::vector<uint8_t> &message_output)
{
    return std::vector<uint8_t>(message_output.begin(), message_output.begin() + CRYPTO_BYTES);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant