Transforming Your Entity Secret into Ciphertext and Initiating Registration

With your Entity Secret now created, we're ready to advance to a critical juncture. You're about to convert the Entity Secret into Ciphertext and register it with the system. This process sets the stage for you to create your first wallet—a milestone to look forward to.

Retrieving Your Entity's Public Key

Begin by acquiring your entity's public key. This key is retrievable via our APIs and is instrumental in the upcoming steps. To obtain it, use your API key for authentication. The entity's public key plays a crucial role as it encrypts your Entity Secret. Once encrypted, the Entity Secret remains secure, ensuring the information is shared exclusively between you and the platform, keeping it out of reach from outsiders.

Fetch public key

Try it out:Fetching your public key

Encrypting the Entity Secret and Encoding in Base64 Format

After obtaining the public key, the next step involves using RSA encryption to secure your Entity Secret. Follow these steps:

  • 1

    Encrypt the Entity Secret

    Employ RSA encryption with the public key to encrypt your Entity Secret. This cryptographic process ensures that the secret is encoded in such a way that only someone with the private key can decrypt it.

  • 2

    Encode as Base64

    After encryption, convert the encrypted data into Base64 format. Encoding in Base64 ensures the encrypted data can be safely conveyed and interpreted in various contexts, including those that may not handle binary data well.

  • 3

    Verify the Ciphertext Length

    Ensure that the generated Ciphertext is 684 characters in length. This specific length confirms the encryption process has been executed properly and that the data will be maintained correctly upon receipt.

The code provided will assist in automating this encryption process, generating a unique Entity Secret Ciphertext every time it is executed. The resulting Ciphertext is what you'll use to interact securely with the platform's API when performing operations that require it.

Encrypt your Entity Secret

const forge = require('node-forge')

const entitySecret = forge.util.hexToBytes('YOUR_ENTITY_SECRET')
const publicKey = forge.pki.publicKeyFromPem('YOUR_PUBLIC_KEY')
const encryptedData = publicKey.encrypt(entitySecret, 'RSA-OAEP', {
  md: forge.md.sha256.create(),
  mgf1: {
    md: forge.md.sha256.create(),
  },
})

console.log(forge.util.encode64(encryptedData))
Try it out:Generate Entity Secet Ciphertext

Registering Your Entity Secret Ciphertext

Once you've taken the necessary steps to safeguard your Entity Secret by converting it to Ciphertext, you'll need to register it within our Web3 Services Console. This action is vital as it authenticates the Ciphertext, effectively setting up a secure foundation for all subsequent interactions using our Developer-Controlled Wallets. The registration links your encrypted key with your developer account, ensuring that you can confidently manage wallet creation and transactions with the assurance of robust security measures in place.

Testnet
Register your Entity Secret Ciphertext

As you proceed with the registration of your Entity Secret Ciphertext, pay close attention to the recovery file that will be generated. This file is a critical safety measure for your operations. In the event that your Entity Secret is ever lost, the recovery file will act as your fallback, enabling you to regain access to your Developer-Controlled Wallets. Ensure that you store this file securely and in a location that you can access readily if needed.

Guarding your secrets & building trust

By meticulously completing the registration and protection of your Entity Secret, you've not only guaranteed the security of your key but also laid down a bedrock of trust for all activities involving our developer-controlled wallets. We prioritize the safety of your data and are committed to providing a seamless and secure user experience.

Need help or have questions?

Here are some helpful links:

🎮Join our Discord Community: Engage, learn, and collaborate.
🛎Visit our Help-Desk Page: Dive into curated FAQs and guides.
📧Direct Email: We're always a message away.
📖Read docs: Check out our developer documentation.
© 2023 Circle Technology Services, LLC. All rights reserved.