This is my fifth week in AESTE. Yes !! I had solved the 4096 RSA key encrytption problem. The solution is change the FP_MAX_BITS to 8192, then all the problems solved. This week my task is to generate a 1024 RSA key by PIC32, generate serial number and MAC address.
Generate 1024 RSA key by PIC32:
PIC32 need to generate 1024 RSA key and print the public key. There are few problems I faced when I doing this.
- I found that my code will hang when run until this code >> wc_MakeRsaKey. The reason of this is the task size for the application is too small. When I change the task size from 8192 to 10240, it worked.
- Every time we print the 1024 public key, it will start from —-BeginPublicKey—– and end with —-EndPublicKey—–. However, I just need the key and I need to remove these 2 sentences. Therefore, I use the strncpy function to do it, the string to print out should end with “AB”. However, after “AB” the PIC32 still print out few weird character.
Generate Serial number and MAC address:
In order to generate the Serial number and MAC address, I have to get the DEVSN0 and DEVSN1 and use MD5 to provide a hash values. Then use Base16 to encode and print it out. Below are the problem I facing this week.
- The MPLAB X IDE is disable the Base16 by default. In order to enable it, we have to define either 3 of the function.
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS)
However, when I try to define 3 of this, there are a lot of other error message show in the output.
Conclusion:
This week my progress is quite slow, many of task having some problems. This is because my programming basic is not strong enough, I hope all of these problems can solve by next week.
0 Comments