]> git.codecow.com Git - Monocypher.git/commitdiff
Speed benchmark Mb/s -> megabytes per second
authorLoup Vaillant <loup@loup-vaillant.fr>
Sun, 28 Jan 2018 16:07:39 +0000 (17:07 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sun, 28 Jan 2018 16:07:39 +0000 (17:07 +0100)
tests/speed-sodium.c
tests/speed.c

index 4b38ed8b2eb302c6c3c558b09fd19c23179dcaa7..46c4768aac6b74394fc4b6d370f9f8583b993661 100644 (file)
@@ -124,15 +124,15 @@ static u64 edDSA_check(void)
 int main()
 {
     SODIUM_INIT;
-    print("Chacha20         ", chacha20()      * MULT/DIV, "Mb/s"            );
-    print("Poly1305         ", poly1305()      * MULT/DIV, "Mb/s"            );
-    print("Auth'd encryption", authenticated() * MULT/DIV, "Mb/s"            );
-    print("Blake2b          ", blake2b()       * MULT/DIV, "Mb/s"            );
-    print("Sha512           ", sha512()        * MULT/DIV, "Mb/s"            );
-    print("Argon2i          ", argon2i()       * MULT/DIV, "Mb/s (3 passes)" );
-    print("x25519           ", x25519()        / DIV, "exchanges  per second");
-    print("EdDSA(sign)      ", edDSA_sign()    / DIV, "signatures per second");
-    print("EdDSA(check)     ", edDSA_check()   / DIV, "checks     per second");
+    print("Chacha20         ",chacha20()     *MULT/DIV,"megabytes  per second");
+    print("Poly1305         ",poly1305()     *MULT/DIV,"megabytes  per second");
+    print("Auth'd encryption",authenticated()*MULT/DIV,"megabytes  per second");
+    print("Blake2b          ",blake2b()      *MULT/DIV,"megabytes  per second");
+    print("Sha512           ",sha512()       *MULT/DIV,"megabytes  per second");
+    print("Argon2i, 3 passes",argon2i()      *MULT/DIV,"megabytes  per second");
+    print("x25519           ",x25519()            /DIV,"exchanges  per second");
+    print("EdDSA(sign)      ",edDSA_sign()        /DIV,"signatures per second");
+    print("EdDSA(check)     ",edDSA_check()       /DIV,"checks     per second");
     printf("\n");
     return 0;
 }
index a04dc6ba16754863b6d9eaf42ec0e8339c02d71c..62b31e32698c12adb945ca3f529b8c6ad1072f76 100644 (file)
@@ -127,15 +127,15 @@ static u64 edDSA_check(void)
 
 int main()
 {
-    print("Chacha20         ", chacha20()      * MULT/DIV, "Mb/s"            );
-    print("Poly1305         ", poly1305()      * MULT/DIV, "Mb/s"            );
-    print("Auth'd encryption", authenticated() * MULT/DIV, "Mb/s"            );
-    print("Blake2b          ", blake2b()       * MULT/DIV, "Mb/s"            );
-    print("Sha512           ", sha512()        * MULT/DIV, "Mb/s"            );
-    print("Argon2i          ", argon2i()       * MULT/DIV, "Mb/s (3 passes)" );
-    print("x25519           ", x25519()        / DIV, "exchanges  per second");
-    print("EdDSA(sign)      ", edDSA_sign()    / DIV, "signatures per second");
-    print("EdDSA(check)     ", edDSA_check()   / DIV, "checks     per second");
+    print("Chacha20         ",chacha20()     *MULT/DIV,"megabytes  per second");
+    print("Poly1305         ",poly1305()     *MULT/DIV,"megabytes  per second");
+    print("Auth'd encryption",authenticated()*MULT/DIV,"megabytes  per second");
+    print("Blake2b          ",blake2b()      *MULT/DIV,"megabytes  per second");
+    print("Sha512           ",sha512()       *MULT/DIV,"megabytes  per second");
+    print("Argon2i, 3 passes",argon2i()      *MULT/DIV,"megabytes  per second");
+    print("x25519           ",x25519()            /DIV,"exchanges  per second");
+    print("EdDSA(sign)      ",edDSA_sign()        /DIV,"signatures per second");
+    print("EdDSA(check)     ",edDSA_check()       /DIV,"checks     per second");
     printf("\n");
     return 0;
 }