#545670 openssl speed: "The 'numbers' are in 1000s of bytes" abiguous

Package:
openssl
Source:
openssl
Description:
Secure Sockets Layer toolkit - cryptographic utility
Submitter:
Bernhard Kuemel
Date:
2011-07-04 18:45:11 UTC
Severity:
minor
#545670#5
Date:
2009-09-08 10:15:38 UTC
From:
To:
bernhard@be:/data/home/bernhard$ openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 2922068 sha1's in 2.84s
[...]
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1             16035.45k    52527.68k   130759.17k   207166.84k   249277.10k

Does the above mean 16035.45k*1000 or 16035.45*1000? Doing the math
reveals the latter is the case: 2922068*16/2.84=16,462,354.93.
I suggest writing something like "The suffixes used are metric (powers
of 1000)." or "The k suffix below means 1000, not 1024." to avoid confusion.

Bernhard

#545670#10
Date:
2009-09-08 11:23:50 UTC
From:
To:
Umm, the numbers in my previous message were from 2 different
invocations of openssl, that's why they don't match.

#545670#15
Date:
2011-07-04 18:42:34 UTC
From:
To:
Thanks for reporting this.  And I concede the wording is slightly ambiguous.

The code in question is in file apps/speed.c.  The patch is "trivial".
See below.

However, changing it in Debian only seems to me to be a decision that is
up to the official maintainer(s).  Since I expect they will not do so, I
am going to tag this wontfix.

You can submit the patch (with you own desired wording, or course) to
upstream via email to rt@openssl.org.

++++ Proposed patch ++++
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -2376,7 +2376,7 @@
              fprintf(stdout,"+H");
          else
              {
-            fprintf(stdout,"The 'numbers' are in 1000s of bytes per
second processed.\n");
+            fprintf(stdout,"The 'numbers' are in bytes per second
processed (k = *1000).\n");
              fprintf(stdout,"type        ");
              }
          for (j=0;  j<SIZE_NUM; j++)

#545670#20
Date:
2011-07-04 18:42:34 UTC
From:
To:
Thanks for reporting this.  And I concede the wording is slightly ambiguous.

The code in question is in file apps/speed.c.  The patch is "trivial".
See below.

However, changing it in Debian only seems to me to be a decision that is
up to the official maintainer(s).  Since I expect they will not do so, I
am going to tag this wontfix.

You can submit the patch (with you own desired wording, or course) to
upstream via email to rt@openssl.org.

++++ Proposed patch ++++
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -2376,7 +2376,7 @@
              fprintf(stdout,"+H");
          else
              {
-            fprintf(stdout,"The 'numbers' are in 1000s of bytes per
second processed.\n");
+            fprintf(stdout,"The 'numbers' are in bytes per second
processed (k = *1000).\n");
              fprintf(stdout,"type        ");
              }
          for (j=0;  j<SIZE_NUM; j++)