-
Notifications
You must be signed in to change notification settings - Fork 0
LWC Security Hardwaer Operation Interface
The general security hardware is a hardware signing and encrypting module for IoT applications developed by the BigBangCore blockchain team. It provides cilents with saving, encryption, decryption, and confidence-sharing solutions. This document recounts the hardware access interface and method of access of the BBC blockchain security module.
Content of Message: [Total length of data pack(4byte uint32) | Request sequence number(4byte uint32) |Interface identifier(1byte uint8) | Length of interface parameters(4byte uint32) | parameter sequence(0~nbyte) ]
Explanation: “total length of data pack” covers the 4 bytes of the term itself; “length of interface parameters” does not cover the term’s own 4 bytes, and if there is no “parameter sequence”, then “length of interface parameters” is 0.
Content of Message: [Total length of data pack(4byte uint32) | Response sequence number(4byte uint32) | Response status code(2byte uint16) | Interface identifier(1byte uint8) | Interface return value length(4byte uint32) | Return sequence(0~nbyte)]
Explanation: “Total length of data pack” covers the 4 bytes of the term itself; “response sequence number” is equal to the “request sequence” in the corresponding request message; “interface return value length” does not cover the 4 bytes of the term itself. If there is no “return sequence”, then “interface return value length” is 0
2.3.1 If status code is 0x9000, request is being correctly responded;
2.3.2 If status code is larger than 0x9000, the system is malfunctioning;
2.3.3 If status code is less than 0x9000, it means request has already been processed and a corresponding processing status is returned. The status is relevant to certain request interface. Read the text below for more information about specific interfaces.
Response Status Code | Corresponding Decimal | Implication |
---|---|---|
0x9000 | 36864 | Request correctly processed |
0x9001 | 36965 | System occupied |
0x9002 | 36866 | Invalid pack |
0x9003 | 36867 | Pack command word of the location |
0x9004 | 36868 | Incorrect pack length |
0x9005 | 36869 | Invalid sequence number |
0x9006 | 36870 | Verification failed |
0x9007 | 36871 | Hardware failure |
0x9008 | 36872 | illegal operation |
0x9045 | 36933 | Device not logged-in, service refused |
0x9056 | 36950 | Incorrect parameter length |
0x9057 | 36951 | Security Storage Error |
Sequence number | Interface Name | Interface Identifier | Explanation | Version support |
---|---|---|---|---|
Module-managing interface | ||||
1 | get_about | 0x01 | Acquire information of module | 0.1.0-Latest |
2 | device_status | 0x02 | Check status of module | 0.2.0-Latest |
3 | set_pincode | 0x03 | Set(create or modify) key to hardware | 0.2.0-Latest |
4 | access_by_pincode | 0x04 | Verification for accessing hardware module | 0.2.0-Latest |
5 | wirte_keypair | 0x05 | Write private key | 0.2.0-Latest |
6 | erase_keypair | 0x06 | Erase private key(re-verification of pincode needed) | 0.2.0-Latest |
7 | write_secret | 0x07 | Write secret data | 0.2.0-Latest |
8 | erase_secret | 0x08 | Erase secret(verification of pincode needed) | 0.2.0-Latest |
9 | read_secret | 0x09 | Read secret data | 0.2.0-Latest |
10 | get_id | 0x0a | Acquire device id | 0.2.0-Latest |
11 | reset_device | 0x0b | Reset device(verification needed) | 0.2.0-Latest |
-- | -- | -- | -- | -- |
Wallet operation interface | ||||
1 | get_wallet_ed25519_pk | 0x23 | Acquire public key for wallet of a certain sequence number | 0.1.0-Latest |
2 | get_wallet_curve25519_pk | 0x24 | Acquire curve2551 public key for wallet of a certain sequence number | 0.1.0-Latest |
3 | get_wallet_curve25519_sk | 0x25 | Acquire curve2551 private key for wallet of a certain sequence number | 0.1.0-Latest |
4 | get_wallet_address | 0x26 | Acquire address of wallet of a certain sequence number | 0.1.0-Latest |
-- | -- | -- | -- | -- |
Transaction operation interface | ||||
1 | wirte_keypair_v2 | 0x44 | keypair Write keypair of different coins | -- |
2 | sign_transaction | 0x45 | Sign on BBC original transaction sent from outside | 0.1.0-Latest |
3 | sign_transaction_v2 | 0x46 | Support signing for multiple coins | -- |
-- | -- | -- | -- | -- |
Encryption operation interface | ||||
1 | crypto_box_beforenm | 0x63 | Produce shared key compatible with wallet of certain sequence numbers and libsoudium | 0.1.0-Latest |
2 | crypto_curve25519_scalarmult | 0x64 | Create curve25519 shared key for wallet of a certain sequence number | 0.1.0-Latest |
-- | -- | -- | -- | -- |
LWS protocol operation interface | ||||
1 | lws_request_signature | 0x80 | signing of every LWS request | 0.1.0-Latest |
2 | lws_nonce | 0x81 | Acquire nonce | -- |
3 | lws_hash_blake2b | 0x82 | blake2b hash | -- |
4 | lws_sign_ed25519 | 0x83 | ed25519 sign | -- |
-
Interface type: module management interface
-
Interface ID: 0x01
-
Number of parameters: 0
-
Total parameter length: 0
-
Example request sequence:
X | 0d000000 | 01000000 | 01 | 00000000
-
Number of return values: 1
-
Total length of return value: the JSON string length of device ‘about information’
-
Return value 1: device "about information" JSON string
-
Sample response sequence:
0x|9a000000|01000000|0090|01|8b000000|7b226e616d65223a202242696742616e67436f7265204c5743204d6f64756c65222c202276657273696f6e223a22302e312e30222c202268617368223a2236356632326265222c2022636f70797269676874223a2242696742616e67205465616d2032303230222c2022656d61696c223a22636f6e746163744062696762616e67636f72652e636f6d227d
-
Content of Response Message: json string ——
{"name":"BigBangCore LWC Module", "version":"0.2.0", "hash":"6c3b6f9", "copyright":"BigBang Team 2020", "email":"[email protected]"}
-
Status Code Explanation: 0x9000 means calling interface correctly, other codes mean calling interface incorrectly.
-
P.S.
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x02
-
Number of Parameters: 0
-
Total Length of Parameter: 0 byte
-
Sample Request Sequence:
0x|0d000000|03000000|02|00000000
-
Number of Return Values: 8
-
Total Length of Return Values: 15 byte
-
Return Value 1:pincode’s configuration status, 0-pincode used; 1- pincode unused; 2- device malfunctioning
-
Return Value 2: solt0’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 3: solt1’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 4: solt1’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 5: solt3’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 6: solt4’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 7: solt5’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 8: solt6’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 9: secret0’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 10: secret1’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 11: secret2’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 12: secret3’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 13: secret4’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 14: secret5’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Return Value 15: secret6’s storage status, 0- used; 1- unused; 2- device malfunctioning
-
Sample Response Sequence:
-
0x|1e000000|03000000|0090|02|0f000000|000000000000000001010101010101
-
Status Code Explanation: 0x9000 means calling interface correctly, other codes mean calling interface incorrectly
-
P.S.:
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x03
-
Number of Parameters: 4
-
Total Length of Parameters: old pincode length +1+new pincode length+1(must be equal to or longer than 14 byte)
-
Paramer 1: 1 byte, indentifies the length of old pincode
-
Paramer 2: old pincode (6-128 ascii code characters)
-
Paramer 3: 1 byte, identifies the length of new pincode
-
Paramer 4: new pincode (6-128 ascii code characters)
-
Sample Request Sequence:
0x|1b000000|04000000|03|0e000000|0631313131313106303132333435
-
Number of Return Values: 0
-
Total Length of Return Values: 0
-
Sample Response Sequence:
0x|0f000000|04000000|0090|03|00000000
-
Status Code Explanation: 1~5- device malfunctioning, 6- new pincode length not matched; 7- old pincode not matched; 8- new pincode does not comply with ascii restriction; 9- old pincode does not comply with ascii restriction; 10- old pincode not matched, cannot modify; 11-original password not matched(see P.S.); 12- device malfunctioning; 0- pincode successfully modified
-
P.S.: Default password for new devices is "111111"(when device status interface’s return value is 1), visits to interfaces other than get_about、device_status、set_pincode will be denied. If unused return code keeps being returned when visiting access by pincode interface, the user must set old pincode to "111111" when setting password
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x04
-
Number of Parameters: 1
-
Total Length of Parameters: pincode character length
-
Parameter 1: pincode
-
Sample Request Sequence:
0x|13000000|05000000|04|06000000|303132333435
-
Number of Return Values: 0
-
Total Length of Return Values: 0
-
Sample Response Sequence:
0x|0f000000|05000000|0090|04|00000000
-
Status Code Explanation: 1~5- device malfunctioning, 6- pincode less than 6 characters; 7- pincode contains non-ascii character; 8- pincode access unused, need to modify password; 9- device malfunctioning; 10- pincode not matched
-
P.S.
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x05
-
Number of Parameters: 3
-
Total Length of Parameters: 1+32+32 bytes
-
Parameter 1: solt written, value is 0-6
-
Parameter 2: 32-byte private key
-
Parameter 3: 32-byte public key
-
Sample Request Sequence:
0x|4e000000|06000000|05|41000000|00|0354737713d56bf3e22093d6260b35dba7ef031f8c608d2761818c78f6 5d82bb|9a6501818596c03a0f5a982e366801e7be9386f5134a0a698fe6dd6c0e50ac8c
-
Number of Return Values: 0
-
Total Length of Return Values: 0
-
Sample Response Sequence:
0x|0f000000|06000000|0090|05|00000000
-
Status Code Explanation: 1~5- device malfunctioning; 6- slot number out of range; 7- invalid coin; 10- storage location occupied, need to erase previous key to write in; 11- write-in error, private key verification failed;
-
P.S.
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x06
-
Number of Parameters: 3
-
Total Length of Parameters: 1+1+n bytes
-
Parameter 1: solt that needs to be erased, value is 0~6
-
Parameter 2: length identifier of 1-byte pincode
-
Parameter 3: n-byte(the length identified by parameter 2) pincode
-
Sample Request Sequence:
0x|15000000|07000000|06|08000000|00|06|303132333435
-
Number of Return Values: 0
-
Total Length of Return Values: 0
-
Sample Response Sequence:
0x|0f000000|07000000|0090|06|00000000
-
Status Code Explanation: 1~5- device malfunctioning; 6- solt number out of range; 10- pincode error
-
P.S.:
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x07
-
Number of Parameters: 3
-
Total Length of Parameters: 1+4+n bytes
-
Parameter 1: section written, value is 0~6
-
Parameter 2: crc32 data checksum(length of data+ data sequence)
-
Parameter 3: description of 4-byte data length
-
Parameter 4: n-byte data
-
Sample Request Sequence:
0x|9c000000|0a000000|07|8f000000|00|1978caa7|8a000000|7b226e616d65223a2242696742616e67436f7265204c5743204d6f64756c65222c202276657273696f6e223a22302e322e30222c202268617368223a2232363939303538222c2022636f70797269676874223a2242696742616e67205465616d2032303230222c2022656d61696c223a22636f6e746163744062696762616e67636f72652e636f6d227d
-
Number of Return Values: 0
-
Total Length of Return Values: 0
-
Sample Response Sequence:
0x|0f000000|0a000000|0090|07|00000000
-
Status Code Explanation: 6- section number out of range; 7- data too long; 8- storage location occupied, needs to erase previous data before write-in; 9~11- write-in error
-
P.S.:
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x08
-
Number of Parameters: 3
-
Total Length of Parameters: 1+1+n bytes
-
Parameter 1: section to be erased, value is 0~6
-
Parameter 2: length identifier of 1-byte pincode
-
Parameter 3: n-byte(length identified by parameter 2) pincode
-
Sample Request Sequence:
0x|15000000|08000000|08|08000000|00|06|303132333435
-
Number of Return Values: 0
-
Total Length of Return Values: 0
-
Sample Response Sequence:
0x|0f000000|08000000|0090|08|00000000
-
Status Code Explantion: 6- solt number out of range; 8- erase error; 10- pincode not mathced
-
P.S.:
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x09
-
Number of Parameters: 1
-
Total Length of Parameters: 1+1+n bytes
-
Parameter 1: section to read, value is 0~6
-
Sample Request Sequence:
0x|0e000000|09000000|09|01000000|00
-
Number of Return Values: 2
-
Total Length of Return Values: 4+n
-
Return Value 1: crc32 data checksum(data length+ data sequence)
-
Return Value 2: data sequence read
-
Sample Request Sequence:
0x|9d000000|09000000|0090|09|8e000000|1978caa7|7b226e616d65223a2242696742616e67436f7265204c5743204d6f64756c65222c202276657273696f6e223a22302e322e30222c202268617368223a2232363939303538222c2022636f70797269676874223a2242696742616e67205465616d2032303230222c2022656d61696c223a22636f6e746163744062696762616e67636f72652e636f6d227d
-
Sample Response Sequence:
0x|9d000000|09000000|0090|09|8e000000|1978caa7|7b226e616d65223a2242696742616e67436f7265204c5743204d6f64756c65222c202276657273696f6e223a22302e322e30222c202268617368223a2232363939303538222c2022636f70797269676874223a2242696742616e67205465616d2032303230222c2022656d61696c223a22636f6e746163744062696762616e67636f72652e636f6d227d
-
Status Code Explanation: 6- section number out of range; 7- data too long; 8- storage location occupied
-
P.S.:
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x0a
-
Number of Parameters: 0
-
Total Length of Parameters: 0
-
Sample Request Sequence: 0x|0d000000|10000000|0a|00000000
-
Number of Return Values: 1
-
Total Length of Return Values: 32
-
Return Value 2: device id read
-
Sample Response Sequence:
0x|2f000000|10000000|0090|0a|20000000|0f0f0f0f0cf0d8e1657e5e67abdbce2b0bb9774ea0661f0f5e0f012013a47063
-
Status Code Explanation: 1~5 device malfunctioning
-
P.S.:
-
Interface Type: Module Management Interface
-
Interface Identifier: 0x0b
-
Number of Parameters: 2
-
Total Length of Parameters: 1+n byte
-
Parameter 1: length identifier of 1-byte pincode
-
Parameter 2: n-byte(length identified by parameter 1) pincode
-
Sample Request Sequence:
0x|14000000|11000000|0b|07000000|06|303132333435
-
Number of Return Values: 0
-
Total length of Return Values: 0
-
Sanple Response Sequence:
0x|0f000000|11000000|0090|0b|00000000
-
Status Code Explanation: 10- pincode not matched; 9- error in erasing secret; 8- error in erasing keypair
-
P.S.:
-
Interface Type: Wallet Operation Interface
-
Interface Identifier: 0x23
-
Number of Parameters: 1
-
Total Length of Parameters: 1 byte
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Sample Request Sequence:
0x|0e000000|01000000|23|01000000|[00~06]
-
Number of Return Values: 1
-
Total Length of Return Values: 32
-
Return Value 1: 32-byte wallet public key
-
Sample Response Sequence:
0x|2f000000|01000000|0090|23|20000000|8cac500e6cdde68f690a4a13f58693bee70168362e985a0f3ac096858101659a
-
Status Code Explanation: 1~5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set)
-
P.S.:
-
Interface Type: Wallet Operation Interface
-
Interface Identifier: 0x24
-
Number of Parameters: 1
-
Total Length of Parameters: 1 byte
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Sample Request Sequence:
0x|0e000000|02000000|24|01000000|[00~06]
-
Number of Return Values: 1
-
Total Length of Return Values: 32
-
Return Value 1: 32-byte curve2551 public key
-
Sample Response Sequence:
0x|2f000000|01000000|0090|24|20000000|5b122fdf28f448de1ae38f4ab48b962a7161f63691460a51b52b32d08e592603
-
Status Code Explanation: 1~5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set; 8- public key conversion failed
-
P.S.:
-
Interface Type: Wallet Operation Interface
-
Interface Identifier: 0x25
-
Number of Parameters: 1
-
Total Length of Parameters: 1 byte
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Sample Request Sequence:
0x|0a000000|03000000|25|01000000|[00~06]
-
Number of Return Values: 1
-
Total Length of Return Values: 32
-
Return Value 1: 32-byte curve25519 private key
-
Sample Response Sequence:
0x|0000002b|03000000|0090|25|20000000|fe379d36efd3590309279bf30389b37600cd545be1dbaa5e96ed69de2a661f47
-
Status Code Explanation: 1~5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set); 8- private key conversion failed
-
P.S.:
-
Interface Type: Wallet Operation Interface
-
Interface Identifier: 0x26
-
Number of Parameters: 1
-
Total Length of Parameters: 1 byte
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Sample Request Sequence:
0x|0a000000|04000000|26|01000000|[00~06]
-
Number of Return Values: 1
-
Total Length of Return Values: 57
-
Return Value 1: 57-byte sring, not containing '\0' string ending
-
Sample Response
Sequence:0x|45000000|04000000|0090|26|3a000000|31643764706a36326473747979736a30356164386834357076627036713439687a783866643733657064386a70333433657a376d657a356e7800
-
Status Code Explanation: 1~5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set); 8- address conversion failed
-
P.S.:
-
Interface Type: Transaction Operation Interface
-
Interface Identifier: 0x45
-
Number of Parameters: 2
-
Total Length of Parameters: 1+n(n is the length of original transaction after sequentialization)
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Parameter 2: Serialized byte stream of original transaction(little endian)
-
Sample Request Sequence:
2e010000|0a000000|45|21010000|008cac500e6cdde68f690a4a13f58693bee70168362e985a0f3ac096858101659a432d4c64ed58b06a2e06102e380a9aaf977ca3bb36c6d37d96b597cbb2a5f0bdf0160022d596c3ff7bdfa414c69dd199d8d9e37a3a39174b374ad59293dc2c115f9c20064d80d4c1036fea5e0b35492ed411450849121df4448ff5bcf89a3b6a1b9f2c5992ed137efbf68335a183fde1aa2b34e93616a7416dec3a9803d23961f6c5c469b54288297b2c476bf97ebfe5a59e05815a76b681621131f912b33c50abcaef6a065c05d532f443fc422ef2c24f60bb766553f48801b2d1f76ccf1563e9edc3deebddb400b832889f0212b91805ce1f69eaeb9f8cfa4f071c0c50c961498b63009dfb70f7ee0902ba95cc171f7d7a97ff16d89fd96e1f1b9e7d5f91da
-
Number of Return Values: 1
-
Total Length of Return Values: 64
-
Return Value 1: 64-byte signature data
-
Sample Response Sequence:
4f000000|0a000000|0090|45|40000000|1e9324587252da22132e2dd3b206a01e472911cd339f59a3e469183f1278d917f0d6c2b40e4b97fe7d67ddf922663a9791d21154c676745dba704dbc43fc3208
-
Status Code Explanation: 1~5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set)
-
P.S.:
-
Interface Type: Transaction Operation Interface
-
Interface Identifier: 0x46
-
Number of Parameters: 2
-
Total Length of Parameters: 1+n(n is the length of original transaction after sequentialization)
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Parameter 2: Serialized byte stream of original transaction(little endian)
-
Sample Request Sequence:
2e010000|0a000000|45|21010000|008cac500e6cdde68f690a4a13f58693bee70168362e985a0f3ac096858101659a432d4c64ed58b06a2e06102e380a9aaf977ca3bb36c6d37d96b597cbb2a5f0bdf0160022d596c3ff7bdfa414c69dd199d8d9e37a3a39174b374ad59293dc2c115f9c20064d80d4c1036fea5e0b35492ed411450849121df4448ff5bcf89a3b6a1b9f2c5992ed137efbf68335a183fde1aa2b34e93616a7416dec3a9803d23961f6c5c469b54288297b2c476bf97ebfe5a59e05815a76b681621131f912b33c50abcaef6a065c05d532f443fc422ef2c24f60bb766553f48801b2d1f76ccf1563e9edc3deebddb400b832889f0212b91805ce1f69eaeb9f8cfa4f071c0c50c961498b63009dfb70f7ee0902ba95cc171f7d7a97ff16d89fd96e1f1b9e7d5f91da
-
Number of Return Values: 1
-
Total Length of Return Values: 64
-
Return Value 1: 64-byte signature data
-
Sample Response Sequence:
4f000000|0a000000|0090|45|40000000|1e9324587252da22132e2dd3b206a01e472911cd339f59a3e469183f1278d917f0d6c2b40e4b97fe7d67ddf922663a9791d21154c676745dba704dbc43fc3208
-
Status Code Explanation: 1~5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set)
-
P.S.:
-
Interface Type: Encryption Operation Interface
-
Interface Identifier: 0x63
-
Number of Parameters: 2
-
Total Length of Parameters: 33 bytes
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Parameter 2: 32-byte-long public key of the other party
-
Sample Request Sequence:
0x|2a000000|09000000|63|21000000|[00~07]|e8f96e9061256ad68dd31eea3f26728d5ddb1612515305c8ecbdce4d1869db69
-
Number of Return Values: 1
-
Total Length of Return Values: 32
-
Return Value 1: 32-byte access key
-
Sample Response Sequence:
0x|2b000000|09000000|0090|63|20000000|397612d2870c3b720dd65c26ad0cef5690fa1713d60287ca5a876b63dec2d7da
-
Status Code Explanation: 1
5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set); 89- calculation error -
P.S.: crypto_box_beforenm function compatible with sodium
-
Interface Type: Encryption Operation Interface
-
Interface Identifier: 0x64
-
Number of Parameters: 2
-
Total Length of Parameters: 33 bytes
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Parameter 2: 32-byte-long public key of the other party
-
Sample Request Sequence:
0x|2a000000|0a000000|64|21000000|[00~07]|e8f96e9061256ad68dd31eea3f26728d5ddb1612515305c8ecbdce4d1869db69
-
Number of Return Values: 1
-
Total Length of Return Values: 32
-
Return Value 1: 32-byte access key
-
Sample Response Sequence:
0x|2b000000|0a000000|0090|64|20000000|fe379d36efd3590309279bf30389b37600cd545be1dbaa5e96ed69de2a661f47
-
Status Code Explanation: 1~5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set); 8- calculation error
-
P.S.:
-
Interface Identifier: 0x80
-
Number of Parameters: 4
-
Total Length of Parameters: 1+32+4+n
-
Parameter 1: 0x00~0x06, numbers corresponding to wallets
-
Parameter 2: 32-byte-long seed produced by LWS
-
Parameter 3: total length of data to be signed on
-
Parameter 4: data character sequence to be signed on
-
Sample Request Sequence:
0x|52000000|02000000|80|45000000|08|91b0c7b85f0806ebcda63594b5eee5a56714fac150824998c1a6d644c5929757|20000000|91b0c7b85f0806ebcda63594b5eee5a56714fac150824998c1a6d644c5929757
-
Number of Return Values: 1
-
Total Length of Return Values: 20
-
Return Value: 20-byte signature sequence
-
Sample Response Sequence:
0x|23000000|02000000|0090|80|14000000|8f2d663b5ac5f57a33a25c0f4cd88a502c378628
-
Status Code Explanation: 1~5- device malfunctioning; 6- wallet number out of range; 7- wallet invalid(key not set); 8- calculation error
-
P.S.: