<p>There is now a getAccountPublicKey API request. But as you indicated, the public key is shown prominently in the NXT reference client (NRS version 1.3.2 currently) when an account is first opened with a secret passphrase. </p>

<p>This public key can be used along with the account ID (which is derived from the public key) to fund the new account from another account, thus securing the new account by adding the public key to the blockchain. If a different secret passphrase were then to be used which results in the same account ID (such a collision being a distinct possibility), it could not open the account since its corresponding public key would be different from the one already stored in the blockchain.</p>

<p>The public key will no longer be displayed prominently in the NXT client, but it still can be viewed by sending a transaction, then clicking on the timestamp of the transaction as displayed in the client, then clicking on "Transaction Details". The first field in the pop-up window is "Sender Public Key".</p>

<p>If you are interested in the algorithm for computing the public key from the secret passphrase, refering to the <a href="https://wiki.nxtcrypto.org/wiki/Whitepaper:Nxt#Accounts" rel="noreferrer">Whitepaper:Nxt</a>:</p>

<ol>
<li>The secret passphrase is hashed with SHA256 to derive the account's
private key. </li>
<li>The private key is encrypted with Curve25519 to derive
the account's public key.</li>
</ol>

CC BY-SA 3.0
2014-11-04T15:46:03.620Z
2014-11-05T12:56:36.830Z
2014-11-05T12:56:36.830Z
mystcoin
<p>There doesnt seem to be an API call that returns the public key for my NXT account (with which I have not sent out any coins yet).</p>

<p>The NXT wallet does display the public key after I log in, but how do I calculate this public key programmatically?</p>

<wallet><public-key><nxt>
How to generate the public Nextcoin key (NXT)?
KKK
# How to generate the public Nextcoin key (NXT)?

(Asked by: username_0 on 2014-09-08)

There doesnt seem to be an API call that returns the public key for my NXT account (with which I have not sent out any coins yet).

The NXT wallet does display the public key after I log in, but how do I calculate this public key programmatically?

**Tags:** wallet, public-key, nxt


---

## 1 answers

### Answer by username_1 on 2014-11-04. Score: 5

There is now a getAccountPublicKey API request. But as you indicated, the public key is shown prominently in the NXT reference client (NRS version 1.3.2 currently) when an account is first opened with a secret passphrase.

This public key can be used along with the account ID (which is derived from the public key) to fund the new account from another account, thus securing the new account by adding the public key to the blockchain. If a different secret passphrase were then to be used which results in the same account ID (such a collision being a distinct possibility), it could not open the account since its corresponding public key would be different from the one already stored in the blockchain.

The public key will no longer be displayed prominently in the NXT client, but it still can be viewed by sending a transaction, then clicking on the timestamp of the transaction as displayed in the client, then clicking on "Transaction Details". The first field in the pop-up window is "Sender Public Key".

If you are interested in the algorithm for computing the public key from the secret passphrase, refering to the [Whitepaper:Nxt](https://wiki.nxtcrypto.org/wiki/Whitepaper:Nxt#Accounts):

1. The secret passphrase is hashed with SHA256 to derive the account's
   private key.
2. The private key is encrypted with Curve25519 to derive
   the account's public key.


---

