Open
Conversation
fixed test serialized data size
| const NativeVector::Integer& modulus){ | ||
| this->SetModulus(modulus); | ||
|
|
||
| if (size != 65536) |
There was a problem hiding this comment.
This is OK for us, but not to push on any main branch...
nathaniela-cr
requested changes
Feb 15, 2026
| const NativeVector::Integer& modulus){ | ||
| this->SetModulus(modulus); | ||
|
|
||
| if (size != 65536) |
There was a problem hiding this comment.
use constexpr
Suggested change
| if (size != 65536) | |
| if (size != CR_VECTOR_SIZE) |
| NativeVector v(size, this->m_modulus); | ||
| std::uniform_int_distribution<uint32_t> dist(DUG_CHUNK_MIN, DUG_CHUNK_MAX); | ||
|
|
||
| for (uint16_t seg_i = 0; seg_i < 2048; ++seg_i) { |
| std::unique_ptr<PRNG> shake128engine = std::make_unique<Shake128Engine>(m_seed, m_salt, modulus.ConvertToInt(), seg_i); | ||
|
|
||
| size_t valid_words_idx = 0; | ||
| uint32_t n_q = (static_cast<uint32_t>((1ULL << 32) / modulus.ConvertToInt())) * modulus.ConvertToInt(); |
There was a problem hiding this comment.
why does everything need to be converted to native int?
| initKey[1] = static_cast<uint32_t>(std::hash<std::thread::id>{}(std::this_thread::get_id())); | ||
|
|
||
| // Heap address entropy | ||
| void* mem = malloc(1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.