diff --git a/cmd/discreteLog.go b/cmd/discreteLog.go index 44b3fb7..dbdbef0 100644 --- a/cmd/discreteLog.go +++ b/cmd/discreteLog.go @@ -24,7 +24,7 @@ import ( ) // FIXME: order and generator may not be the right names here -var discreteLogOrder string +var discreteLogModulus string var discreteLogGenerator string var discreteLogElement string @@ -72,9 +72,9 @@ func babyStepGiantStep(n, g, x *big.Int) *big.Int { } func discreteLog(cmd *cobra.Command, args []string) { - n, ok := new(big.Int).SetString(discreteLogOrder, 10) + n, ok := new(big.Int).SetString(discreteLogModulus, 10) if !ok { - cobra.CheckErr("invalid order " + discreteLogOrder) + cobra.CheckErr("invalid modulus " + discreteLogModulus) } g, ok := new(big.Int).SetString(discreteLogGenerator, 10) @@ -112,8 +112,8 @@ func init() { // is called directly, e.g.: // discreteLogCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") - discreteLogCmd.Flags().StringVarP(&discreteLogOrder, "order", "n", "", "order of the cyclic group") - discreteLogCmd.MarkFlagRequired("order") + discreteLogCmd.Flags().StringVarP(&discreteLogModulus, "modulus", "m", "", "modulus of the cyclic group") + discreteLogCmd.MarkFlagRequired("modulus") discreteLogCmd.Flags().StringVarP(&discreteLogGenerator, "generator", "g", "", "generator of the cyclic group") discreteLogCmd.MarkFlagRequired("generator")