[PATCH 04/10] command: add generic digest command

Jan Lübbe jlu at pengutronix.de
Mon Mar 16 04:49:08 PDT 2015


On Mo, 2015-03-16 at 11:15 +0100, Jean-Christophe PLAGNIOL-VILLARD
wrote:
> +BAREBOX_CMD_HELP_START(digest)
> +BAREBOX_CMD_HELP_TEXT("Calculate a digest over a FILE or a memory
> area.")
> +BAREBOX_CMD_HELP_TEXT("Options:")
> +BAREBOX_CMD_HELP_OPT ("-a <algo>\t",  "digest to use")
> +BAREBOX_CMD_HELP_OPT ("-k <key>\t",  "key as text")
> +BAREBOX_CMD_HELP_OPT ("-K <file>\t",  "key file")
> +BAREBOX_CMD_HELP_OPT ("-s <sig>\t",  "digest")
> +BAREBOX_CMD_HELP_OPT ("-S <file>\t",  "digest flie")
> +BAREBOX_CMD_HELP_END

We're mixing different terms here: digest and signature

Signature is usually used in the context of public key crypto, digest is
mostly used with for hashes. The command uses both interchangeably.

How about:
-a <algo>	hash or signature algorithm to use
-k <key>	use supplied <key> (ASCII or hex) for MAC
-K <file>	use key from <file> (binary) for MAC
-v <hex>	verify data against supplied <hex> (hash, MAC or signature)
-V <file>	verify data against <file> (hash, MAC or signature)

Regards,
Jan
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list