From 4297db37e90349e71b26ddc1c9c3c0aeba7e5d16 Mon Sep 17 00:00:00 2001 From: Coline Date: Thu, 30 Jun 2022 18:46:00 +0200 Subject: [PATCH] docs: apdu.md --- doc/apdu.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/doc/apdu.md b/doc/apdu.md index a08b260..2990481 100644 --- a/doc/apdu.md +++ b/doc/apdu.md @@ -15,6 +15,7 @@ - [Provide](#provide) - [PROVIDE ERC 20 TOKEN INFORMATION](#provide-erc-20-token-information) - [PROVIDE NFT INFORMATION](#provide-nft-information) + - [PERFORM PRIVACY OPERATION](#perform-privacy-operation)

@@ -35,6 +36,7 @@ |[SET EXTERNAL PLUGIN](#set-external-plugin)|0x12| |[PROVIDE NFT INFORMATION](#provide-nft-information)|0x14| |[SET PLUGIN](#set-plugin)|0x16| +|[PERFORM PRIVACY OPERATION](#perform-privacy-operation)|0x18|

@@ -564,6 +566,44 @@ None

+## PERFORM PRIVACY OPERATION + +
+ +Description + +This command performs privacy operations as defined in EIP 1024 (https://ethereum-magicians.org/t/eip-1024-cross-client-encrypt-decrypt/505) + +It can return the public encryption key on Curve25519 for a given Ethereum account or the shared secret (generated by the scalar multiplication of the remote public key by the account private key on Curve25519) used to decrypt private data encrypted for a given Ethereum account + +All data can be optionally checked on the device before being returned. +|CLA|INS|P1|P2|Lc|Le| +|---|---|--|--|--|--| +|E0|18|00 : return data | 00 : return the public encryption key|variable|variable| +| | |01 : display data and confirm before returning | 01 : return the shared secret| | | + +:inbox_tray: input data + +|Description|Length| +|-----------|------| +|Number of BIP 32 derivations to perform (max 10)|1| +|First derivation index (big endian)|4| +|...|4| +|Last derivation index (big endian)|4| +|Third party public key on Curve25519, if returning the shared secret|32| + +:outbox_tray: output data + +|Description|Length| +|-----------|------| +|Public encryption key or shared secret|32| + +
+ +
+
+
+ [//]: # (## Command name) [//]: # () [//]: # (
)