#!/usr/bin/perl -w # # Demo script accompanying TD09 presentation # Developing and Deploying Securely # # This script is for the Crypto Framework portion of the talk v1.0.2 # use demotools; demotools::setprompt("[global 1]: \$"); #-------------------------------------------------- # main # slide 41 system("clear"); demotools::cmd("cryptoadm list"); # slide 46 system("clear"); demotools::cmd("man pkcs11_softtoken"); # slide 48 digest example system("clear"); demotools::cmd("digest -l"); printf("\n"); demotools::cmd("digest -a sha256 /etc/passwd"); # slide 48 - encryption example system("clear"); demotools::cmd("encrypt -l"); printf("\n"); demotools::cmd("pktool genkey keystore=file keytype=aes keylen=192 outkey=key"); printf("\n"); demotools::cmd("encrypt -k key -a aes -i /etc/passwd -o passwd.enc"); printf("\n"); demotools::cmd("od -xc passwd.enc \| head"); # slide 50 system("clear"); demotools::cmd("modinfo \| grep -i swrand"); printf("\n"); demotools::cmd("cryptoadm list -mv"); #--------------------------------------------------