# Quiz 19

#### Let's apply what you have learned so far to a specific scenario. Choose the most correct response (choose ALL that apply).

Alice is using ECDSA to sign a message for Bob. She accidentally reuses the same ephemeral key (k) for two different messages. What is the most likely consequence of this mistake, and how should Alice prevent it in the future?

* [x] Reusing the same ephemeral key allows an attacker to calculate Alice's private key, compromising her security.
* [x] Alice should ensure that a fresh, random ephemeral key is generated for each signature to prevent this vulnerability.
* [ ] Reusing the same ephemeral key only affects the efficiency of the signature process, not its security.
* [ ] Alice should use the same ephemeral key for all messages to ensure consistency in her signatures.

**Note to Learners**

Reusing the same ephemeral key (k) in ECDSA compromises the security of the private key. This is because the mathematical relationship between the reused k and the two signatures can be exploited to calculate the private key. To prevent this, Alice must ensure that a fresh, random ephemeral key is generated for each signature. Alternatively, she can use deterministic ephemeral keys derived from the private key and message using HMAC, as specified in RFC 6979.

&#x20;

To learn more about it, you can follow the course [Elliptic Curve Digital Signature Algorithm (ECDSA)](https://bsvblockchain.360learning.com/course/play/68dcfb7db22b823a03f88909)


---

# 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-digital-signatures/quiz/quiz-19.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.
