theQRL / qrllib

QRL core library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect value by Dilithium extract_message & extract_signature

cyyber opened this issue · comments

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);
}