View unanswered posts | View active topics It is currently Tue Jun 19, 2018 9:03 pm



Reply to topic  [ 1 post ] 
 TLS/SSL Security with wolfSSL 
Author Message

Joined: Mon Jan 04, 2016 5:58 pm
Posts: 2
When looking for a security library to use while working with devkitPro toolchains check out wolfSSLs port. The embedded, lightweight TLS/SSL libraries low memory footprint size allows for efficient use of security while leaving plenty of room for the game itself. The low memory size of wolfSSL is something that has been perfected in the IoT realm and those benefits that are seen in IoT transfer nicely into the game development realm. We have updated and verified the port to devkitPPC with the most recent release of wolfSSL.

An example of building a project with its use would be as follows

Download and build wolfSSL (https://wolfssl.com/wolfSSL/download/downloadForm.php) with
Code:
./configure --disable-shared CC=/dir to/devkitPPC/bin/powerpc-eabi-gcc --host=ppc --enable-singlethreaded RANLIB=/dir to/devkitPPC/bin/powerpc-eabi-ranlib CFLAGS="-DDEVKITPRO -DNO_WRITEV"

make src/libwolfssl.la


Add created library and path to header files for compiling devkitPro project
Code:
LIBS := /dir to/wolfssl_root/src/.libs/libwolfssl.a
CFLAGS := -I/dir to/wolfssl_root/


Pseudocode example of using wolfSSL API in devkitPPC project
Code:
#include <gccore.h>
#include <wiiuse/wpad.h>
...

#include <wolfssl/options.h>
#include <wolfssl/wolfcrypt/aes.h>

/* function built and used by project with devkitPPC */
int foo() {
   Aes aes;
   byte key[] = {1, 2, …}; /* fill with desired key and iv */
   byte iv[] = {1, 2, …};

   byte cipher[AES-BLOCK-SIZE];
   byte plain[AES-BLOCK-SIZE];
   int ret;

   ret = wc_AesSetKey(&aes, key, AES-BLOCK-SIZE, iv, AES_ENCRYPTION);
        /* handle return value */
        ....

   ret = wc_AesCbcEncrypt(&enc, cipher, msg, AES-BLOCK-SIZE);
        /* handle return value */
        ....

   return 0;
}


For licensing and use of wolfSSL in a project, look at https://www.wolfssl.com/wolfSSL/License.html


Mon Jan 04, 2016 9:50 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads