As of August 2020 the site you are on (wiki.newae.com) is deprecated, and content is now at rtfm.newae.com.

Difference between revisions of "SimpleSerial"

From ChipWhisperer Wiki
Jump to: navigation, search
(Add majority of descriptions)
Line 1: Line 1:
 
SimpleSerial is the name given to the default communication protocol used by NewAE Technology Inc.'s demos.
 
SimpleSerial is the name given to the default communication protocol used by NewAE Technology Inc.'s demos.
 +
 +
== Commands ==
 
{| class="wikitable"
 
{| class="wikitable"
 
!Command
 
!Command
 
!Example
 
!Example
 
!Description
 
!Description
!
+
!In/Out
 +
!ENC
 +
!AUTH
 
|-
 
|-
 
|h
 
|h
|
+
|h0\n
|
+
|Select stack / hardware to use (if supported).
 +
|In
 +
|M
 +
|M
 
|-
 
|-
 
|i
 
|i
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
 
|-
 
|-
 
|j
 
|j
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
Line 21: Line 34:
 
|k2b7e151628aed2a6abf7158809cf4f3c\n
 
|k2b7e151628aed2a6abf7158809cf4f3c\n
 
|
 
|
 +
|In
 +
|Y
 +
|Y
 
|-
 
|-
 
|l
 
|l
 
|
 
|
 
|
 
|
|-
 
|m
 
 
|
 
|
 
|
 
|
 +
|
 +
|-
 +
|m
 +
|m0\n
 +
|Select cipher mode (if supported)
 +
|In
 +
|M
 +
|M
 
|-
 
|-
 
|n
 
|n
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
Line 37: Line 62:
 
|p126110475e17505a6966be70c89a829c\n
 
|p126110475e17505a6966be70c89a829c\n
 
|Send input plain-text, cause encryption
 
|Send input plain-text, cause encryption
 +
|In
 +
|Y
 +
|Y
 
|-
 
|-
 
|q
 
|q
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
Line 45: Line 76:
 
|r10000000000000000000000000000000\n
 
|r10000000000000000000000000000000\n
 
|Result of function - if encryption is encrypted result, if auth is '0..0' or '100..0'.
 
|Result of function - if encryption is encrypted result, if auth is '0..0' or '100..0'.
 +
|Out
 +
|Y
 +
|Y
 
|-
 
|-
 
|s
 
|s
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
Line 52: Line 89:
 
|t
 
|t
 
|t640a4a78332a8dee2bce15132ec44027\n
 
|t640a4a78332a8dee2bce15132ec44027\n
|Auth
+
|Authentication challenge (i.e., expected AES result if using AES as auth-method)
 +
|In
 +
|N
 +
|Y
 
|-
 
|-
 
|u
 
|u
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
 
|-
 
|-
 
|v
 
|v
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
Line 65: Line 111:
 
|xxxxx\n
 
|xxxxx\n
 
|Clears Buffers (resets to 'IDLE' state), does not clear any variables.
 
|Clears Buffers (resets to 'IDLE' state), does not clear any variables.
 +
|In
 +
|Y
 +
|Y
 
|-
 
|-
 
|y
 
|y
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
 
|-
 
|-
 
|z
 
|z
 +
|
 +
|
 +
|
 
|
 
|
 
|
 
|
 
|}
 
|}
 +
Y = YES, Command support for application.
 +
 +
N = NO, Command not supported for application.
 +
 +
M = MAYBE, Command may be supported depending on build target.
 +
 +
== Encryption Application ==
 +
The encryption application provides a simple method to encrypt a plaintext into a ciphertext. This application was the original "simple serial". The following operations are performed:
 +
# Load encryption key with 'k' command (for example, k2b7e151628aed2a6abf7158809cf4f3c\n sets key to k2b7e151628aed2a6abf7158809cf4f3c).
 +
# Set input text to encryption module with 'p' command. Device encrypts input text, and toggles the I/O trigger line during the encryption operation.
 +
# The ciphertext is returned with the 'r' command.
 +
 +
== Authentication Application ==
 +
The authentication application does not expose the result of the encryption. Instead, the result is used only in authentication mode, where the following operations are performed:
 +
# Load encryption key with 'k' command (for example, k2b7e151628aed2a6abf7158809cf4f3c\n sets key to k2b7e151628aed2a6abf7158809cf4f3c).
 +
# Set the authentication challenge with 't' command.
 +
# Set input text to encryption module with 'p' command. Device encrypts input text, and toggles the I/O trigger line during the encryption operation.
 +
# Device compares the resulting ciphertext with the challenge set with 't'.
 +
# If challenge and ciphertext match (auth OK), device responds with 'r1000000000000000\n'. If do not match, device response with 'r0000000000000000\n'.
 +
The authentication application is the '''default shipped with ALL programmed modules'''.

Revision as of 17:33, 16 March 2017

SimpleSerial is the name given to the default communication protocol used by NewAE Technology Inc.'s demos.

Commands

Command Example Description In/Out ENC AUTH
h h0\n Select stack / hardware to use (if supported). In M M
i
j
k k2b7e151628aed2a6abf7158809cf4f3c\n In Y Y
l
m m0\n Select cipher mode (if supported) In M M
n
p p126110475e17505a6966be70c89a829c\n Send input plain-text, cause encryption In Y Y
q
r r10000000000000000000000000000000\n Result of function - if encryption is encrypted result, if auth is '0..0' or '100..0'. Out Y Y
s
t t640a4a78332a8dee2bce15132ec44027\n Authentication challenge (i.e., expected AES result if using AES as auth-method) In N Y
u
v
x xxxxx\n Clears Buffers (resets to 'IDLE' state), does not clear any variables. In Y Y
y
z

Y = YES, Command support for application.

N = NO, Command not supported for application.

M = MAYBE, Command may be supported depending on build target.

Encryption Application

The encryption application provides a simple method to encrypt a plaintext into a ciphertext. This application was the original "simple serial". The following operations are performed:

  1. Load encryption key with 'k' command (for example, k2b7e151628aed2a6abf7158809cf4f3c\n sets key to k2b7e151628aed2a6abf7158809cf4f3c).
  2. Set input text to encryption module with 'p' command. Device encrypts input text, and toggles the I/O trigger line during the encryption operation.
  3. The ciphertext is returned with the 'r' command.

Authentication Application

The authentication application does not expose the result of the encryption. Instead, the result is used only in authentication mode, where the following operations are performed:

  1. Load encryption key with 'k' command (for example, k2b7e151628aed2a6abf7158809cf4f3c\n sets key to k2b7e151628aed2a6abf7158809cf4f3c).
  2. Set the authentication challenge with 't' command.
  3. Set input text to encryption module with 'p' command. Device encrypts input text, and toggles the I/O trigger line during the encryption operation.
  4. Device compares the resulting ciphertext with the challenge set with 't'.
  5. If challenge and ciphertext match (auth OK), device responds with 'r1000000000000000\n'. If do not match, device response with 'r0000000000000000\n'.

The authentication application is the default shipped with ALL programmed modules.