# What is the type output of a template attack?

According to viewtopic.php?f=6&t=331 The output from a template attack appears like this: (an example)

```[219 145 181 134 127] [ 37 43 76 123 235] [32 44 45 77 43] [199 45 44 77 43] [139 37 42 77 43] [45 77 37 42 43] [235 37 45 42 43] [ 37 77 139 235 43]```

My questions are:

1/ Does this results present the top 5 guesses of each byte ?
2/ If yes what is the difference between finding the top 5 guesses of each byte and the top 5 guesses of each hamming weight of each guesses byte?
3/ Let’s suppose that the best guesses byte or hamming weight appears many times in the beginning of the results, than it disappears, could I consider It as a good result?

I would be very grateful if you could answer me. Thanks in advance.

1. Yes, this represents the top guesses for each byte. The values on the right are the best matches.
2. I’m not sure I understand what you’re asking. Our attack tries to estimate the Hamming weight of an intermediate value for each trace. What this means is that we can’t narrow down the key to one possibility after a single trace. With one Hamming weight guess, we might have 70 key guesses that we can’t tell apart. However, every new trace that we capture helps us narrow this down, so after a number of traces we’re left with 1 guess.
3. This doesn’t sound like a good guess. If you’ve really broken the key, then the attack will tell you that one key is very likely, and the probabilities of the other keys are all headed towards 0%. Seeing the correct key only for a while at the start sounds like a fluke.

Thank you very much for your answers, I need just to clarify my second question:
The output of the template attack is the top guesses for each byte:

```[219 145 181 134 127] [ 37 43 76 123 235] [32 44 45 77 43] [199 45 44 77 43] ```

Let’s suppose that the output of my template attack is a set of hamming of those top guesses for each byte, foe example, the result is:

```[5 5 3 2 1] [ 2 4 2 5 3] [1 0 2 1 0] [ 5 1 3 1 3] ```

By that way I will have the best guesses Hamming weight for each byte, What do you think ?

I’m not sure that I understand - you could definitely output the Hamming weight of your top guesses, but I don’t know what that does for your attack.