creating public keys - xx10t4/ GitHub Wiki

Publishing a public key ("Add Account" in iotalk UI) consists of:

  1. generate an NTRU public/private keypair
  2. create an 81 tryte hash of the public key. This will be the Tangle address where the public key will be published.
  3. create a transaction bundle with the tryte encoded public key as the message, published at the transaction address. To aid in searching, the first 27 trytes of the address are used as the transaction tag.

Because the Tangle address where the key lives is a hash of the key itself, the address serves as a fingerprint to verify the key - anyone downloading the public key can verify it is the one valid key that can exist at that address by running the same hash algorithm (standard IOTA ccurl).

The owner of a public key can publicize the address so others can use it to create encrypted messagess to the owner. Because the transaction is tagged with the first 27 trytes, they only really need to use those first 27 trytes.