Need help solving a puzzle (from a layperson) [closed]

As the title says, I'm a layperson when it comes to cryptography, so my question may not make absolute sense. Apologies in advance if this is vague.

Here is the puzzle I'm presented with:

You were smart to look here.

Can you take on the next step?

ecdsa-sha2-nistp256

AAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOKGEKYjpEGmRrtoGdf79CJljyk1y/GbMFCXt9AoKnk5Lw9r5Snv63xYZ5WLBNkozVe4sNLXIaUGti/pMOy4akk=

From this point, three "hints" were provided:

1) Run the ecdsa public key trough a base64 decoder.

When running the public key through various online base64 decoders, the result has been varied on each site. I get everything from Korean characters to random box characters. So I'm somewhat stuck at hint 1.

2) Open the base64 decoded value in hex editor.

3) Public key should be a 65-byte array, starting from byte with value 4, next 32 bytes would be x value, and the next 32 the y value.

A final clue is this: "First have the name of the digital signature algorithm, then the name of the curve, and then the public component of the key. Got it?"

Can anyone here make sense of all of this? Thanks in advance for any help. I'm happy to answer any questions that could help you in solving this.

• I've voted to close this question. I don't think it is a good fit for the puzzling page as this is more about understanding encoding than anything else. I'm glad you've received a good answer, but the question itself is just to vague and I'm not sure if it can be rescued as it is just too specific (otherwise: how is a SSH public key encoded could be used, or something similar - hint). – Maarten Bodewes Dec 29 '17 at 19:40

The hints provide a lot of information about the puzzle.

1) Run the ecdsa public key trough a base64 decoder.

When running the public key through various online base64 decoders, the result has been varied on each site. I get everything from Korean characters to random box characters. So I'm somewhat stuck at hint 1.

2) Open the base64 decoded value in hex editor.

Base64 encoded data is not necessarily text (ASCII, UTF-8 or otherwise). The easiest thing to do is to decode this into standard hexadecimal bytes. So converting the Base64 string to a Hexadecimal string results in

000004d958d91cd84b5cda184c8b5b9a5cdd1c0c8d4d800000021b9a5cdd1c0c8d4d800000104138a1842988e9106991aeda0675fefd089963ca4d72fc66cc1425edf40a0a9e4e4bc3daf94a7bfadf1619e562c1364a3355ee2c34b5c86941ad8bfa4c3b2e1a9240


3) Public key should be a 65-byte array, starting from byte with value 4, next 32 bytes would be x value, and the next 32 the y value.

This hint is telling us to extract the public key. The data provided is 104 bytes in length but the public key is only 65 bytes. It begins with a 04 byte (that's what "byte with value 4" means), so we look for that pattern in the data.

There are two such places where there is a 04 byte, so let's start with the first one.

If we assume the first 04 that we see corresponds to the public key, then our public key will be:

04d958d91cd84b5cda184c8b5b9a5cdd1c0c8d4d800000021b9a5cdd1c0c8d4d800000104138a1842988e9106991aeda0675fefd089963ca4d72fc66cc1425edf


If we assume the second 04 that we see corresponds to the public key, the the public key will be:

04138a1842988e9106991aeda0675fefd089963ca4d72fc66cc1425edf40a0a9e4e4bc3daf94a7bfadf1619e562c1364a3355ee2c34b5c86941ad8bfa4c3b


A final clue is this: "First have the name of the digital signature algorithm, then the name of the curve, and then the public component of the key. Got it?"

This clue refers to this string:

ecdsa-sha2-nistp256

ecdsa stands for Elliptic Curve Digital Signature Algorithm. This indicates the digital signature algorithm that was used.

sha2 indicates that a function in the SHA-2 hash function family was used for signing the message. When signing a message with ECDSA, the message must be hashed with some hash, commonly SHA-256. I will assume this means to use SHA-256.

nistp256 refers to the elliptic curve that was used in ECDSA. It provides us with the other parameters that we need to compute and verify an ECDSA signature.

That is all of the information that can be gotten quickly from the provided hints and initial information. You will have to look through the remaining 39 bytes of data to solve the rest of the puzzle.

Further examination of this shows that it is an SSH public key.