From CloakCoin Wiki
Jump to: navigation, search
Other languages:
English • ‎Tiếng Việt • ‎Türkçe • ‎español • ‎português • ‎中文(中国大陆)‎
The Enigma Logo 2017

The inspiration for the name comes from the meaning of the original greek word – riddle, puzzle, mystery – and describes Cloakcoin’s Enigma: private, secure, untraceable and decentralized transactions.

Enigma in cooperation with Cloakshield makes it impossible for any outside observers to trace payments done with CLOAKCOIN.

Enigma - Transaction Process

When a node sends funds via Enigma to an stealth address, the following happens:

  1. Sender generates inputs to cover amount sent, enigma reward (sent * (.2-1)%) and network fee (unknown at present, so ample reserved).
  2. Sender generates a CloakingRequest object (containing unique stealth nonce for this request).
  3. Sender generates 2 or 3 one-time stealth payment addresses using the recipients stealth address and splits the sent amount randomly between the addresses.
  4. Sender onion routes CloakRequest to network. The request contains the 'send amount' so that Cloakers know how much to reserve.
  5. Cloaker picks up CloakRequest and decides to participate.
  6. Cloaker supplies X inputs to sender and a stealth address and stealth hash (for their change).
  7. Cloaker sends CloakingAcceptResponse to Sender. This contains stealth address, stealth nonce and TX inputs.
  8. Sender waits until enough Cloakers have accepted.
  9. Sender creates Enigma transaction using own inputs and Cloaker inputs. Inputs are shuffled.
  10. Sender creates TX ouputs for all Cloakers. The outputs randomly split their change and return it to them. This also allocates the cloaking reward to Cloakers.
  11. Sender creates their own change returns for the Enigma TX. These are one-time stealth payment addresses.
  12. The Sender calculates the network TX fee and subtracts this from their own change return.
  13. The Sender sends the Enigma TX to the Cloakers for signing.
  14. Cloakers check the TX to ensure their inputs are present and correct and that there are one-time payment addresses linked to one of thier stealth addresses with payment that exceeds the input amount.
  15. Cloakers sign or reject the TX and send signatures to Sender.
  16. Sender collates the signatures and transmits the finalized, signed TX to the network.
  17. Nodes scan incoming transactions for stealth payments and Enigma payments and detect any payments or change. Keypairs and addresses are generated for any matching payments and generated keys/addresses are saved to the local wallet.

How are stealth and Enigma transactions detected/received?

  • All incoming transactions are scanned. Stealth transactions are scanned for first (using the default ephemeral pubkey contained in a random OP_RETURN TX output). After this, Enigma transactions are then scanned for. Enigma transactions also use the standard ephemeral pubkey, but payments use an additional step involving a further derived key. Enigma outputs are generated using a hash of the ephemeral pubkey, a private stealth address hash and the output index.

  • When scanning for Enigma transactions, the zero-index payment addresses are generated for each owned stealth address [HASH(ephemeral_pubkey, hash_stealth_secret, 0)]. If a match is found for the zero-index of a stealth address, additional addresses are generated for the remaining indexes [num_tx_outputs] and these are scanned against to detect payments. See FindEnigmaTransactions in wallet.cpp for more info.

  • A similar scanning method is employed by Cloakers prior to signing an Enigma TX to ensure they are getting reimbursed correctly. See GetEnigmaOutputsAmounts in wallet.cpp for more info.

Enigma Transaction

Analyzing a ENIGMA transaction with the Blockexplorer the inputs are located on the left and outputs on the right, the number depends on how many cloakers were used. If 21 cloakers/mixers are used, there will be 21 matching outputs on the right and also 21 times as many inputs on the left. Only the sender and recipient know who the real sender is. So, in essence, 20 other people pretended to also send coins, but really sent them back to themselves.

Free of Copyright Restrictions.