Skip to content

Commit

Permalink
cryptoTimings.txt produced from Python/SWIG code
Browse files Browse the repository at this point in the history
Run on an Intel Core i5 2500K (not overclocked)
Testing with the exact methods that would be used
in client software using BitcoinArmory as a base.

   AES Encryption with IV generation:  10298.1/sec
   AES Encryption with supplied IV  :  11987.9/sec
   AES Decryption with supplied IV  :  10014.1/sec

   ECDSA PrivateKey --> PublicKey   :  754.9/sec
   ECDSA PrivateKey --> Signature   :  753.9/sec
   ECDSA PublicKey  --> SigVerified :  130.8/sec
   ECDSA PrivateKey --> NextInChain :  15073.0/sec
   ECDSA PublicKey  --> NextInChain :  110.1/sec
  • Loading branch information
etotheipi committed Nov 22, 2011
1 parent 0add1e2 commit e4c4207
Show file tree
Hide file tree
Showing 4 changed files with 475 additions and 240 deletions.
10 changes: 5 additions & 5 deletions cppForSwig/EncryptionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ void KdfRomix::computeKdfParams(double targetComputeSec, uint32_t maxMemReqts)
double perIterSec = allItersSec / numTest;
numIterations_ = (uint32_t)(targetComputeSec / (perIterSec+0.0005));
numIterations_ = (numIterations_ < 1 ? 1 : numIterations_);
cout << "System speed test results : " << endl;
cout << " Total test of the KDF took: " << allItersSec*1000 << " ms" << endl;
cout << " to execute: " << numTest << " iterations" << endl;
cout << " Target computation time is: " << targetComputeSec*1000 << " ms" << endl;
cout << " Setting numIterations to: " << numIterations_ << endl;
//cout << "System speed test results : " << endl;
//cout << " Total test of the KDF took: " << allItersSec*1000 << " ms" << endl;
//cout << " to execute: " << numTest << " iterations" << endl;
//cout << " Target computation time is: " << targetComputeSec*1000 << " ms" << endl;
//cout << " Setting numIterations to: " << numIterations_ << endl;
}


Expand Down
2 changes: 1 addition & 1 deletion cppForSwig/EncryptionUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class KdfRomix
/////////////////////////////////////////////////////////////////////////////
// Default max-memory reqt will
void computeKdfParams(double targetComputeSec=0.25,
uint32_t maxMemReqts=DEFAULT_KDF_MAX_MEMORY);
uint32_t maxMemReqtsBytes=DEFAULT_KDF_MAX_MEMORY);

/////////////////////////////////////////////////////////////////////////////
void usePrecomputedKdfParams(uint32_t memReqts,
Expand Down
57 changes: 57 additions & 0 deletions cryptoTimings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
################################################################################
Testing Crypto++::AES timings
################################################################################
AES Encryption with IV generation: 13299.5/sec
AES Encryption with supplied IV : 11507.8/sec
AES Decryption with supplied IV : 12124.1/sec
AES roundtrip, compare results:
Secret : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Cipher : 5c24d6bdb56621b3dc42f29d01ba0c327e410367e43cc2e4d0d713d8a83c454e
Decrypt: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Result : *** PASSED ***



################################################################################
Testing Crypto++::ECDSA timings
################################################################################
PrivateKey --> PublicKey : 753.4/sec
PrivateKey --> Signature : 755.1/sec
PublicKey --> SigVerified : 130.8/sec
PrivateKey --> NextInChain : 14974.3/sec
PublicKey --> NextInChain : 109.0/sec



################################################################################
Testing key-derivation function - timings and memory usage:
################################################################################
***KDF 1: Default params***
***KDF 2: 0.5s-1.0s timing, default mem***
***KDF 3: 0.25s-0.5s timing, 256kB max***
Testing KDF(1)
Hash Function: sha512
Mem Required : 8.0 MB
Num Iteration: 2
Hex Salt Used: 8f953b5020995b464d7d5cbfabb3e...
Pass: "This is my password " --> Key: 1446c42ec06ffecf21b5199fe14df82f (0.183717 sec)
Pass: "This is my password." --> Key: 176484a5bbfe25522151e426d3853394 (0.174887 sec)
Pass: "This is my password " --> Key: 1446c42ec06ffecf21b5199fe14df82f (0.174840 sec)
Testing KDF(2)
Hash Function: sha512
Mem Required : 32.0 MB
Num Iteration: 2
Hex Salt Used: 64a37c25c00c9bd95fc8eefd77b7f...
Pass: "This is my password " --> Key: d041597c0e0a1fddf0d69cf57ab8ef50 (0.695917 sec)
Pass: "This is my password." --> Key: c3ab637b0e72f69ecce54d9fd9c009f8 (0.702719 sec)
Pass: "This is my password " --> Key: d041597c0e0a1fddf0d69cf57ab8ef50 (0.695516 sec)
Testing KDF(3)
Hash Function: sha512
Mem Required : 256.0 kB
Num Iteration: 47
Hex Salt Used: c3843c1175bddfd1935d02a36244c...
Pass: "This is my password " --> Key: 7a525bbd64fdbc52497df31c8f5ec669 (0.165906 sec)
Pass: "This is my password." --> Key: 1af480216027b77b0a8eb6e4e2bf88ef (0.161794 sec)
Pass: "This is my password " --> Key: 7a525bbd64fdbc52497df31c8f5ec669 (0.165756 sec)


Loading

0 comments on commit e4c4207

Please sign in to comment.