This is my sixth week in AESTE. Time flies really quickly, it is half of my internship duration. Now look back my last week problems, I have solved the base16 problem by directly copy the base16 function to my USB.c instead to define OPENSSL_EXTRA || HAVE_WEBSERVER ||  HAVE_FIPS. This is the most easiest way to solve the problem. Next, I had made the function (base16 encode serial number and mac, generate 512 RSA key for board, encrypt all information by 4096 RSA key) work one by one, now I have to combine all the information that I need and put it in JSON format.

There are a lot of methods to put all information to JSON format. For example: memcpy, strstr and sprintf. Dr Shawn said there are a lot of methods to solve a problem. However, as a Engineer we need to decide which is the best solution. Therefore, I try both of the method strstr and sprintf to test which will consume more memory. After tested, sprintf is just larger by 648 bytes compare to strstr. At the end we had decided to use sprintf due to it make our code look nicer and only few hundred bytes different. After that, I restructure the code, for the code only run once put in Initialize part. For the USB_Tasks only do decode and encryption.


Next week I’m going to store the information to Flash Memory, so that we can just generate the board RSA key when the board never generate before. If the board has the RSA key, we can direct read from Flash Memory. That all for my sixth week in AESTE, keep going on !💪💪



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.