A Brief Guide to User/Hacker of VIA Padlock SDK    

Author : Danial Miao
Date   : 2004-06-16

1.Source tree structure

via_padlock_sdk-1.0.0-src/
			 |-- demo                    demo directory
			 |   |-- makefile
			 |   `-- padlock_demo.c
			 |-- include
			 |   |-- via_ace.h
			 |   `-- padlock.h           API header file
			 |-- lib
			 |   `-- makefile            scripts to create and install the shared library of Padlock SDK
			 |-- makefile
			 |-- readme
			 `-- src
			     |-- padlock_aes.c  utilities to manipulate the rijndael cryptographic keys for VIA ACE
                             |-- padlock_rng.c  utilities to use VIA random number generator  
			     |-- makefile
			     `-- padlock.c           Core file implementating VIA Padlock SDK

2.How to build install and test VIA Padlock SDK

   2.1. Extend the tarball file under certain directory such as /root/

       [root@localhost root]# tar xvfz via_padlock_sdk-1.0.0-src.tar.gz

   2.2. Enter directory via_padlock_sdk-1.0.0-src build and install it:

       [root@localhost root]# cd via_padlock_sdk-1.0.0-src

       [root@localhost via_padlock_sdk-1.0.0-src]# make ; make install
  
   2.3. Test Padlock SDK API with padlock_demo:

       [root@localhost via_padlock_sdk-1.0.0-src]# cd demo

       [root@localhost demo]# make

       [root@localhost demo]# ./padlock_demo

 3.How to hack and add your codes for VIA Padlock SDK

   3.1. Add the declarations of your new API functions in file include/padlock.h

   3.2. Implement these newly added API functions in file src/padlock.c or add your files to support 
   
        the implementation of your newly added APIs under the same subdirectory with padlock.c
 
   3.3. Rebuild and reinstall your new VIA Padlock SDK with commands: make ; make install

   3.4. Add new test items in file demo/padlock_demo.c then rebuild it , run it 

        and see if your newly added APIs work well with your VIA processors.
