NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Build OpenSSL for Sitara
Contents
Introduction[edit]
This is the third of three articles written as a how-to guide for enabling hardware accelerated cryptographic functions for OpenSSL version 1.0.0d.
The first and second articles describe how to patch the Linux kernel with Open Crypto Framework (OCF-Linux) and how to build and use the crypto module which accesses the hardware accelerators.
This article describes how to build and run OpenSSL version 1.0.0d with support for the hardware accelerated cryptographic functions available on the 37xx and 35xx general purpose (GP) device family.
Assumptions[edit]
- Linux host development system. Ubuntu 10.04 running in a VMWare machine is used in the examples here
- Sitara SDK for the AM37xx or AM35xx (this includes the kernel source code, root file system and the cross-compiler tools)
- Shiva EVM (AM3517) or OMAP3 Rev G EVM (AM37x). For examples here the board uses the AM3703 processor module
- Source tarball from openssl.org (openssl-1.0.0d.tar.gz)
For the rest of this article it is assumed that the Sitara SDK has been installed on the Linux host development system. The root file system for the EVM lies in a sub-directory of the SDK called targetNFS and the board performs a NFS mount of this directory.
Procedure to Build/Test OpenSSL[edit]
Install OpenSSL 1.0.0d in the Host Development System[edit]
Place the OpenSSL tarball a convenient directory on the Linux host and extract it in place.
Configure OpenSSL[edit]
There is a README file and INSTALL file under the openssl-1.0.0d directory. The instructions under the INSTALL file do NOT apply to the situation for cross-compiling with an ARM target. Do NOT run the ./configure or ./Configure scripts. Skip the instructions in the INSTALL file and just do the following:
Edit the Makefile and make the following changes:
INSTALL_PREFIX=[path to NFS] CFLAG= -O -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS CC= arm-arago-linux-gnueabi-gcc AR= arm-arago-linux-gnueabi-ar $(ARFLAGS) r RANLIB= arm-arago-linux-gnueabi-ranlib NM= arm-arago-linux-gnueabi-nm
The path in the INSTALL_PREFIX parameter should match the path in the host dev system for the root of the NFS mount to be used by the EVM target.
Patch OpenSSL[edit]
OpenSSL needs a small modification to make SHA and MD5 operations work with large files when using the AM3x HW accelerators.
File:0002-Modify-eng cryptodev.c-to-make-SHA1-and-MD5-work-wit.patch
Compile and Install into target[edit]
To ensure that the OpenSSL Makefile will find the cross-compile tools from the SDK, source the environment setup script from the SDK. The prompt will change to indicate that the tools are now in the current path.
user@usergt-laptop:~/OpenSSL/openssl-1.0.0d$ user@usergt-laptop:~/OpenSSL/openssl-1.0.0d$ source ~/ti-sdk-am37x-evm-05.04.00.00/linux-devkit/environment-setup [linux-devkit]:~/OpenSSL/openssl-1.0.0d>
Now just run make and then make install. The make install command will place OpenSSL in the usr/local/ssl sub-directory of the NFS mount. This will then be the /usr/local/ssl sub-directory of the target system after the target boots up.
When the target boots and mounts this NFS, the openssl app and collateral will be under /usr/local/ssl. From the target perspective this will look like the following:
root@arago:/usr/local/ssl# ls -l drwxr-xr-x 2 1000 1000 4096 Jun 23 2010 bin drwxr-xr-x 2 1000 1000 4096 Jun 23 2010 certs drwxr-xr-x 3 1000 1000 4096 Jun 23 2010 include drwxr-xr-x 4 1000 1000 4096 Jun 23 2010 lib drwxr-xr-x 6 1000 1000 4096 Jun 23 2010 man drwxr-xr-x 2 1000 1000 4096 Jun 23 2010 misc -rw-r--r-- 1 1000 1000 10819 Jun 23 2010 openssl.cnf drwxr-xr-x 2 1000 1000 4096 Jun 23 2010 private root@arago:/usr/local/ssl#
And the openssl app will be in the bin sub-directory:
root@arago:/usr/local/ssl# cd bin/ root@arago:/usr/local/ssl/bin# ls -l -rwxr-xr-x 1 1000 1000 4261 Jun 23 2010 c_rehash -rwxr-xr-x 1 1000 1000 2142934 Jun 23 2010 openssl root@arago:/usr/local/ssl/bin#
Modify path to OpenSSL[edit]
The Sitara SDK contains an OpenSSL executable at the location /usr/bin/openssl in the root filesystem. So in the Linux host this is at /home/[user]/ti-[SDK]/targetNFS/usr/bin/openssl. This needs to be changed so that calls to OpenSSL go to the new executable in /usr/local/bin/openssl.
First save the existing openssl executable. Then make a soft link to the new new version.
[linux-devkit]:~/ti-sdk-am37x-evm-05.04.00.00/targetNFS/usr/bin> mv openssl openssl.old [linux-devkit]:~/ti-sdk-am37x-evm-05.04.00.00/targetNFS/usr/bin> ln -s /usr/local/ssl/bin/openssl openssl [linux-devkit]:~/ti-sdk-am37x-evm-05.04.00.00/targetNFS/usr/bin> [linux-devkit]:~/ti-sdk-am37x-evm-05.04.00.00/targetNFS/usr/bin> ls -l openssl lrwxrwxrwx 1 root root 26 2012-03-07 15:34 openssl -> /usr/local/ssl/bin/openssl [linux-devkit]:~/ti-sdk-am37x-evm-05.04.00.00/targetNFS/usr/bin>
Now when the board boots up any calls to the executable openssl will go to the newly compiled version instead of the one included in the SDK.
Testing[edit]
Speed Tests[edit]
Now it is possible to run speed tests on the target EVM. The log below shows the speed test executed without the ocf driver loaded and then again after installing the module. So the first speed test below shows the performance without the hardware acceleration. The command is the same because OpenSSL simply reverts to a pure SW implementation if the hardware accelerators are not available. The time function is used to wrap the openssl application and measure time and bandwidth for the application
root@arago:/usr/local/ssl/bin# time -v openssl speed -evp aes-128-cbc -engine cryptodev engine "cryptodev" set. Doing aes-128-cbc for 3s on 16 size blocks: 111841 aes-128-cbc's in 2.60s Doing aes-128-cbc for 3s on 64 size blocks: 107004 aes-128-cbc's in 2.56s Doing aes-128-cbc for 3s on 256 size blocks: 15170 aes-128-cbc's in 0.46s Doing aes-128-cbc for 3s on 1024 size blocks: 14993 aes-128-cbc's in 0.45s Doing aes-128-cbc for 3s on 8192 size blocks: 4706 aes-128-cbc's in 0.28s OpenSSL 1.0.0a 1 Jun 2010 built on: Tue Sep 14 14:22:46 CDT 2010 options:bn(32,32) rc4(ptr,int) des(idx,cisc,2,long) aes(partial) idea(int) blowfish(idx) compiler: arm-none-linux-gnueabi-gcc -O -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-cbc 596.49k 2282.75k 1294.51k 5117.61k 12850.52k Command being timed: "openssl speed -evp aes-128-cbc -engine cryptodev" User time (seconds): 0.28 System time (seconds): 6.15 Percent of CPU this job got: 41% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 15.44s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 5440 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 30 Minor (reclaiming a frame) page faults: 326 Voluntary context switches: 34919 Involuntary context switches: 219132 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:/usr/local/ssl/bin# root@arago:/usr/local/ssl/bin# time -v openssl speed -evp aes-192-cbc -engine cryptodev engine "cryptodev" set. Doing aes-192-cbc for 3s on 16 size blocks: 111771 aes-192-cbc's in 2.60s Doing aes-192-cbc for 3s on 64 size blocks: 102088 aes-192-cbc's in 2.55s Doing aes-192-cbc for 3s on 256 size blocks: 14859 aes-192-cbc's in 0.45s Doing aes-192-cbc for 3s on 1024 size blocks: 15148 aes-192-cbc's in 0.45s Doing aes-192-cbc for 3s on 8192 size blocks: 4511 aes-192-cbc's in 0.27s OpenSSL 1.0.0a 1 Jun 2010 built on: Tue Sep 14 14:22:46 CDT 2010 options:bn(32,32) rc4(ptr,int) des(idx,cisc,2,long) aes(partial) idea(int) blowfish(idx) compiler: arm-none-linux-gnueabi-gcc -O -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-192-cbc 596.11k 2177.88k 1267.97k 5170.52k 12318.04k Command being timed: "openssl speed -evp aes-192-cbc -engine cryptodev" User time (seconds): 0.24 System time (seconds): 6.10 Percent of CPU this job got: 42% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 15.04s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 5440 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 356 Voluntary context switches: 34528 Involuntary context switches: 214123 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:/usr/local/ssl/bin# root@arago:/usr/local/ssl/bin# time -v openssl speed -evp aes-256-cbc -engine cryptodev engine "cryptodev" set. Doing aes-256-cbc for 3s on 16 size blocks: 112338 aes-256-cbc's in 2.60s Doing aes-256-cbc for 3s on 64 size blocks: 100421 aes-256-cbc's in 2.39s Doing aes-256-cbc for 3s on 256 size blocks: 14423 aes-256-cbc's in 0.42s Doing aes-256-cbc for 3s on 1024 size blocks: 16441 aes-256-cbc's in 0.50s Doing aes-256-cbc for 3s on 8192 size blocks: 3982 aes-256-cbc's in 0.23s OpenSSL 1.0.0a 1 Jun 2010 built on: Tue Sep 14 14:22:46 CDT 2010 options:bn(32,32) rc4(ptr,int) des(idx,cisc,2,long) aes(partial) idea(int) blowfish(idx) compiler: arm-none-linux-gnueabi-gcc -O -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-256-cbc 599.14k 2142.31k 1230.76k 5611.86k 10873.51k Command being timed: "openssl speed -evp aes-256-cbc -engine cryptodev" User time (seconds): 0.32 System time (seconds): 5.85 Percent of CPU this job got: 41% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 15.05s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 5440 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 356 Voluntary context switches: 46666 Involuntary context switches: 201214 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:/usr/local/ssl/bin# root@arago:/usr/local/ssl/bin# time -v openssl speed -evp des-cbc -engine cryptodev engine "cryptodev" set. Doing des-cbc for 3s on 16 size blocks: 111207 des-cbc's in 2.59s Doing des-cbc for 3s on 64 size blocks: 106106 des-cbc's in 2.52s Doing des-cbc for 3s on 256 size blocks: 15585 des-cbc's in 0.46s Doing des-cbc for 3s on 1024 size blocks: 15965 des-cbc's in 0.48s Doing des-cbc for 3s on 8192 size blocks: 4809 des-cbc's in 0.29s OpenSSL 1.0.0a 1 Jun 2010 built on: Tue Sep 14 14:22:46 CDT 2010 options:bn(32,32) rc4(ptr,int) des(idx,cisc,2,long) aes(partial) idea(int) blowfish(idx) compiler: arm-none-linux-gnueabi-gcc -O -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes des-cbc 593.10k 2263.59k 1329.92k 5449.39k 13131.78k Command being timed: "openssl speed -evp des-cbc -engine cryptodev" User time (seconds): 0.25 System time (seconds): 6.10 Percent of CPU this job got: 42% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 15.04s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 5440 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 356 Voluntary context switches: 40137 Involuntary context switches: 213806 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:/usr/local/ssl/bin# root@arago:/usr/local/ssl/bin# time -v openssl speed -evp des3 -engine cryptodev engine "cryptodev" set. Doing des-ede3-cbc for 3s on 16 size blocks: 112762 des-ede3-cbc's in 2.62s Doing des-ede3-cbc for 3s on 64 size blocks: 101369 des-ede3-cbc's in 1.69s Doing des-ede3-cbc for 3s on 256 size blocks: 14209 des-ede3-cbc's in 0.42s Doing des-ede3-cbc for 3s on 1024 size blocks: 15949 des-ede3-cbc's in 0.48s Doing des-ede3-cbc for 3s on 8192 size blocks: 3973 des-ede3-cbc's in 0.24s OpenSSL 1.0.0a 1 Jun 2010 built on: Tue Sep 14 14:22:46 CDT 2010 options:bn(32,32) rc4(ptr,int) des(idx,cisc,2,long) aes(partial) idea(int) blowfish(idx) compiler: arm-none-linux-gnueabi-gcc -O -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes des-ede3-cbc 601.40k 2162.54k 1212.50k 5443.93k 10848.94k Command being timed: "openssl speed -evp des3 -engine cryptodev" User time (seconds): 0.29 System time (seconds): 5.17 Percent of CPU this job got: 36% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 15.05s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 5440 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 356 Voluntary context switches: 135308 Involuntary context switches: 113232 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:/usr/local/ssl/bin#
Encryt/Decryt Tests[edit]
To test encryption/decryption some data files must be created. In the following example four random files are created with the dd command. The sizes of these files are 1k, 10k, 1M, and 100M. The performance of crypto varies greatly with file size.
root@arago:~# dd if=/dev/urandom of=smallrnddata bs=1024 count=1 root@arago:~# dd if=/dev/urandom of=medrnddata bs=1024 count=10 root@arago:~# dd if=/dev/urandom of=bigrnddata bs=1024 count=1024 root@arago:~# dd if=/dev/urandom of=hugernddata bs=1048576 count=100
Now each file is encrypted and then decrypted and compared to the original file. The encrypted file ends in .enc. The decrypted files end in dec.
root@arago:~# time -v openssl enc -aes-128-cbc -engine cryptodev -in smallrnddata -out smallrnddata.enc -pass pass:password engine "cryptodev" set. Command being timed: "openssl enc -aes-128-cbc -engine cryptodev -in smallrnddata -out smallrnddata.enc -pass pass:password" User time (seconds): 0.03 System time (seconds): 0.00 Percent of CPU this job got: 44% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 0.07s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4480 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 2 Minor (reclaiming a frame) page faults: 294 Voluntary context switches: 24 Involuntary context switches: 3 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:~# time -v openssl enc -aes-128-cbc -engine cryptodev -in medrnddata -out medrnddata.enc -pass pass:password engine "cryptodev" set. Command being timed: "openssl enc -aes-128-cbc -engine cryptodev -in medrnddata -out medrnddata.enc -pass pass:password" User time (seconds): 0.03 System time (seconds): 0.00 Percent of CPU this job got: 59% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 0.05s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4496 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 297 Voluntary context switches: 15 Involuntary context switches: 2 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:~# time -v openssl enc -aes-128-cbc -engine cryptodev -in bigrnddata -out bigrnddata.enc -pass pass:password engine "cryptodev" set. Command being timed: "openssl enc -aes-128-cbc -engine cryptodev -in bigrnddata -out bigrnddata.enc -pass pass:password" User time (seconds): 0.02 System time (seconds): 0.13 Percent of CPU this job got: 26% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 0.59s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4496 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 297 Voluntary context switches: 274 Involuntary context switches: 260 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:~# time -v openssl enc -aes-128-cbc -engine cryptodev -in hugernddata -out hugernddata.enc -pass pass:password engine "cryptodev" set. Command being timed: "openssl enc -aes-128-cbc -engine cryptodev -in hugernddata -out hugernddata.enc -pass pass:password" User time (seconds): 0.39 System time (seconds): 6.65 Percent of CPU this job got: 12% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 57.01s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4496 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 297 Voluntary context switches: 26416 Involuntary context switches: 291 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:~# root@arago:~# time -v openssl enc -d -aes-128-cbc -engine cryptodev -in smallrnddata.enc -pass pass:password > smallrnddatadec engine "cryptodev" set. Command being timed: "openssl enc -d -aes-128-cbc -engine cryptodev -in smallrnddata.enc -pass pass:password" User time (seconds): 0.03 System time (seconds): 0.00 Percent of CPU this job got: 43% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 0.07s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4400 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 2 Minor (reclaiming a frame) page faults: 289 Voluntary context switches: 18 Involuntary context switches: 1 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:~# time -v openssl enc -d -aes-128-cbc -engine cryptodev -in medrnddata.enc -pass pass:password > medrnddatadec engine "cryptodev" set. Command being timed: "openssl enc -d -aes-128-cbc -engine cryptodev -in medrnddata.enc -pass pass:password" User time (seconds): 0.01 System time (seconds): 0.01 Percent of CPU this job got: 60% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 0.05s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4432 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 293 Voluntary context switches: 15 Involuntary context switches: 4 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:~# time -v openssl enc -d -aes-128-cbc -engine cryptodev -in bigrnddata.enc -pass pass:password > bigrnddatadec engine "cryptodev" set. Command being timed: "openssl enc -d -aes-128-cbc -engine cryptodev -in bigrnddata.enc -pass pass:password" User time (seconds): 0.03 System time (seconds): 0.03 Percent of CPU this job got: 16% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 0.41s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4432 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 293 Voluntary context switches: 389 Involuntary context switches: 8 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:~# time -v openssl enc -d -aes-128-cbc -engine cryptodev -in hugernddata.enc -pass pass:password > hugernddatadec engine "cryptodev" set. Command being timed: "openssl enc -d -aes-128-cbc -engine cryptodev -in hugernddata.enc -pass pass:password" User time (seconds): 0.45 System time (seconds): 6.67 Percent of CPU this job got: 12% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 55.18s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4432 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 293 Voluntary context switches: 26514 Involuntary context switches: 233 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@arago:~# root@arago:~# time diff smallrnddata smallrnddatadec real 0m 0.01s user 0m 0.00s sys 0m 0.00s root@arago:~# time diff medrnddata medrnddatadec real 0m 0.02s user 0m 0.00s sys 0m 0.00s root@arago:~# time diff bigrnddata bigrnddatadec real 0m 0.50s user 0m 0.00s sys 0m 0.02s root@arago:~# time diff hugernddata hugernddatadec real 0m 48.92s user 0m 0.39s sys 0m 2.30s root@arago:~# ls -l drwxrwxrwx 8 1000 1000 4096 Jul 20 2010 Apps -rw-r--r-- 1 root root 1048576 Aug 13 2010 bigrnddata -rw-r--r-- 1 root root 1048608 Aug 13 2010 bigrnddata.enc -rw-r--r-- 1 root root 1048576 Aug 13 2010 bigrnddatadec drwxr-xr-x 2 1000 1000 4096 Jul 23 2010 crypto-tools -rw-r--r-- 1 1000 1000 15805 Jun 29 2010 crypto-tools-20100325.tar.gz -rw-r--r-- 1 root root 104857600 Aug 13 2010 hugernddata -rw-r--r-- 1 root root 104857632 Aug 13 2010 hugernddata.enc -rw-r--r-- 1 root root 104857600 Aug 13 2010 hugernddatadec -rwxrwxrwx 1 1000 1000 611 Aug 3 2010 loop.sh -rw-r--r-- 1 root root 10240 Aug 13 2010 medrnddata -rw-r--r-- 1 root root 10272 Aug 13 2010 medrnddata.enc -rw-r--r-- 1 root root 10240 Aug 13 2010 medrnddatadec drwxr-xr-x 3 1000 1000 4096 Aug 3 2010 omap3_crypto -rwxrwxrwx 1 1000 1000 9024 Aug 3 2010 omap3_crypto.tar.gz drwxrwxr-x 3 1000 1000 4096 Jul 23 2010 omap3_crypto_old drwxr-xr-x 23 1000 1000 4096 Jul 16 2010 openssl-0.9.8n drwxr-xr-x 22 1000 1000 4096 Jul 19 2010 openssl-1.0.0a -rw-r--r-- 1 1000 1000 4015794 Jun 11 2010 openssl-1.0.0a.tar.gz -rw-r--r-- 1 root root 1024 Aug 13 2010 smallrnddata -rw-r--r-- 1 root root 1056 Aug 13 2010 smallrnddata.enc -rw-r--r-- 1 root root 1024 Aug 13 2010 smallrnddatadec root@arago:~#
The diff function shows that the decrypted file is identical to the original file.