No problem, we are currently looking into making what you are doing easier to do. Until then, I can give you a few things that might help you solve it yourself.
Before you do any of my suggested debugging, try running self.target.textlength = 8 aftering running all the setup and before you press capture.
Debug stuff and extra information:
The encryption monitor sets the text based on if the expected is not None if it is None then it sets it to ?, which is what you are seeing. This can be seen here.
The getExpected function in the SimpleSerial.py file is what gives the Encryption monitor its text.
They are connect through a signal, this is not as important as you have no reason to change the signal connections.
You problem is most likely that the if statements you wrote still end up returning None. Easiest way to debug: change the three return statements you have into known return values so you know which one gets executed. Note: the Encryption status monitor expects a bytearray. Like this:
351 def getExpected(self):
352 """Based on key & text get expected if known, otherwise returns None"""
353 if self.textLen() == 16:
354 return bytearray()
355 #return TargetTemplate.getExpected(self)
356 elif self.textLen() == 8:
357 roundkeys = Present_runsfast_keyschedule(self.key)
358 plaintext = np.copy(self.input)
359 return bytearray([255, 255])
361 return bytearray([255, 255, 255])
You can then look at you encryption status monitor and it will either say FF, FF FF, or FF FF FF. FF is the hex representation of the integer 255. You now know which populates the expected field. If it is FF (the first if statement) then it is because self.testlen() still evaluates to 16, if it is the second one (FF FF) we know that your encryption algorithm may be returning None, hence your previous result of ?. And if it is the else statement (FF FF FF) the self.textlen is evaluating to something other than 8 and 16.
If you decide to try it on your own you can share the results with me and I can help further if you need it.