I'm using the monero cli and was wondering what is the difference from the spendkey and the view key. They both output a secret and public key. Do you give the public view and spend key to the person that is paying you?


2 Answers 2


Do you give the public view and spend key to the person that is paying you?

Yes. Both are conveniently packed inside your address. Think of them as "instruction to sender".

I'm using the monero cli and was wondering what is the difference from the spendkey and the view key.

Here's a quick overview of what each key is used for.

The sender reads the public spend key and public view key from your address, and uses them to construct a special one-time "container" which will hold the funds intended for you.

On the receiving end you check each TX against your secret view key (technically, you also need the public spend key) and when there's a match, your wallet takes note of that, adds it to the balance and saves the details into wallet cache.

When you want to spend, your wallet uses both the secret view key and secret spend key to reconstruct a key to the particular "container", and a key image of the container. With that you can spend, or just check if it was spent.

  • why can't you just give the sender just the public view key only? Sep 21, 2017 at 2:15
  • 1
    Because it's not enough. Each output is constructed as P = H(rA)G + B, where A is the public viewkey, B the public spend key and r the TX secret key (generated by the sender). Think of public spend key as instruction to make a lock, and public view key as instruction to mix invisible paint which will mark the lock so recipient can find it in the pile using his special lens (secret view key) :)
    – JollyMort
    Sep 21, 2017 at 9:27
  • Very nice overview @JollyMort! Sep 21, 2017 at 14:00
  • so i have to give my secret view key (private view key) to the user so he can see the invisible paint on this lock (public address)? Sep 21, 2017 at 15:36
  • Well, if you want to show someone which locks are yours, you'd give him the view key. Otherwise, nobody can tell which lock belongs to which wallet. Funds don't sit on addresses but on one-time keys. Maybe this simplified description would help: monero.stackexchange.com/questions/3214/…
    – JollyMort
    Sep 21, 2017 at 18:14

The view key is used to view incoming outputs, and the spend key is used to spend them. Your monero address is composed of (mostly) your public spend and view keys together.

The public/secret pairs are a feature of asymmetric cryptography (also called public key cryptography), as opposed to symmetric cryptography (such as block cyphers).

  • so u need the private view key to see when someone is sending you coins? and spend key is just to spend coins? and the pub keys of both are used to generate your monero address? so what happens if u give ur pub view key or pub spend key to someone? Sep 20, 2017 at 21:53
  • 1
    Yes. Giving your public keys to someone is akin to giving your public address. Sending your monero requires both your public view key and public spend key, and giving your address gives both.
    – user36303
    Sep 20, 2017 at 21:55
  • so giving my monero address they can find out my pub view and spend key? why not just give your pub view or spend key to someone instead or do u have to use both and compute an address? Sep 20, 2017 at 22:28
  • 1
    Sender needs both to make a TX for you. Address is just a convenient way to pack them together and avoid errors.
    – JollyMort
    Sep 20, 2017 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.