From: Mazet Laurent Date: Tue, 6 May 2025 16:30:16 +0000 (+0200) Subject: add tests for crypto module X-Git-Tag: v1.0~29^2~9 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=aa070513dd1063359b20965d01b8dd14ebf35579;p=morep.git add tests for crypto module --- diff --git a/cryptomod.c b/cryptomod.c index 54ad0d6..9547d85 100644 --- a/cryptomod.c +++ b/cryptomod.c @@ -12,7 +12,7 @@ - initial version */ -/* depend: */ +/* depend: morep_simulator.exe */ /* cflags: */ /* linker: core.o function.o morep.o parse.o pdu_channel.o pdu_encrypted_data.o pdu_prng_param.o pdu_status.o pdu_clear_data.o pdu_key.o pdu_raw_data.o task.o */ @@ -45,7 +45,9 @@ DECLARE_VERBOSE_LEVEL (crypto, INFO); #define BUFMAX 4096 -extern state_t state; +task_t *task = NULL; + +state_t state = idle_e; FILE *logfile = NULL; @@ -116,18 +118,27 @@ message_t message_list[] = { {"", noserv_e, 0x00, undef_pdu_e, nofunc_e} }; +/* for test on localloop: + - red side + - tx is 080x + - rx is 081x + - black side + - tx is 082x + - rx is 083x +*/ + /* definition of all services */ service_t service_list[] = { - {"CROSS_CRYPTO_B2R", cross_crypto_b2r_e, NULL, NULL}, /* 809 */ - {"CROSS_CRYPTO_R2B", cross_crypto_r2b_e, NULL, NULL}, /* 809 */ - {"LOCAL_CRYPTO_BLACK", local_crypto_e, NULL, NULL}, /* 80a */ - {"LOCAL_CRYPTO_RED", local_crypto_e, NULL, NULL}, /* 80a */ - {"PROVISIONING", provisioning_e, NULL, NULL}, /* 80b */ - {"PRNG_BLACK", prng_e, NULL, NULL}, /* 80c */ - {"PRNG_RED", prng_e, NULL, NULL}, /* 80c */ - {"BYPASS_B2R", bypass_e, NULL, NULL}, /* 80d */ - {"BYPASS_R2B", bypass_e, NULL, NULL}, /* 80d */ - {"CONTROL", control_e, NULL, NULL}, /* 80e */ + {"CROSS_CRYPTO_B2R", cross_crypto_b2r_e, "lo://00:00:00:00:00:00/0809", "lo://00:00:00:00:00:00/0839"}, /* 809 */ + {"CROSS_CRYPTO_R2B", cross_crypto_r2b_e, "lo://00:00:00:00:00:00/0829", "lo://00:00:00:00:00:00/0819"}, /* 809 */ + {"LOCAL_CRYPTO_BLACK", local_crypto_e, "lo://00:00:00:00:00:00/082a", "lo://00:00:00:00:00:00/083a"}, /* 80a */ + {"LOCAL_CRYPTO_RED", local_crypto_e, "lo://00:00:00:00:00:00/080a", "lo://00:00:00:00:00:00/081a"}, /* 80a */ + {"PROVISIONING", provisioning_e, "lo://00:00:00:00:00:00/080b", "lo://00:00:00:00:00:00/081b"}, /* 80b */ + {"PRNG_BLACK", prng_e, "lo://00:00:00:00:00:00/082c", "lo://00:00:00:00:00:00/083c"}, /* 80c */ + {"PRNG_RED", prng_e, "lo://00:00:00:00:00:00/080c", "lo://00:00:00:00:00:00/081c"}, /* 80c */ + {"BYPASS_B2R", bypass_e, "lo://00:00:00:00:00:00/080d", "lo://00:00:00:00:00:00/083d"}, /* 80d */ + {"BYPASS_R2B", bypass_e, "lo://00:00:00:00:00:00/082d", "lo://00:00:00:00:00:00/081d"}, /* 80d */ + {"CONTROL", control_e, "lo://00:00:00:00:00:00/080e", "lo://00:00:00:00:00:00/081e"}, /* 80e */ {"", noserv_e, NULL, NULL} }; @@ -176,16 +187,16 @@ int main_thread (sub_task_t *s, int id) return 1; } - CHANNEL_t pdu_channel = {0}; - CLEAR_DATA_t pdu_clear_data = {0}; - ENCRYPTED_DATA_t pdu_encrypted_data = {0}; - KEY_t pdu_key = {0}; - PRNG_PARAM_t pdu_prng_param = {0}; - RAW_DATA_t pdu_raw_data = {0}; - STATUS_t pdu_status = {0}; int rc = 0; while (1) { + CHANNEL_t pdu_channel = {0}; + CLEAR_DATA_t pdu_clear_data = {0}; + ENCRYPTED_DATA_t pdu_encrypted_data = {0}; + KEY_t pdu_key = {0}; + PRNG_PARAM_t pdu_prng_param = {0}; + RAW_DATA_t pdu_raw_data = {0}; + STATUS_t pdu_status = {0}; /* listen a message */ uint8_t msgtype = 0; @@ -304,7 +315,7 @@ int main_thread (sub_task_t *s, int id) rc = dissociate_channel_func (&pdu_channel, &pdu_status); break; case bypass_func_e: - //rc = bypass_func (&pdu_raw_data, &pdu_raw_data); + rc = bypass_func (&pdu_raw_data, &pdu_raw_data); rc = 0; break; case random_func_e: @@ -429,9 +440,14 @@ void sig_handler (int sig) { switch (sig) { case SIGINT: - exit (0); - break; case SIGTERM: + kill_all_subtasks (task, SIGTERM); + for (int i = 0; i < NBSERVICES * 2; i++) { + MOREP_Close (i); + } + if ((logfile) && (logfile != stdout)) { + fclose (logfile); + } exit (0); break; } @@ -562,32 +578,38 @@ int main (int argc, char **argv) signal(SIGTERM, sig_handler); /* main loop */ - - while ((state != shutdowning_e) && (state != error_e)) { - - /* booting and starting */ - state = initializing_e; - task_t *task = create_async_task ("CRYPTOMOD", main_thread, 0, NBSERVICES, NULL); - - while (1) { - if (state == booting_e) { - kill_all_subtasks (task, SIGTERM); - clean_crypto_memory (); - state = booting_e; - } else if (state == error_e) { - break; - } else if (state == shutdowning_e) { - kill_all_subtasks (task, SIGTERM); - clean_crypto_memory (); - state = shutdowning_e; - break; - } else { - usleep (100); + int stop = 0; + while (!stop) { + usleep (1000); + switch (state) { + case idle_e: + VERBOSE (crypto, DEBUG, PRINTF ("starting\n")); + state = initializing_e; + task = create_async_task ("CRYPTOMOD", main_thread, 0, NBSERVICES, NULL); + break; + case booting_e : + VERBOSE (crypto, DEBUG, PRINTF ("Rebooting\n")); + kill_all_subtasks (task, SIGTERM); + for (int i = 0; i < NBSERVICES * 2; i++) { + MOREP_Close (i); } + clean_crypto_memory (); + state = idle_e; + break; + case shutdowning_e: + case error_e: + VERBOSE (crypto, DEBUG, PRINTF ("shutdowning\n")); + stop = 1; + break; + default: } } /* cleaning */ + kill_all_subtasks (task, SIGTERM); + for (int i = 0; i < NBSERVICES * 2; i++) { + MOREP_Close (i); + } if ((logfile) && (logfile != stdout)) { fclose (logfile); } @@ -603,4 +625,24 @@ int main (int argc, char **argv) /* test: cryptomod.exe -v | grep 'morep verbose level not specified' */ /* test: cryptomod.exe -V | grep 'cryptomod verbose level not specified' */ +/* test: cryptomod.exe -V 3 -l script-cross_crypto_r2b-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-cross_crypto_r2b-si.log -s CROSS_CRYPTO -t lo://00:00:00:00:00:00/0819 -r lo://00:00:00:00:00:00/0829 script-cross_crypto_r2b-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ +/* test: cryptomod.exe -V 3 -l script-cross_crypto_b2r-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-cross_crypto_b2r-si.log -s CROSS_CRYPTO -t lo://00:00:00:00:00:00/0839 -r lo://00:00:00:00:00:00/0809 script-cross_crypto_b2r-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ + +/* test: cryptomod.exe -V 3 -l script-local_crypto_black-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-local_crypto_black-si.log -s LOCAL_CRYPTO -t lo://00:00:00:00:00:00/083a -r lo://00:00:00:00:00:00/082a script-local_crypto-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ + +/* test: cryptomod.exe -V 3 -l script-local_crypto_red-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-local_crypto_red-si.log -s LOCAL_CRYPTO -t lo://00:00:00:00:00:00/081a -r lo://00:00:00:00:00:00/080a script-local_crypto-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ + +/* test: cryptomod.exe -V 3 -l script-provisioning-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-provisioning-si.log -s PROVISIONING -t lo://00:00:00:00:00:00/081b -r lo://00:00:00:00:00:00/080b script-provisioning-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ + +/* test: cryptomod.exe -V 3 -l script-prng_black-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-prng_black-si.log -s PRNG -t lo://00:00:00:00:00:00/083c -r lo://00:00:00:00:00:00/082c script-prng-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ + +/* test: cryptomod.exe -V 3 -l script-prng_red-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-prng_red-si.log -s PRNG -t lo://00:00:00:00:00:00/081c -r lo://00:00:00:00:00:00/080c script-prng-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ + +/* test: cryptomod.exe -V 3 -l script-bypass_b2r-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-bypass_b2r-si.log -s BYPASS -t lo://00:00:00:00:00:00/083d -r lo://00:00:00:00:00:00/080d script-bypass-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ + +/* test: cryptomod.exe -V 3 -l script-bypass_r2b-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-bypass_r2b-si.log -s BYPASS -t lo://00:00:00:00:00:00/081d -r lo://00:00:00:00:00:00/082d script-bypass-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ + +/* test: cryptomod.exe -V 3 -l script-control-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-control-si.log -s CONTROL -t lo://00:00:00:00:00:00/081e -r lo://00:00:00:00:00:00/080e script-control-si.eth; rc=$?; sleep 1; kill -TERM $pid; test $rc -eq 0 */ +/* test: cryptomod.exe -V 3 -l script-control-cm.log & pid=$!; sleep 1; ./morep_simulator.exe -l script-control-si.log -s CONTROL -t lo://00:00:00:00:00:00/081e -r lo://00:00:00:00:00:00/080e script-control-si.eth; sleep 1;kill -TERM $pid 2>&1 | grep "No such process" */ + /* vim: set ts=4 sw=4 si et: */ diff --git a/cryptomod.h b/cryptomod.h index 64661fe..b11b6fc 100644 --- a/cryptomod.h +++ b/cryptomod.h @@ -121,6 +121,7 @@ typedef enum { shutdowning_e, /**< shutdowning state */ error_e = 255 /**< error state */ } state_t; +#define idle_e ok_e #endif /* __CRYPTOMOD_H__ */ diff --git a/function.c b/function.c index c9f1f61..402a3e7 100644 --- a/function.c +++ b/function.c @@ -28,11 +28,12 @@ #include "function.h" -state_t state = ok_e; +extern state_t state; #define NB_KEYS 255 uint8_t *keys[NB_KEYS] = {0}; +int key_lengths[NB_KEYS] = {0}; #define NB_CHANNELS 255 @@ -40,25 +41,45 @@ uint8_t channels[NB_CHANNELS] = {0}; int encrypt_func (CLEAR_DATA_t *in, ENCRYPTED_DATA_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("encrypt_func\n")); + state = working_e; + /* channel id */ + out->channel_id = in->channel_id; + + /* draw iv */ int iv_len = sizeof (out->iv); for (int i = 0, r = 0; i < iv_len; i++) { if (i % 4) { r = rand (); } - out->data[i] = r & 0xff; + out->iv[i] = r & 0xff; r >>= 8; } + /* copy bypass */ memcpy (out->bypass, in->bypass, in->bypass_len * sizeof (uint8_t)); out->bypass_len = in->bypass_len; + /* scramble with iv */ for (int i = 0; i < in->data_len; i++) { out->data[i] = (in->data[i] ^ out->iv[i % iv_len]) & 0xff; } out->data_len = in->data_len; + /* encrypt with key */ + int cid = in->channel_id; + if ((channels[cid]) && (keys[channels[cid] - 1])) { + uint8_t *key = keys[channels[cid] - 1]; + int key_len = key_lengths[channels[cid] - 1]; + for (int i = 0; i < out->data_len; i++) { + out->data[i] = (out->data[i] ^ key[i % key_len]) & 0xff; + } + } else { + VERBOSE (crypto, WARNING, PRINTF ("no key associated to channel %d\n", in->channel_id)); + } + state = ready_e; return 0; @@ -66,17 +87,38 @@ int encrypt_func (CLEAR_DATA_t *in, ENCRYPTED_DATA_t *out) int decrypt_func (ENCRYPTED_DATA_t *in, CLEAR_DATA_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("decrypt_func\n")); + state = working_e; + /* channel id */ + out->channel_id = in->channel_id; + + /* get iv */ + int iv_len = sizeof (in->iv); + + /* copy bypass */ memcpy (out->bypass, in->bypass, in->bypass_len * sizeof (uint8_t)); out->bypass_len = in->bypass_len; - int iv_len = sizeof (in->iv); + /* scramble with iv */ for (int i = 0; i < in->data_len; i++) { out->data[i] = (in->data[i] ^ in->iv[i % iv_len]) & 0xff; } out->data_len = in->data_len; + /* decrypt with key */ + int cid = in->channel_id; + if ((channels[cid]) && (keys[channels[cid] - 1])) { + uint8_t *key = keys[channels[cid] - 1]; + int key_len = key_lengths[channels[cid] - 1]; + for (int i = 0; i < out->data_len; i++) { + out->data[i] = (out->data[i] ^ key[i % key_len]) & 0xff; + } + } else { + VERBOSE (crypto, WARNING, PRINTF ("no key associated to channel %d\n", in->channel_id)); + } + state = ready_e; return 0; @@ -84,6 +126,8 @@ int decrypt_func (ENCRYPTED_DATA_t *in, CLEAR_DATA_t *out) int load_key_func (KEY_t *in, STATUS_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("load_key_func\n")); + free (keys[in->key_id]); keys[in->key_id] = (uint8_t *) calloc (1, in->key_len); memcpy (in->key, keys[in->key_id], in->key_len); @@ -95,6 +139,8 @@ int load_key_func (KEY_t *in, STATUS_t *out) int unload_key_func (KEY_t *in, STATUS_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("unload_key_func\n")); + out->status = (keys[in->key_id]) ? ok_e : error_e; free (keys[in->key_id]); keys[in->key_id] = NULL; @@ -104,6 +150,8 @@ int unload_key_func (KEY_t *in, STATUS_t *out) int erase_key_func (KEY_t *in, STATUS_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("erase_key_func\n")); + if (in->key_id != 255) { VERBOSE (crypto, WARNING, PRINTF ("incorrect ERRASE_KEY message\n")); } @@ -120,6 +168,8 @@ int erase_key_func (KEY_t *in, STATUS_t *out) int associate_channel_func (CHANNEL_t *in, STATUS_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("associate_channel_func\n")); + channels[in->channel_id] = in->key_id + 1; out->status = ok_e; @@ -129,15 +179,19 @@ int associate_channel_func (CHANNEL_t *in, STATUS_t *out) int dissociate_channel_func (CHANNEL_t *in, STATUS_t *out) { - out->status = (channels[in->key_id]) ? ok_e : error_e; + VERBOSE (crypto, TRACE, PRINTF ("dissociate_channel_func\n")); + + out->status = (channels[in->channel_id]) ? ok_e : error_e; - channels[in->key_id] = 0; + channels[in->channel_id] = 0; return 0; } int bypass_func (RAW_DATA_t *in, RAW_DATA_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("bypass_func\n")); + if (in != out) { memcpy (out, in, sizeof (RAW_DATA_t)); } @@ -147,6 +201,8 @@ int bypass_func (RAW_DATA_t *in, RAW_DATA_t *out) int random_func (PRNG_PARAM_t *in, RAW_DATA_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("random_func\n")); + switch (in->prng_id) { case 0: switch (in->seed_len) { @@ -184,6 +240,8 @@ int random_func (PRNG_PARAM_t *in, RAW_DATA_t *out) int status_func (void __attribute__ ((unused)) *in, STATUS_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("status_func\n")); + out->status = state; return 0; @@ -191,9 +249,11 @@ int status_func (void __attribute__ ((unused)) *in, STATUS_t *out) int authentification_func (RAW_DATA_t *in, RAW_DATA_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("authentification_func\n")); + char *secret_message = "Secret passphrase"; char *correct_answer = "Authenticated"; - char *wrong_answer = "Not authorized"; + char *wrong_answer = "Not authenticated"; if ((strlen (secret_message) == in->data_len) && (memcmp (secret_message, in->data, in->data_len) == 0)) { @@ -211,6 +271,8 @@ int authentification_func (RAW_DATA_t *in, RAW_DATA_t *out) int reboot_func (void __attribute__ ((unused)) *in, STATUS_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("reboot_func\n")); + state = booting_e; out->status = ok_e; @@ -219,6 +281,8 @@ int reboot_func (void __attribute__ ((unused)) *in, STATUS_t *out) int zeroize_func (void __attribute__ ((unused)) *in, STATUS_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("zeroize_func\n")); + clean_crypto_memory (); state = ready_e; @@ -229,6 +293,8 @@ int zeroize_func (void __attribute__ ((unused)) *in, STATUS_t *out) int lock_crypto_func (void __attribute__ ((unused)) *in, STATUS_t *out) { + VERBOSE (crypto, TRACE, PRINTF ("lock_crypto_func\n")); + state = shutdowning_e; out->status = ok_e; @@ -238,6 +304,8 @@ int lock_crypto_func (void __attribute__ ((unused)) *in, STATUS_t *out) void clean_crypto_memory (void) { + VERBOSE (crypto, TRACE, PRINTF ("clean_crypto_memory\n")); + for (int i = 0; i < NB_KEYS; i++) { free (keys[i]); } diff --git a/makefile b/makefile index 3923116..65f413f 100644 --- a/makefile +++ b/makefile @@ -176,7 +176,7 @@ valgrind_%: %.exe %.d: %.c $(call TITLE, "Building $@") $(CC) $(INCLUDES) -MM $< -o $@~ - echo ${<:.c=.o}: $(shell $(call GETCOMMENTS,depends, $<)) >> $@~ + echo ${<:.c=.o}: $(shell $(call GETCOMMENTS,depend, $<)) >> $@~ $(MV) $@~ $@ $(call PASS, SUCCESS) diff --git a/script-bypass-si.eth b/script-bypass-si.eth new file mode 100644 index 0000000..58ae363 --- /dev/null +++ b/script-bypass-si.eth @@ -0,0 +1,6 @@ +# Bypass test script + +SLEEP 500 + +T:BYPASS BYPASS_CROSS_ASYNC DATA=@simulator/plaintext.txt +R:BYPASS BYPASSED_CROSS_ASYNC DATA=@simulator/plaintext.txt diff --git a/script-control-si.eth b/script-control-si.eth new file mode 100644 index 0000000..bf3ce5f --- /dev/null +++ b/script-control-si.eth @@ -0,0 +1,39 @@ +# Provisioning test script + +SLEEP 500 + +# initializing state +T:CONTROL STATUS_REQ +R:CONTROL STATUS_RESP STATUS=3 + +T:CONTROL AUTHENTICATION_REQ DATA="Wrong\ passphrase" +R:CONTROL AUTHENTICATION_RESP DATA="Not\ authenticated" + +T:CONTROL AUTHENTICATION_REQ DATA="Secret\ passphrase" +R:CONTROL AUTHENTICATION_RESP DATA="Authenticated" + +# ready state +T:CONTROL STATUS_REQ +R:CONTROL STATUS_RESP STATUS=4 + +T:CONTROL REBOOT_REQ +R:CONTROL REBOOT_RESP STATUS=0 + +SLEEP 1000 + +# initializing state +T:CONTROL STATUS_REQ +R:CONTROL STATUS_RESP STATUS=3 + +T:CONTROL AUTHENTICATION_REQ DATA="Secret\ passphrase" +R:CONTROL AUTHENTICATION_RESP DATA="Authenticated" + +# ready state +T:CONTROL STATUS_REQ +R:CONTROL STATUS_RESP STATUS=4 + +T:CONTROL ZEROIZE_REQ +R:CONTROL ZEROIZE_RESP STATUS=0 + +T:CONTROL LOCK_CRYPTO_REQ +R:CONTROL LOCK_CRYPTO_RESP STATUS=0 diff --git a/script-cross_crypto_b2r-si.eth b/script-cross_crypto_b2r-si.eth new file mode 100644 index 0000000..82ad0da --- /dev/null +++ b/script-cross_crypto_b2r-si.eth @@ -0,0 +1,8 @@ +# Cross crypto test script + +SLEEP 500 + +T:CROSS_CRYPTO DECRYPT_CROSS_ASYNC CHANNELID=1 IV=00:67:c6:69:98:73:51:ff:5c:4a:ec:29 BYPASSLEN=4 BYPASS=11:22:33:44 DATA=4c:08:b4:0c:f5:53:38:8f:2f:3f:81:09:64:08:aa:06:ea:53:22:96:28:6a:8d:44:65:13:ea:49:fb:1c:3f:8c:39:29:98:4c:74:12:b4:49:f9:17:38:8f:35:39:8f:40:6e:00:e6:0c:f4:1a:25:d1:7c:1a:89:45:6c:02:a8:1d:fd:00:20:8a:39:6a:81:48:78:0e:ab:1c:eb:53:34:8a:35:39:81:46:64:47:a5:06:f6:17:38:92:39:24:98:5c:6d:49:e6:2d:ed:1a:22:df:28:2f:81:59:75:14:e6:0c:f4:1a:25:df:2f:23:98:09:61:0a:a3:1d:b8:19:24:8c:28:25:cc:44:6f:0b:a3:1a:ec:1a:34:df:2f:25:88:48:6c:02:b5:47:b8:22:24:96:2f:3b:99:4c:20:0a:a7:05:fd:00:24:9e:38:2b:cc:5a:6f:03:a7:05:fd:00:71:8b:33:38:98:46:72:49:e6:27:ed:1d:32:df:3d:6a:83:5b:6e:06:b4:0c:b8:19:24:8c:28:25:c2:09:56:02:b5:1d:f1:11:24:93:29:27:cc:4c:75:47:a4:00:fa:16:3f:9b:29:27:cc:4c:72:06:b2:45:b8:12:25:df:2e:3f:98:5b:75:0a:e6:03:ed:00:25:90:72:6a:bd:5c:69:14:b7:1c:fd:53:21:8d:39:3e:85:5c:6d:47:aa:1c:fb:07:24:8c:7c:3a:89:45:6c:02:a8:1d:fd:00:20:8a:39:64:cc:64:61:02:a5:0c:f6:12:22:df:30:2f:8f:5d:75:14:e6:07:f1:11:39:d3:7c:2e:85:4e:6e:0e:b5:1a:f1:1e:71:8c:35:3e:cc:48:6d:02:b2:49:f2:06:22:8b:33:6a:82:46:6e:4b:e6:1a:f9:14:38:8b:28:23:9f:09:61:12:a5:1d:f7:01:71:90:2e:29:85:07:0a:6d:8f:07:ec:16:36:9a:2e:6a:8a:5b:69:09:a1:00:f4:1f:30:df:35:3a:9f:5c:6d:47:af:07:b8:00:3e:9b:3d:26:89:5a:20:06:b3:0a:ec:1c:23:d1:7c:1a:84:48:73:02:aa:05:ed:00:71:92:3d:2d:82:48:20:16:b3:08:f5:5f:71:9e:30:23:9d:5c:65:13:e6:1f:f1:07:30:9a:7c:24:85:5a:6c:47:b5:00:ec:53:30:92:39:3e:c0:09:67:15:a7:1f:f1:17:30:df:2a:2f:82:4c:6e:06:b2:00:eb:53:35:96:3d:27:c2:09:51:12:af:1a:e9:06:34:df:3d:3e:cc:44:65:13:b3:1a:b8:1c:23:91:3d:38:89:05:20:04:a9:07:eb:16:32:8b:39:3e:99:5b:20:02:a8:00:f5:53:38:91:70:6a:80:5c:63:13:b3:1a:b8:1d:34:8e:29:2f:c2:09:51:12:af:1a:e9:06:34:df:38:23:8b:47:69:14:b5:00:f5:53:35:96:3d:27:cc:5a:69:13:e6:08:f5:16:25:df:31:2b:9f:5a:61:47:a3:05:fd:1a:37:9a:32:2e:cc:4c:75:0e:b5:04:f7:17:7f:df:0c:22:8d:5a:65:0b:aa:1c:eb:53:3f:8a:30:26:8d:09:73:02:ab:45:b8:15:34:8a:3b:23:8d:5d:20:12:b2:49:fa:1a:33:9a:32:2e:99:44:20:09:a3:0a:b4:53:33:96:3e:2f:82:4d:75:0a:e6:07:f7:1d:71:90:38:23:83:07:20:2e:a8:49:e8:1b:30:8d:39:3e:9e:48:2c:47:a8:00:fa:1b:71:89:35:3e:8d:4c:20:17:a9:1b:ec:12:71:8f:34:2b:9e:4c:74:15:a7:45:b8:17:3e:93:33:38:cc:47:75:09:a5:49:fe:16:23:92:39:24:98:5c:6d:47:a8:0c:e9:06:34:d3:7c:2f:98:09:6c:06:a5:00:f6:1a:30:df:28:2f:80:45:75:14:e6:04:fd:07:24:8c:7c:2b:cc:45:69:00:b3:05:f9:5d:71:ae:29:23:9f:58:75:02:e6:08:f4:1a:20:8a:39:3e:cc:48:63:47:aa:0c:f7:53:30:df:3a:38:85:47:67:0e:aa:05:f9:5d:71:b1:29:24:8f:09:70:08:b4:1d:ec:1a:25:90:2e:6a:9a:4c:68:0e:a5:1c:f4:12:71:8a:30:26:8d:44:63:08:b4:19:fd:01:7f:df:09:3e:cc:5f:65:0f:af:0a:ed:1f:30:df:30:2f:8f:5d:75:14:e6:0a:f7:1d:27:9e:30:26:85:5a:20:09:a3:18:ed:16:71:92:33:26:80:40:73:4b:e6:0c:ec:53:3c:9e:30:2f:9f:5c:61:03:a7:49:f4:1a:33:9a:2e:25:cc:59:6f:15:b2:08:b6:79 + +R:CROSS_CRYPTO DECRYPTED_CROSS_ASYNC CHANNELID=1 BYPASSLEN=4 BYPASS=11:22:33:44 DATA=@simulator/plaintext.txt + diff --git a/script-cross_crypto_r2b-si.eth b/script-cross_crypto_r2b-si.eth new file mode 100644 index 0000000..ab22531 --- /dev/null +++ b/script-cross_crypto_r2b-si.eth @@ -0,0 +1,7 @@ +# Cross crypto test script + +SLEEP 500 + +T:CROSS_CRYPTO ENCRYPT_CROSS_ASYNC CHANNELID=2 BYPASSLEN=4 BYPASS=11:22:33:44 DATA=@simulator/plaintext.txt + +R:CROSS_CRYPTO ENCRYPTED_CROSS_ASYNC CHANNELID=2 IV=00:67:c6:69:98:73:51:ff:5c:4a:ec:29 BYPASSLEN=4 BYPASS=11:22:33:44 DATA=4c:08:b4:0c:f5:53:38:8f:2f:3f:81:09:64:08:aa:06:ea:53:22:96:28:6a:8d:44:65:13:ea:49:fb:1c:3f:8c:39:29:98:4c:74:12:b4:49:f9:17:38:8f:35:39:8f:40:6e:00:e6:0c:f4:1a:25:d1:7c:1a:89:45:6c:02:a8:1d:fd:00:20:8a:39:6a:81:48:78:0e:ab:1c:eb:53:34:8a:35:39:81:46:64:47:a5:06:f6:17:38:92:39:24:98:5c:6d:49:e6:2d:ed:1a:22:df:28:2f:81:59:75:14:e6:0c:f4:1a:25:df:2f:23:98:09:61:0a:a3:1d:b8:19:24:8c:28:25:cc:44:6f:0b:a3:1a:ec:1a:34:df:2f:25:88:48:6c:02:b5:47:b8:22:24:96:2f:3b:99:4c:20:0a:a7:05:fd:00:24:9e:38:2b:cc:5a:6f:03:a7:05:fd:00:71:8b:33:38:98:46:72:49:e6:27:ed:1d:32:df:3d:6a:83:5b:6e:06:b4:0c:b8:19:24:8c:28:25:c2:09:56:02:b5:1d:f1:11:24:93:29:27:cc:4c:75:47:a4:00:fa:16:3f:9b:29:27:cc:4c:72:06:b2:45:b8:12:25:df:2e:3f:98:5b:75:0a:e6:03:ed:00:25:90:72:6a:bd:5c:69:14:b7:1c:fd:53:21:8d:39:3e:85:5c:6d:47:aa:1c:fb:07:24:8c:7c:3a:89:45:6c:02:a8:1d:fd:00:20:8a:39:64:cc:64:61:02:a5:0c:f6:12:22:df:30:2f:8f:5d:75:14:e6:07:f1:11:39:d3:7c:2e:85:4e:6e:0e:b5:1a:f1:1e:71:8c:35:3e:cc:48:6d:02:b2:49:f2:06:22:8b:33:6a:82:46:6e:4b:e6:1a:f9:14:38:8b:28:23:9f:09:61:12:a5:1d:f7:01:71:90:2e:29:85:07:0a:6d:8f:07:ec:16:36:9a:2e:6a:8a:5b:69:09:a1:00:f4:1f:30:df:35:3a:9f:5c:6d:47:af:07:b8:00:3e:9b:3d:26:89:5a:20:06:b3:0a:ec:1c:23:d1:7c:1a:84:48:73:02:aa:05:ed:00:71:92:3d:2d:82:48:20:16:b3:08:f5:5f:71:9e:30:23:9d:5c:65:13:e6:1f:f1:07:30:9a:7c:24:85:5a:6c:47:b5:00:ec:53:30:92:39:3e:c0:09:67:15:a7:1f:f1:17:30:df:2a:2f:82:4c:6e:06:b2:00:eb:53:35:96:3d:27:c2:09:51:12:af:1a:e9:06:34:df:3d:3e:cc:44:65:13:b3:1a:b8:1c:23:91:3d:38:89:05:20:04:a9:07:eb:16:32:8b:39:3e:99:5b:20:02:a8:00:f5:53:38:91:70:6a:80:5c:63:13:b3:1a:b8:1d:34:8e:29:2f:c2:09:51:12:af:1a:e9:06:34:df:38:23:8b:47:69:14:b5:00:f5:53:35:96:3d:27:cc:5a:69:13:e6:08:f5:16:25:df:31:2b:9f:5a:61:47:a3:05:fd:1a:37:9a:32:2e:cc:4c:75:0e:b5:04:f7:17:7f:df:0c:22:8d:5a:65:0b:aa:1c:eb:53:3f:8a:30:26:8d:09:73:02:ab:45:b8:15:34:8a:3b:23:8d:5d:20:12:b2:49:fa:1a:33:9a:32:2e:99:44:20:09:a3:0a:b4:53:33:96:3e:2f:82:4d:75:0a:e6:07:f7:1d:71:90:38:23:83:07:20:2e:a8:49:e8:1b:30:8d:39:3e:9e:48:2c:47:a8:00:fa:1b:71:89:35:3e:8d:4c:20:17:a9:1b:ec:12:71:8f:34:2b:9e:4c:74:15:a7:45:b8:17:3e:93:33:38:cc:47:75:09:a5:49:fe:16:23:92:39:24:98:5c:6d:47:a8:0c:e9:06:34:d3:7c:2f:98:09:6c:06:a5:00:f6:1a:30:df:28:2f:80:45:75:14:e6:04:fd:07:24:8c:7c:2b:cc:45:69:00:b3:05:f9:5d:71:ae:29:23:9f:58:75:02:e6:08:f4:1a:20:8a:39:3e:cc:48:63:47:aa:0c:f7:53:30:df:3a:38:85:47:67:0e:aa:05:f9:5d:71:b1:29:24:8f:09:70:08:b4:1d:ec:1a:25:90:2e:6a:9a:4c:68:0e:a5:1c:f4:12:71:8a:30:26:8d:44:63:08:b4:19:fd:01:7f:df:09:3e:cc:5f:65:0f:af:0a:ed:1f:30:df:30:2f:8f:5d:75:14:e6:0a:f7:1d:27:9e:30:26:85:5a:20:09:a3:18:ed:16:71:92:33:26:80:40:73:4b:e6:0c:ec:53:3c:9e:30:2f:9f:5c:61:03:a7:49:f4:1a:33:9a:2e:25:cc:59:6f:15:b2:08:b6:79 diff --git a/script-local_crypto-si.eth b/script-local_crypto-si.eth new file mode 100644 index 0000000..47270c7 --- /dev/null +++ b/script-local_crypto-si.eth @@ -0,0 +1,11 @@ +# Local crypto test script + +SLEEP 500 + +T:LOCAL_CRYPTO ENCRYPT_LOCAL_REQ CHANNELID=2 BYPASSLEN=4 BYPASS=11:22:33:44 DATA=@simulator/plaintext.txt + +R:LOCAL_CRYPTO ENCRYPTED_LOCAL_RESP CHANNELID=2 IV=00:67:c6:69:98:73:51:ff:5c:4a:ec:29 BYPASSLEN=4 BYPASS=11:22:33:44 DATA=4c:08:b4:0c:f5:53:38:8f:2f:3f:81:09:64:08:aa:06:ea:53:22:96:28:6a:8d:44:65:13:ea:49:fb:1c:3f:8c:39:29:98:4c:74:12:b4:49:f9:17:38:8f:35:39:8f:40:6e:00:e6:0c:f4:1a:25:d1:7c:1a:89:45:6c:02:a8:1d:fd:00:20:8a:39:6a:81:48:78:0e:ab:1c:eb:53:34:8a:35:39:81:46:64:47:a5:06:f6:17:38:92:39:24:98:5c:6d:49:e6:2d:ed:1a:22:df:28:2f:81:59:75:14:e6:0c:f4:1a:25:df:2f:23:98:09:61:0a:a3:1d:b8:19:24:8c:28:25:cc:44:6f:0b:a3:1a:ec:1a:34:df:2f:25:88:48:6c:02:b5:47:b8:22:24:96:2f:3b:99:4c:20:0a:a7:05:fd:00:24:9e:38:2b:cc:5a:6f:03:a7:05:fd:00:71:8b:33:38:98:46:72:49:e6:27:ed:1d:32:df:3d:6a:83:5b:6e:06:b4:0c:b8:19:24:8c:28:25:c2:09:56:02:b5:1d:f1:11:24:93:29:27:cc:4c:75:47:a4:00:fa:16:3f:9b:29:27:cc:4c:72:06:b2:45:b8:12:25:df:2e:3f:98:5b:75:0a:e6:03:ed:00:25:90:72:6a:bd:5c:69:14:b7:1c:fd:53:21:8d:39:3e:85:5c:6d:47:aa:1c:fb:07:24:8c:7c:3a:89:45:6c:02:a8:1d:fd:00:20:8a:39:64:cc:64:61:02:a5:0c:f6:12:22:df:30:2f:8f:5d:75:14:e6:07:f1:11:39:d3:7c:2e:85:4e:6e:0e:b5:1a:f1:1e:71:8c:35:3e:cc:48:6d:02:b2:49:f2:06:22:8b:33:6a:82:46:6e:4b:e6:1a:f9:14:38:8b:28:23:9f:09:61:12:a5:1d:f7:01:71:90:2e:29:85:07:0a:6d:8f:07:ec:16:36:9a:2e:6a:8a:5b:69:09:a1:00:f4:1f:30:df:35:3a:9f:5c:6d:47:af:07:b8:00:3e:9b:3d:26:89:5a:20:06:b3:0a:ec:1c:23:d1:7c:1a:84:48:73:02:aa:05:ed:00:71:92:3d:2d:82:48:20:16:b3:08:f5:5f:71:9e:30:23:9d:5c:65:13:e6:1f:f1:07:30:9a:7c:24:85:5a:6c:47:b5:00:ec:53:30:92:39:3e:c0:09:67:15:a7:1f:f1:17:30:df:2a:2f:82:4c:6e:06:b2:00:eb:53:35:96:3d:27:c2:09:51:12:af:1a:e9:06:34:df:3d:3e:cc:44:65:13:b3:1a:b8:1c:23:91:3d:38:89:05:20:04:a9:07:eb:16:32:8b:39:3e:99:5b:20:02:a8:00:f5:53:38:91:70:6a:80:5c:63:13:b3:1a:b8:1d:34:8e:29:2f:c2:09:51:12:af:1a:e9:06:34:df:38:23:8b:47:69:14:b5:00:f5:53:35:96:3d:27:cc:5a:69:13:e6:08:f5:16:25:df:31:2b:9f:5a:61:47:a3:05:fd:1a:37:9a:32:2e:cc:4c:75:0e:b5:04:f7:17:7f:df:0c:22:8d:5a:65:0b:aa:1c:eb:53:3f:8a:30:26:8d:09:73:02:ab:45:b8:15:34:8a:3b:23:8d:5d:20:12:b2:49:fa:1a:33:9a:32:2e:99:44:20:09:a3:0a:b4:53:33:96:3e:2f:82:4d:75:0a:e6:07:f7:1d:71:90:38:23:83:07:20:2e:a8:49:e8:1b:30:8d:39:3e:9e:48:2c:47:a8:00:fa:1b:71:89:35:3e:8d:4c:20:17:a9:1b:ec:12:71:8f:34:2b:9e:4c:74:15:a7:45:b8:17:3e:93:33:38:cc:47:75:09:a5:49:fe:16:23:92:39:24:98:5c:6d:47:a8:0c:e9:06:34:d3:7c:2f:98:09:6c:06:a5:00:f6:1a:30:df:28:2f:80:45:75:14:e6:04:fd:07:24:8c:7c:2b:cc:45:69:00:b3:05:f9:5d:71:ae:29:23:9f:58:75:02:e6:08:f4:1a:20:8a:39:3e:cc:48:63:47:aa:0c:f7:53:30:df:3a:38:85:47:67:0e:aa:05:f9:5d:71:b1:29:24:8f:09:70:08:b4:1d:ec:1a:25:90:2e:6a:9a:4c:68:0e:a5:1c:f4:12:71:8a:30:26:8d:44:63:08:b4:19:fd:01:7f:df:09:3e:cc:5f:65:0f:af:0a:ed:1f:30:df:30:2f:8f:5d:75:14:e6:0a:f7:1d:27:9e:30:26:85:5a:20:09:a3:18:ed:16:71:92:33:26:80:40:73:4b:e6:0c:ec:53:3c:9e:30:2f:9f:5c:61:03:a7:49:f4:1a:33:9a:2e:25:cc:59:6f:15:b2:08:b6:79 + +T:LOCAL_CRYPTO DECRYPT_LOCAL_REQ CHANNELID=3 IV=00:67:c6:69:98:73:51:ff:5c:4a:ec:29 BYPASSLEN=2 BYPASS=55:66 DATA=4c:08:b4:0c:f5:53:38:8f:2f:3f:81:09:64:08:aa:06:ea:53:22:96:28:6a:8d:44:65:13:ea:49:fb:1c:3f:8c:39:29:98:4c:74:12:b4:49:f9:17:38:8f:35:39:8f:40:6e:00:e6:0c:f4:1a:25:d1:7c:1a:89:45:6c:02:a8:1d:fd:00:20:8a:39:6a:81:48:78:0e:ab:1c:eb:53:34:8a:35:39:81:46:64:47:a5:06:f6:17:38:92:39:24:98:5c:6d:49:e6:2d:ed:1a:22:df:28:2f:81:59:75:14:e6:0c:f4:1a:25:df:2f:23:98:09:61:0a:a3:1d:b8:19:24:8c:28:25:cc:44:6f:0b:a3:1a:ec:1a:34:df:2f:25:88:48:6c:02:b5:47:b8:22:24:96:2f:3b:99:4c:20:0a:a7:05:fd:00:24:9e:38:2b:cc:5a:6f:03:a7:05:fd:00:71:8b:33:38:98:46:72:49:e6:27:ed:1d:32:df:3d:6a:83:5b:6e:06:b4:0c:b8:19:24:8c:28:25:c2:09:56:02:b5:1d:f1:11:24:93:29:27:cc:4c:75:47:a4:00:fa:16:3f:9b:29:27:cc:4c:72:06:b2:45:b8:12:25:df:2e:3f:98:5b:75:0a:e6:03:ed:00:25:90:72:6a:bd:5c:69:14:b7:1c:fd:53:21:8d:39:3e:85:5c:6d:47:aa:1c:fb:07:24:8c:7c:3a:89:45:6c:02:a8:1d:fd:00:20:8a:39:64:cc:64:61:02:a5:0c:f6:12:22:df:30:2f:8f:5d:75:14:e6:07:f1:11:39:d3:7c:2e:85:4e:6e:0e:b5:1a:f1:1e:71:8c:35:3e:cc:48:6d:02:b2:49:f2:06:22:8b:33:6a:82:46:6e:4b:e6:1a:f9:14:38:8b:28:23:9f:09:61:12:a5:1d:f7:01:71:90:2e:29:85:07:0a:6d:8f:07:ec:16:36:9a:2e:6a:8a:5b:69:09:a1:00:f4:1f:30:df:35:3a:9f:5c:6d:47:af:07:b8:00:3e:9b:3d:26:89:5a:20:06:b3:0a:ec:1c:23:d1:7c:1a:84:48:73:02:aa:05:ed:00:71:92:3d:2d:82:48:20:16:b3:08:f5:5f:71:9e:30:23:9d:5c:65:13:e6:1f:f1:07:30:9a:7c:24:85:5a:6c:47:b5:00:ec:53:30:92:39:3e:c0:09:67:15:a7:1f:f1:17:30:df:2a:2f:82:4c:6e:06:b2:00:eb:53:35:96:3d:27:c2:09:51:12:af:1a:e9:06:34:df:3d:3e:cc:44:65:13:b3:1a:b8:1c:23:91:3d:38:89:05:20:04:a9:07:eb:16:32:8b:39:3e:99:5b:20:02:a8:00:f5:53:38:91:70:6a:80:5c:63:13:b3:1a:b8:1d:34:8e:29:2f:c2:09:51:12:af:1a:e9:06:34:df:38:23:8b:47:69:14:b5:00:f5:53:35:96:3d:27:cc:5a:69:13:e6:08:f5:16:25:df:31:2b:9f:5a:61:47:a3:05:fd:1a:37:9a:32:2e:cc:4c:75:0e:b5:04:f7:17:7f:df:0c:22:8d:5a:65:0b:aa:1c:eb:53:3f:8a:30:26:8d:09:73:02:ab:45:b8:15:34:8a:3b:23:8d:5d:20:12:b2:49:fa:1a:33:9a:32:2e:99:44:20:09:a3:0a:b4:53:33:96:3e:2f:82:4d:75:0a:e6:07:f7:1d:71:90:38:23:83:07:20:2e:a8:49:e8:1b:30:8d:39:3e:9e:48:2c:47:a8:00:fa:1b:71:89:35:3e:8d:4c:20:17:a9:1b:ec:12:71:8f:34:2b:9e:4c:74:15:a7:45:b8:17:3e:93:33:38:cc:47:75:09:a5:49:fe:16:23:92:39:24:98:5c:6d:47:a8:0c:e9:06:34:d3:7c:2f:98:09:6c:06:a5:00:f6:1a:30:df:28:2f:80:45:75:14:e6:04:fd:07:24:8c:7c:2b:cc:45:69:00:b3:05:f9:5d:71:ae:29:23:9f:58:75:02:e6:08:f4:1a:20:8a:39:3e:cc:48:63:47:aa:0c:f7:53:30:df:3a:38:85:47:67:0e:aa:05:f9:5d:71:b1:29:24:8f:09:70:08:b4:1d:ec:1a:25:90:2e:6a:9a:4c:68:0e:a5:1c:f4:12:71:8a:30:26:8d:44:63:08:b4:19:fd:01:7f:df:09:3e:cc:5f:65:0f:af:0a:ed:1f:30:df:30:2f:8f:5d:75:14:e6:0a:f7:1d:27:9e:30:26:85:5a:20:09:a3:18:ed:16:71:92:33:26:80:40:73:4b:e6:0c:ec:53:3c:9e:30:2f:9f:5c:61:03:a7:49:f4:1a:33:9a:2e:25:cc:59:6f:15:b2:08:b6:79 + +R:LOCAL_CRYPTO DECRYPTED_LOCAL_RESP CHANNELID=3 BYPASSLEN=2 BYPASS=55:66 DATA=@simulator/plaintext.txt diff --git a/script-prng-si.eth b/script-prng-si.eth new file mode 100644 index 0000000..438793f --- /dev/null +++ b/script-prng-si.eth @@ -0,0 +1,9 @@ +# PRNG test script + +SLEEP 500 + +T:PRNG RANDOM_REQ PRNGID=0 SEQLEN=8 SEED=01:02:03:04 +R:PRNG RANDOM_RESP + +T:PRNG RANDOM_REQ PRNGID=0 SEQLEN=8 SEED=01:02 +R:PRNG RANDOM_RESP diff --git a/script-provisioning-si.eth b/script-provisioning-si.eth new file mode 100644 index 0000000..4a0abfa --- /dev/null +++ b/script-provisioning-si.eth @@ -0,0 +1,36 @@ +# Provisioning test script + +SLEEP 500 + +T:PROVISIONING LOAD_KEY_REQ KEYID=0 KEY=01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f:10 +R:PROVISIONING LOAD_KEY_RESP STATUS=0 + +T:PROVISIONING LOAD_KEY_REQ KEYID=1 KEY=11:12:13:14:15:16:17:18:19:1a:1b:1c:1d:1e:1f:10 +R:PROVISIONING LOAD_KEY_RESP STATUS=0 + +T:PROVISIONING UNLOAD_KEY_REQ KEYID=2 +R:PROVISIONING UNLOAD_KEY_RESP STATUS=255 + +T:PROVISIONING LOAD_KEY_REQ KEYID=2 KEY=21:22:23:24:25:26:27:28:29:2a:2b:2c:2d:2e:2f:10 +R:PROVISIONING LOAD_KEY_RESP STATUS=0 + +T:PROVISIONING UNLOAD_KEY_REQ KEYID=2 +R:PROVISIONING UNLOAD_KEY_RESP STATUS=0 + +T:PROVISIONING ERASE_KEY_REQ KEYID=255 +R:PROVISIONING ERASE_KEY_RESP STATUS=0 + +T:PROVISIONING LOAD_KEY_REQ KEYID=1 KEY=11:12:13:14:15:16:17:18:19:1a:1b:1c:1d:1e:1f:10 +R:PROVISIONING LOAD_KEY_RESP STATUS=0 + +T:PROVISIONING UNLOAD_KEY_REQ KEYID=0 +R:PROVISIONING UNLOAD_KEY_RESP STATUS=255 + +T:PROVISIONING ASSOCIATE_CHANNEL_REQ CHANNELID=0 KEYID=1 +R:PROVISIONING ASSOCIATE_CHANNEL_RESP STATUS=0 + +T:PROVISIONING DISSOCIATE_CHANNEL_REQ CHANNELID=0 KEYID=255 +R:PROVISIONING DISSOCIATE_CHANNEL_RESP STATUS=0 + +T:PROVISIONING DISSOCIATE_CHANNEL_REQ CHANNELID=0 KEYID=255 +R:PROVISIONING DISSOCIATE_CHANNEL_RESP STATUS=255