Public key for testnet address I'm trying to create a transaction on the testnet (manually). I have the following private key: cQKqSNkEdyLJziQSr4iKTUJC95s9HHFo4bY88gi2i6v2quiVVLZb which belongs to the following public address: mkhn3gfrGHmd4b1ZmHLdMsbQd2eHRKg8wN. When I try to sign the transaction, the public (uncompressed) key that I generate, is: 042d7331345e0da6ab1125eb39488a542a9923f31c585c20114d211a9f6bc9f3bf55d1d843cb7cf1d36b32d1cb00d2f140ef028e726a19a766f6ca7cef7b956583. This turns out to be invalid (because the transaction gets rejected by the network). However, when I tried using a tool for signing the transaction, it generated the following (correct) public key: 040b4a4274222d7239d33c17ce39d753eee97103773b7e5a89e62f0ef0121032d7331345e0da6ab1125eb39488a542a9923f31c585c20114d211a9f6bc9f3b.

What is the difference between these keys? How come the first one is incorrect when signing the tx but correct when I generated the public address for it?
Some observations: the priv key matches with the first compressed address (mkhn3...). It fits to the pubkey in hex, see below. 
The way keys are derived is described here - see also the picture.
http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html



Once you have the pubkey in hex, there are 8 following steps to come to the final bitcoin address:

1 - Public ECDSA Key
2 - SHA-256 hash of 1
3 - RIPEMD-160 Hash of 2
4 - Adding network bytes to 3
5 - SHA-256 hash of 4
6 - SHA-256 hash of 5
7 - First four bytes of 6
8 - Adding 7 at the end of 4
9 - Base58 encoding of 8


The first uncompressed pubkey (which fits to the privkey):


  042d7331345e0da6ab1125eb39488a542a9923f31c585c20114d211a9f6bc9f3bf55d1d843cb7cf1d36b32d1cb00d2f140ef028e726a19a766f6ca7cef7b956583


would convert into this bitcoin address: 

myfp2YcyYjksxmdfA74yEuBmaUgt9xWCot


and your second uncompressed pubkey


  040b4a4274222d7239d33c17ce39d753eee97103773b7e5a89e62f0ef0121032d7331345e0da6ab1125eb39488a542a9923f31c585c20114d211a9f6bc9f3b


would convert to this bitcoin address:

mmKUwoRgd9YdvRYYXGyumjduRMTAPCnkMz


I am not sure which tools you used to create your keys, it looks like you have somewhere a gap between using compressed and uncompressed keys. 
A very good reference is in the online book from Andreas ("Mastering Bitcoin, 2nd edition"), which is also online readable (see chapter 4...).