linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [CRYPTO] add alg. type to /proc/crypto output
  2003-09-05 14:38 [CRYPTO] add alg. type to /proc/crypto output Erlend Aasland
@ 2003-09-05 14:34 ` David S. Miller
  2003-09-06 10:08   ` Erlend Aasland
  2003-09-11 23:35 ` David S. Miller
  1 sibling, 1 reply; 6+ messages in thread
From: David S. Miller @ 2003-09-05 14:34 UTC (permalink / raw)
  To: Erlend Aasland; +Cc: jmorris, linux-kernel

On Fri, 5 Sep 2003 16:38:59 +0200
Erlend Aasland <erlend-a@ux.his.no> wrote:

> Here is a patch that add alg. type output to /proc/crypto. Booted and
> tested.

Is it even useful?

When you see names like "md5" and parameters such as "digestsize"
listed, do you really have no clue that it is a "digest"?  :-)

The information seems completely redundant to me.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [CRYPTO] add alg. type to /proc/crypto output
@ 2003-09-05 14:38 Erlend Aasland
  2003-09-05 14:34 ` David S. Miller
  2003-09-11 23:35 ` David S. Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Erlend Aasland @ 2003-09-05 14:38 UTC (permalink / raw)
  To: David S. Miller, James Morris; +Cc: Linux Kernel Mailing List

Hi

Here is a patch that add alg. type output to /proc/crypto. Booted and
tested.


Erlend Aasland

diff -urN linux-2.6.0-test4-bk7/crypto/proc.c linux-2.6.0-test4-bk7-dirty/crypto/proc.c
--- linux-2.6.0-test4-bk7/crypto/proc.c	2003-08-23 01:53:43.000000000 +0200
+++ linux-2.6.0-test4-bk7-dirty/crypto/proc.c	2003-09-05 18:17:35.000000000 +0200
@@ -57,6 +57,7 @@
 	
 	switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
 	case CRYPTO_ALG_TYPE_CIPHER:
+		seq_printf(m, "type         : cipher\n");
 		seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 		seq_printf(m, "min keysize  : %u\n",
 					alg->cra_cipher.cia_min_keysize);
@@ -65,10 +66,17 @@
 		break;
 		
 	case CRYPTO_ALG_TYPE_DIGEST:
+		seq_printf(m, "type         : digest\n");
 		seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 		seq_printf(m, "digestsize   : %u\n",
 		           alg->cra_digest.dia_digestsize);
 		break;
+	case CRYPTO_ALG_TYPE_COMPRESS:
+		seq_printf(m, "type         : compression\n");
+		break;
+	default:
+		seq_printf(m, "type         : unknown\n");
+		break;
 	}
 
 	seq_putc(m, '\n');

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [CRYPTO] add alg. type to /proc/crypto output
  2003-09-05 14:34 ` David S. Miller
@ 2003-09-06 10:08   ` Erlend Aasland
  2003-09-06 16:43     ` James Morris
  2003-09-07  0:21     ` Valdis.Kletnieks
  0 siblings, 2 replies; 6+ messages in thread
From: Erlend Aasland @ 2003-09-06 10:08 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Kernel Mailing List

On 09/05/03 07:34, David S. Miller wrote:
> Is it even useful?
Check http://samba.org/~jamesm/crypto/TODO
It's listed under medium priority, so I thought I was doing a good
thing implementing it.

> 
> When you see names like "md5" and parameters such as "digestsize"
> listed, do you really have no clue that it is a "digest"?  :-)
Good point.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [CRYPTO] add alg. type to /proc/crypto output
  2003-09-06 10:08   ` Erlend Aasland
@ 2003-09-06 16:43     ` James Morris
  2003-09-07  0:21     ` Valdis.Kletnieks
  1 sibling, 0 replies; 6+ messages in thread
From: James Morris @ 2003-09-06 16:43 UTC (permalink / raw)
  To: Erlend Aasland; +Cc: David S. Miller, Linux Kernel Mailing List

On Sat, 6 Sep 2003, Erlend Aasland wrote:

> On 09/05/03 07:34, David S. Miller wrote:
> > Is it even useful?
> Check http://samba.org/~jamesm/crypto/TODO
> It's listed under medium priority, so I thought I was doing a good
> thing implementing it.

I think someone asked for it once, not sure exactly why, but I guess it
makes parsing simpler and theoretically less likely to break if e.g. a
field is added or removed for an algorithm type.


- James
-- 
James Morris
<jmorris@intercode.com.au>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [CRYPTO] add alg. type to /proc/crypto output
  2003-09-06 10:08   ` Erlend Aasland
  2003-09-06 16:43     ` James Morris
@ 2003-09-07  0:21     ` Valdis.Kletnieks
  1 sibling, 0 replies; 6+ messages in thread
From: Valdis.Kletnieks @ 2003-09-07  0:21 UTC (permalink / raw)
  To: Erlend Aasland; +Cc: David S. Miller, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

On Sat, 06 Sep 2003 12:08:18 +0200, Erlend Aasland said:
> On 09/05/03 07:34, David S. Miller wrote:

> > When you see names like "md5" and parameters such as "digestsize"
> > listed, do you really have no clue that it is a "digest"?  :-)
> Good point.

On the flip side, it makes it possible for an *AUTOMATED* process to search for
appropriate types of entries.  So for instance, a GUI can say "The following
3 digest functions are available, please choose one" or "The following 4 symmetric
encryptions are available".....

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [CRYPTO] add alg. type to /proc/crypto output
  2003-09-05 14:38 [CRYPTO] add alg. type to /proc/crypto output Erlend Aasland
  2003-09-05 14:34 ` David S. Miller
@ 2003-09-11 23:35 ` David S. Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David S. Miller @ 2003-09-11 23:35 UTC (permalink / raw)
  To: Erlend Aasland; +Cc: jmorris, linux-kernel

On Fri, 5 Sep 2003 16:38:59 +0200
Erlend Aasland <erlend-a@ux.his.no> wrote:

> Here is a patch that add alg. type output to /proc/crypto. Booted and
> tested.

I've applied this, thank you.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-09-11 23:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-05 14:38 [CRYPTO] add alg. type to /proc/crypto output Erlend Aasland
2003-09-05 14:34 ` David S. Miller
2003-09-06 10:08   ` Erlend Aasland
2003-09-06 16:43     ` James Morris
2003-09-07  0:21     ` Valdis.Kletnieks
2003-09-11 23:35 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).