FEIP17V3_Safe(en-US)
-
FEIP17: Safe Version: 3 Language: en-US Author: C_armX, Deisler-JJ_Sboy,Free_Cash Status: draft Created date: 2021-03-07 Last modified date:2022-04-22 File hash: "" TXid:
FEIP17V3_Safe(en-US)
Contents
Metadata
Protocol type: FEIP Serial number: 17 Protocol name: Safe Version: 3 Description : Save encrpted important data on the blockchain of FCH. Author: C_armX, Deisler-JJ_Sboy,Free_Cash Language: en-US Previous version hash:"ea73a3501179224636d2939f1b2e2f581052d0632bacae3b677cc3805157de96"
About FEIP
-
Write important data in OP_RETURN for public witness under FEIP type protocols.
-
The SIGHASH flag of all transaction inputs is ‘ALL’ (value 0x01).
-
The max size of OP_RETURN : 4096 bytes.
-
The format of the data in op_return: JSON.
-
Encoding : utf-8.
About this protocol
-
This protocol helps users to write encrypted personal information in the blockchain of FCH.
-
Use the public key of the first output address to encrypt the message.
-
The item belongs to the safe of the first input address of the transaction that adds it.
-
Only the address who added the item can delete or recover it.
-
When updating an item, just delete it and add a new one.
Add
When user adds a new item, the OP_RETURN contains the data as follows:
field number field name type length content required 1 type String 4 Fixed: "FEIP"<br>Case insensitive Y 2 sn int 2 Serial number<br>Fixed: 17 Y 3 ver int 1 Fixed: 3 Y 4 name String 4 Fixed: "Safe"<br>Case insensitive N 5 hash hex 32 Sha256 value of this protocol file N 6 data.op string 3 operation: "add" Y 7 data.alg string 1-32 The encrypt algorithm.<br>"ECC256k1-AES256CBC" is recommended. Y 8 data.ciphertext string 1-2048 Encrypted message Y Decrypted data of data.ciphertext
field number field name type length content required 1 type string 16 Customized by the user or App N 2 title string 128 Title, account, or other.<br>Depends on "type". N 3 content string 1024 Text, password, or other. <br>Depends on "type". Y 4 memo string 256 N Example for adding an item
The address of first output: FEk41Kqjar45fLDriztUDTUkdki7mmcjWK Publickey: 6vU3ZMpwggurw92AUy1Vi6WBxEnBPdjupXGKD7Q5Zcw8yvdJAf Privatekey: L2bHRej6Fxxipvb4TiR5bu1rkT3tRp8yWEsUy4R1Zb8VMm2x7sd8 OP_RETURN content: { "type": "FEIP", "sn": 17, "ver": 3, "name": "Safe", "hash": "", "data":{ "op": "add", "alg": "ECC256k1-AES256CBC", "ciphertext": "AjTU0rGQvDxhCs3F5x4Pcz3Bsiiry2LryPcKcPIZ2iDsD68U5he9FkM6AVUzEHTjmfBLkhfFu7rv4fveoyMi5YH+wQoiWDxgs/MYjGZBL/Fuq6XZ6IOCXfWyfwphE4uxhEg5TD9ZBRsrJbNxwbdfee5ev5Gvc8kwYROycs0sAG3rNdoJbEZZ7bs2DqvHbAWdG7w4gYLhP9o+C/xVTZHz7Ks9VHb6i04/1at40etlWXxPWSvkdDWxTtyWSSsY2jrbYjfe+ytXQRTRY4gYQdwg+9s=" } } Decrypted information of data.ciphertext: { "type": "password", "title": "john@gmail.com", "content": "123456", "memo": "https://www.gmial.com" }
Delete
When user deletes an item, the OP_RETURN contains the data as follows:
field number field name type length content required 1 type String 4 Fixed: "FEIP"<br>Case insensitive Y 2 sn int 2 Serial number<br>Fixed: 17 Y 3 version int 1 Fixed: 3 Y 4 name String 4 Fixed: "Safe"<br>Case insensitive N 5 hash hex 32 Sha256 value of this protocol file N 6 data.op string 3 operation: "delete" Y 7 data.addTxid string 64 The txid in which the item was added. Y Example for deleting an item
{ "type": "FEIP", "sn": 17, "ver": 3, "name": "Safe", "hash": "", "data":{ "op": "delete", "addTxid": "/*The txid in which the item was added.*/" } }
Recover
When user recovers an item, the OP_RETURN contains the data as follows:
field number field name type length content required 1 type String 4 Fixed: "FEIP"<br>Case insensitive Y 2 sn int 2 Serial number<br>Fixed: 17 Y 3 version int 1 Fixed: 3 Y 4 name String 4 Fixed: "Safe"<br>Case insensitive N 5 hash hex 32 Sha256 value of this protocol file N 6 data.op string 3 operation: "recover" Y 7 data.addTxid string 64 The txid in which the item was added. Y Example for recovering an item
{ "type": "FEIP", "sn": 17, "ver": 3, "name": "Safe", "hash": "", "data":{ "op": "recover", "addTxid": "/*The txid in which the item was added.*/" } }
-