You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The snap-specific entropy used to sign messages can also be used to derive an encryption key-pair.
The secret decryption key should not be the entropy, to avoid key reuse, but it has to be deterministically generated from it.
To align with other MetaMask implementations, the encryption system should use ERC1024 messages and keys.
See here an implementation.
add a getEncryptionPublicKey(): Promise<string> method that returns a hex encoded, 0x prefixed x25519 public key
add a decryptMessage(message: Eip1024EncryptedData): Promise<string> method that accepts an Eip1024EncryptedData object and returns the decrypted message (string).
add corresponding logic to onRpcRequest to expose the 2 new methods
If possible, avoid using extra dependencies
The text was updated successfully, but these errors were encountered:
The snap-specific entropy used to sign messages can also be used to derive an encryption key-pair.
The secret decryption key should not be the entropy, to avoid key reuse, but it has to be deterministically generated from it.
To align with other MetaMask implementations, the encryption system should use ERC1024 messages and keys.
See here an implementation.
getEncryptionPublicKey(): Promise<string>
method that returns a hex encoded,0x
prefixed x25519 public keydecryptMessage(message: Eip1024EncryptedData): Promise<string>
method that accepts an Eip1024EncryptedData object and returns the decrypted message (string).onRpcRequest
to expose the 2 new methodsThe text was updated successfully, but these errors were encountered: