7.6.16 DES / Triple-DES Data Encryption/Decryption „ds‟
Use this command to perform encryption/decryption operations on 8 byte data blocks. The command
offers both Single-DES and Triple-DES crypto functions. Triple-DES cryptology is based on two keys
data encryption/decryption. Keys can be passed via serial connection, optionally the internally stored
keys can be used.
Command: 'ds'[Options][Key/KeyNumber][Data]
Parameters
[Options]
[Key/KeyNumber]
[Data]
Option byte:
Options
Bit 7
Bit 6
RFU
RFU
Encode:
1
Encode the data
0
Decode the data
KeyLength:
1
Use Triple-DES algorithm with 16 bytes key
0
Use Single-DES algorithm with 8 bytes key
KeyIndex:
1
The command uses the EEPROM key, specified by KeyNumber
0
The key is passed via serial connection
Answer
Answer
'Data<CR><LF>'
'R<CR><LF>'
Examples
Command
ds0011223344556677881020304050607080
ds070A1020304050607080
Elatec GmbH
Description
Option byte (1 byte)
Key (8 or 16 bytes) / Key number (1 byte), 00h...0Fh
Data to be encrypted/decrypted (8 bytes)
Bit 5
Bit 4
RFU
RFU
Description
Encrypted/Decrypted data
Error: Key index out of range
Description
Decode ciphertext 1020304050607080 with Single-DES algorithm using key
1122334455667788
Plaintext is 1B3446C2C2AA73CDh
Encode plaintext 1020304050607080 with Triple-DES algorithm using
EEPROM-key 0Ah.
Bit 3
Bit 2
RFU
Encode
Bit 1
Bit 0
KeyLength
KeyIndex
Page 50 of 65
Need help?
Do you have a question about the TWN3 Multi ISO and is the answer not in the manual?
Questions and answers