Skip to main content

Signing

Signing is the process of creating a digital signature using a private key to verify a transaction on the Humans.ai network. The signature is created using a specific cryptographic algorithm that ensures the authenticity and integrity of the transaction. This process can be done using various methods, such as wallets and the CLI.

One of the most commonly used methods for signing is the EIP-712 standard. EIP-712 is a standard for hashing and signing of typed structured data, which allows for the homogenization of the interaction between the EVM and Cosmos. Humans.ai leverages EIP-712 to provide a secure and consistent signing process.

EIP-712

EIP-712 revolutionizes the way we sign data on the blockchain by introducing a standardized format for signing "typed-data" in a human-readable format, making it easier for users to understand what they're signing and providing an additional layer of security against phishing attacks. Although EIP-712 isn't a specific Ethereum transaction type, it serves as a method for signing structured data that can be utilized for authentication and indirectly influencing program logic.

At Humans.ai, we recognize the importance of EIP-712 and have integrated it into our system to support signing Cosmos transactions. By using EIP-712, we can encode Cosmos transactions in a format that's compatible with Ethereum signers, including Ledger hardware wallets. This innovative approach enables us to bypass the limitations of Ethereum signing devices, which often don't support signing arbitrary bytes for security reasons, and provide a more seamless and secure experience for our users.

The procedure goes like this:

  1. A Cosmos transaction is represented in the form of a JSON sign-doc.
  2. This JSON sign-doc is then transformed into an EIP-712 object, which consists of types and messages.
  3. Using an Ethereum signer such as MetaMask or a Ledger hardware device, the EIP-712 object is signed.
  4. The same process is performed on the node to verify the signature.

At Humans.ai, we utilize EIP-712 for signing Cosmos transactions, which ensures seamless compatibility with widely used Ethereum signing tools such as MetaMask, Ledger devices, and Keplr. By doing so, we facilitate a more convenient and interoperable experience for users when interacting with both the Ethereum and Cosmos networks.