TLS SE APP Main Commands - purien/IoSE GitHub Wiki
All commands comprise a header:
- one character
- two hexadecimal digits (0123456789ABCDEF)
- All commands are ended by CrLf characters (only Lf is also supported)
- a set of characters, ending by CrLf
- ERROR notifies an error
- syntax: cxy
- action: clear public/private keys at index xy (00, 01, 02, 03)
- response: OK or ERROR
- syntax: gxy
- action: generate public/private keys at index xy (00, 01, 02, 03)
- response OK or ERROR
- syntax: pxy
- action: get public key at index xy
- response: 130 hexadecimal digits (65 bytes) or ERROR
- syntax: rxy
- action: get private key at index xy
- response: 64 hexadecimal digits (32 bytes), or ERROR
- syntax: sxy[data]
- action: sign data, ECDSA=(R,S) two integer values (2x 32 bytes)
- response: 64 hexadecimal digits (64 bytes), or ERROR
- syntax Xxy[data]
- action: set private key at index xy, data up to 64 hexadecimal digits (32 bytes). Depending on smartcard compute public key.
- response: OK or ERROR
- syntax: Pxy[data]
- action: set public key at index xy, data 130 hexadecimal digits (65 bytes).
- response: OK or ERROR
- syntax: Txy[data]
- action: set BIP32 seed at index xy, up to 64 hexadecimal digits (32 bytes)
- response: OK or Error
- syntax: vxy
- action: get BIP32 seed at index xy
- response: 64 hexadecimal digits (32 bytes), or ERROR
- syntax bxy[data]
- action: compute BIP32 public/private key at index xy. data is a list of integers (nx 32bits) with most significant bit set (example: 8000000180000002)
- response: OK or ERROR
- syntax: Zxy[text]
- action: write up to 64 charcaters in the record xy (00...1F). Up to 32 records of 64 bytes
- response: OK or ERROR
- syntax: Ixy
- action: read record xy (00...1F). Up to 32 records of 64 bytes
- response: up to 64 characters (empty line if no content) or ERROR
- syntax ?00
- action: Get software version
- response: software version
- syntax: ?01[text]
- action: echo text
- response: text content or ERROR
- syntax: ?02
- action: request to close session
- response: no response
- syntax: ?0A
- action: get smartcard ID, i.e. public key
- response: 130 hexadecimal digits (65 bytes) or ERROR
- syntax: ?0B
- action: get smartcard certificate = ECDSA(sha256(ID)= (R,S)
- response: 128 hexadecimal digits (64 bytes)
- syntax: ?0C[data]
- action: authentication with smarcard private key, data=r(random), up to 64 hexadecimal digits (32 bytes)
- response: signature (ASN.1 encoded)= ECDSA= (R,S)= sign(sha256(HS || r)), HS= Handshake Secret or ERROR
- syntax: ?0E[data]
- action: set the smartcard certificate, data= (R,S)= sign(sha256(ID)), 256 hexadecimal digits (2x 32 bytes)
- response OK or ERROR
- syntax: ?AA[data]
- action: set the PSK value, data= old_psk || new_psk, 2x 128 hexadecimal digits (2x 32 bytes)
- response: OK or ERROR
- syntax: ?FF[text]
- action: echo haxdecimal encoded value
- response: text value or ERROR