summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-08-15 22:53:28 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-16 16:35:23 +0200
commit67b24cb3a68c528c530887059955d0d706a8aa63 (patch)
tree711dd4c2ae1f0410bd911f7d3b31c21c9cf6789f
parentd33e3b7d8a7a3bab7948c50974475dd85ffcff3b (diff)
downloadserenity-67b24cb3a68c528c530887059955d0d706a8aa63.zip
LibCrypto: Document word order (endianness) of bigint
-rw-r--r--Libraries/LibCrypto/BigInt/UnsignedBigInteger.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h b/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h
index 752343f4fb..86789422f8 100644
--- a/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h
+++ b/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h
@@ -114,6 +114,8 @@ private:
ALWAYS_INLINE static u32 shift_left_get_one_word(const UnsignedBigInteger& number, size_t num_bits, size_t result_word_index);
static constexpr size_t BITS_IN_WORD = 32;
+ // Little endian
+ // m_word[0] + m_word[1] * 256 + m_word[2] * 65536 + ...
AK::Vector<u32, STARTING_WORD_SIZE> m_words;
// Used to indicate a negative result, or a result of an invalid operation