-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test script for RSA Encrypt/Decrypt concurrency test using Trus…
…t M provider (#75) 1)Added more debugging message printout 2)Added test script for RSA Encrypt/Decrypt concurrency test using Trust M provider 3)updated the dependency
- Loading branch information
Showing
6 changed files
with
45 additions
and
19 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
provider-scripts/rsa_keygen_and_decrypt/RSA_encrypt_decrypt_concurrency_test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
source config.sh | ||
|
||
echo "input1" >mydata1.txt | ||
echo "input2" >mydata2.txt | ||
|
||
for i in $(seq 1 5); do | ||
echo "$(date +'%m/%d:%r') --------------> test $i" | ||
set +e | ||
rm *.enc | ||
rm *.dec | ||
set -e | ||
echo "-----> Encrypt with public key using Trust M provider" | ||
openssl pkeyutl -provider trustm_provider -inkey 0xe0fd:^ -encrypt -in mydata1.txt -out mydata1.enc & | ||
P1=$! | ||
echo "-----> Encrypt with public key using Trust M provider" | ||
openssl pkeyutl -provider trustm_provider -inkey 0xe0fd:^ -encrypt -in mydata2.txt -out mydata2.enc & | ||
P2=$! | ||
|
||
wait $P1 $P2 | ||
|
||
echo "-----> Decrypt with private key using Trust M provider" | ||
openssl pkeyutl -provider trustm_provider -inkey 0xe0fd:^ -decrypt -in mydata1.enc -out mydata1.dec & | ||
P1=$! | ||
echo "-----> Decrypt with private key using Trust M provider" | ||
openssl pkeyutl -provider trustm_provider -inkey 0xe0fd:^ -decrypt -in mydata2.enc -out mydata2.dec & | ||
P2=$! | ||
|
||
wait $P1 $P2 | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters