diff --git a/cmd/hppktool/cmd/encrypt.go b/cmd/hppktool/cmd/encrypt.go index 4d480ba..7ee5906 100644 --- a/cmd/hppktool/cmd/encrypt.go +++ b/cmd/hppktool/cmd/encrypt.go @@ -20,7 +20,8 @@ import ( var encryptCmd = &cobra.Command{ Use: "encrypt", Short: "encrypts a message from standard input", - Long: `the message will first be SHA256 hashed and then encrypted using HPPK, unless -raw is specified`, + Long: `Encrypt a message with HPPK from standard input. +The message is first SHA256 hashed, unless -raw is specified`, Run: func(cmd *cobra.Command, args []string) { silent, err := cmd.Flags().GetBool("silent") if err != nil { @@ -115,6 +116,6 @@ func init() { // Cobra supports local flags which will only run when this command // is called directly, e.g.: // encryptCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") - encryptCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the hppk public key file") + encryptCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the HPPK public key file") encryptCmd.Flags().Bool("raw", false, "encrypt the raw message, the message length must not exceed 256 bytes") } diff --git a/cmd/hppktool/cmd/keygen.go b/cmd/hppktool/cmd/keygen.go index 7378c2d..081b61c 100644 --- a/cmd/hppktool/cmd/keygen.go +++ b/cmd/hppktool/cmd/keygen.go @@ -17,6 +17,7 @@ import ( var keygenCmd = &cobra.Command{ Use: "keygen [directory]", Short: "generate a hppk private/public key pair", + Long: "Generate a HPPK private/public key pair with given order and save them to the specified directory.", Example: "hppktool keygen /tmp\n" + "hppktool keygen /tmp --order 5", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/hppktool/cmd/root.go b/cmd/hppktool/cmd/root.go index 801b8c8..3e487a1 100644 --- a/cmd/hppktool/cmd/root.go +++ b/cmd/hppktool/cmd/root.go @@ -13,7 +13,8 @@ import ( var rootCmd = &cobra.Command{ Use: "hppktool", Short: "HPPK key management tool", - Long: `Key generation, signing, verification, and secret encryption tool for HPPK.`, + Long: `HPPK key management tool. +HPPK key generation, signing, verification, and secret encryption.`, // Uncomment the following line if your bare application // has an action associated with it: // Run: func(cmd *cobra.Command, args []string) { }, diff --git a/cmd/hppktool/cmd/sign.go b/cmd/hppktool/cmd/sign.go index 017e56b..70d144c 100644 --- a/cmd/hppktool/cmd/sign.go +++ b/cmd/hppktool/cmd/sign.go @@ -20,7 +20,8 @@ import ( var signCmd = &cobra.Command{ Use: "sign", Short: "sign a message from standard input", - Long: `the message will first be SHA256 hashed and then encrypted using HPPK, unless -raw is specified`, + Long: `Sign a message with HPPK from standard input with a given public key. +The message is first SHA256 hashed, unless -raw is specified`, Run: func(cmd *cobra.Command, args []string) { silent, err := cmd.Flags().GetBool("silent") if err != nil { diff --git a/cmd/hppktool/cmd/verify.go b/cmd/hppktool/cmd/verify.go index 9fff039..c4d8853 100644 --- a/cmd/hppktool/cmd/verify.go +++ b/cmd/hppktool/cmd/verify.go @@ -19,7 +19,8 @@ import ( var verifyCmd = &cobra.Command{ Use: "verify", Short: "verify a message from standard input", - Long: `the message will first be SHA256 hashed and then be verified against using HPPK,unless -raw is specified`, + Long: `Verify a HPPK signed message from standard input against the signature file and public key. +The message is first SHA256 hashed, unless -raw is specified`, Run: func(cmd *cobra.Command, args []string) { silent, err := cmd.Flags().GetBool("silent") if err != nil { @@ -128,7 +129,7 @@ func init() { // Cobra supports local flags which will only run when this command // is called directly, e.g.: // verifyCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") - verifyCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the hppk public key file") - verifyCmd.Flags().String("sigfile", "./sigfile", "the signed signature file") - verifyCmd.Flags().Bool("raw", false, "encrypt the raw message, the message length must not exceed 256 bytes") + verifyCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the HPPK public key file to verify against.") + verifyCmd.Flags().String("sigfile", "./sigfile", "the signed signature file.") + verifyCmd.Flags().Bool("raw", false, "encrypt the raw message, the message length must not exceed 256 bytes.") }