# Quiz 46

**Let's apply what you have learned so far to a specific scenario. Choose the correct response.**

You are implementing the RIPEMD-160 hash function in GoLang. You receive an input message of 300 bytes. How do you ensure the message block is correctly padded to meet the 448 congruent to 512 bits requirement?

**Type all answers and select the correct one**

* [x] Add a single '1' bit to the end of the message, followed by enough '0' bits to make the total length 448 bits modulo 512, then append the 64-bit representation of the message length in Little-Endian format.
* [ ] Add a single '1' bit to the end of the message, followed by enough '0' bits to make the total length 512 bits, then append the 64-bit representation of the message length in Big-Endian format.
* [ ] Add a single '1' bit to the end of the message, followed by enough '0' bits to make the total length 448 bits modulo 512, then append the 64-bit representation of the message length in Big-Endian format.
* [ ] Add a single '1' bit to the end of the message, followed by enough '0' bits to make the total length 512 bits, then append the 64-bit representation of the message length in Little-Endian format.

**Note to Learners**

To correctly pad the message block for RIPEMD-160, you must first add a single '1' bit to the end of the message. Then, add enough '0' bits to make the total length 448 bits modulo 512. Finally, append the 64-bit representation of the original message length in Little-Endian format. This ensures the message block meets the required bit length for processing.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hub.bsvblockchain.org/higher-learning/bsv-academy/bitcoin-primitives-hash-functions/quiz-bitcoin-hash-functions/quiz-46.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
