‘simpleserial-aes.c’ code receive a letter through the getch() function and use ‘x’,‘k’,‘p’ as a separator to communicate.
When it contains ‘x’,‘k’ and ‘p’ to the actual plaintext and key, I can’t find the code that determines whether ‘x’,‘k’,‘p’ use as data or a separator.
I would like to know if I can distinguish.
Question 2>
‘simple serial-aes.c’ has a code that turns the state into ‘IDLE’ by using the separator ‘x’ in the first if statement.
Also, the code changes ‘KEY’ or ‘PLAIN’ state to ‘IDLE’ state when I get ‘x’.
Nevertheless, why should I convert to ‘IDLE’ status when it comes to character named ‘x’ in the first if statement?
If the question is somewhat difficult to understand, please understand that I am by the lack of English.
This is a bit of a “failsafe”. Basically no matter what, when the system receives an ‘x’ it goes back to the idle state. This is an easy way of getting things back to some known state.
Ah - the plaintext/key are assumed to be in hex. So for example it’s looking for a string that has “k000102030405060708090A0B0C0D0E0F” (followed by a newline). If you wanted to represent that as a UNICODE/ASCII string it would come up as something else. Because it’s limited to the ASCII characters, the key/plaintext won’t have those special characters in it!
What do you think of this one that you add some comments about this issue?
Oh, and we have another question.
[another question]
We can analyze the code “simpleserial-aes.c”. but we can’t understanding the mechanism of sending serial message from “CWCapture.pyw”. So can you explain where the code is?