<p>Exactly the same way, except instead of putting the compressed public key in the redeeming script, you use the compressed one. Decompressing it won't work, as that would change its hash (the address).</p>

CC BY-SA 3.0
2014-02-02T17:40:46.013Z
Thank you very much. It really works either with compressed keys :) Now I have to sign several inputs and send them to one output. Unfortunately I can not understand how should I change this algorythm - seems to me that I should create several "simplified transactions" with one input and one output, sign them, and after that combine them into one final transaction. I've asked for a help also here: https://bitcointalk.org/index.php?topic=422021.msg4893746#msg4893746
amaclin
CC BY-SA 3.0
2014-02-02T21:12:22.773Z
Thank you again. The question is solved. I was able to manually sign two inputs for one output. On testnet of course. http://blockexplorer.com/testnet/tx/c693cccc8f54ec67ff7a1eddf7cb602584e8b20c73be37b025e71b273e8c4adb#i8282342 This one uses uncompressed public keys, but there is no difference
amaclin
CC BY-SA 3.0
2014-02-02T16:10:22.020Z
2014-02-02T16:10:22.020Z
Pieter Wuille
<p>There is very good answer here: <a href="https://bitcoin.stackexchange.com/questions/3374/how-to-redeem-a-basic-tx">How to redeem a basic Tx?</a> 
It works great.</p>

<p>But the algorithm is only for uncompressed addresses/keys, how can I change it to deal with compressed ones?</p>

<p>And the second question - how should I change the procedure to redeem several inputs?</p>

CC BY-SA 3.0
2014-02-02T09:03:09.907Z
Uncompress it? I can't think of why anyone would use lossy compression.
John T
CC BY-SA 3.0
2014-02-02T14:35:26.107Z
I think it should be a compressed key you want to redeem, not an address. Edited accordingly, please check if I got it right.
Murch
CC BY-SA 3.0
2014-02-02T18:54:20.243Z
Sorry for my poor English. Of course I want to redeem the output to my address taken of compressed-form public-key. This part of question is solved. Now thinking how to put several inputs in one transaction
amaclin
<import>
How do you redeem a compressed key?
amaclin
# How do you redeem a compressed key?

(Asked by: username_0 on 2014-02-01)

There is very good answer here: [How to redeem a basic Tx?](https://bitcoin.stackexchange.com/questions/3374/how-to-redeem-a-basic-tx)
It works great.

But the algorithm is only for uncompressed addresses/keys, how can I change it to deal with compressed ones?

And the second question - how should I change the procedure to redeem several inputs?

**Tags:** import

> **Comments:**
> **username_1**: Uncompress it? I can't think of why anyone would use lossy compression.  
> **username_2**: I think it should be a compressed key you want to redeem, not an address. Edited accordingly, please check if I got it right.  
> **username_0**: Sorry for my poor English. Of course I want to redeem the output to my address taken of compressed-form public-key. This part of question is solved. Now thinking how to put several inputs in one transaction  

---

## 1 answers

### Answer by username_3 on 2014-02-02. Score: 0 | Accepted answer

Exactly the same way, except instead of putting the compressed public key in the redeeming script, you use the compressed one. Decompressing it won't work, as that would change its hash (the address).

> **Comments:**
> **username_0**: Thank you very much. It really works either with compressed keys :) Now I have to sign several inputs and send them to one output. Unfortunately I can not understand how should I change this algorythm - seems to me that I should create several "simplified transactions" with one input and one output, sign them, and after that combine them into one final transaction. I've asked for a help also here: https://bitcointalk.org/index.php?topic=422021.msg4893746#msg4893746  
> **username_0**: Thank you again. The question is solved. I was able to manually sign two inputs for one output. On testnet of course. http://blockexplorer.com/testnet/tx/c693cccc8f54ec67ff7a1eddf7cb602584e8b20c73be37b025e71b273e8c4adb#i8282342 This one uses uncompressed public keys, but there is no difference  

---

