diff --git a/Userland/Libraries/LibCrypto/Curves/SECPxxxr1.h b/Userland/Libraries/LibCrypto/Curves/SECPxxxr1.h index 3c6a2123fa..19936e0bea 100644 --- a/Userland/Libraries/LibCrypto/Curves/SECPxxxr1.h +++ b/Userland/Libraries/LibCrypto/Curves/SECPxxxr1.h @@ -196,8 +196,11 @@ public: } // z is the hash - AK::FixedMemoryStream hash_stream { hash }; - StorageType z = TRY(hash_stream.read_value>()); + StorageType z = 0u; + for (uint8_t byte : hash) { + z <<= 8; + z |= byte; + } AK::FixedMemoryStream pubkey_stream { pubkey }; JacobianPoint pubkey_point = TRY(read_uncompressed_point(pubkey_stream));