X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb-python/blobdiff_plain/7008bdd781f60ed3fec4cf3bf3945fa4bca2a751..1df8d5fe8538884aaeb3ccf8036b88efcc7560c5:/group.c diff --git a/group.c b/group.c index 83608d3..9f7bbcd 100644 --- a/group.c +++ b/group.c @@ -964,7 +964,7 @@ static PyMethodDef ge_pymethods[] = { METH (check, "X.check() -> check X really belongs to its group") METH (toint, "X.toint() -> X converted to an integer") KWMETH(toec, "\ -X.toec(curve = ECPt) -> X converted to elliptic curve point") +X.toec([curve = ECPt]) -> X converted to elliptic curve point") METH (tobuf, "X.tobuf() -> X in buffer representation") METH (toraw, "X.toraw() -> X in raw representation") #undef METHNAME @@ -1079,7 +1079,7 @@ static PyMethodDef group_pymethods[] = { #define METHNAME(name) gmeth_##name METH (mexp, "\ G.mexp([(X0, N0), (X1, N1), ...]) -> X0^N0 X1^N1 ...") - KWMETH(checkgroup, "G.checkgroup(rng = rand): check group is good") + KWMETH(checkgroup, "G.checkgroup([rng = rand]): check group is good") #undef METHNAME { 0 } }; @@ -1377,16 +1377,16 @@ static PyMethodDef methods[] = { METH (_DHInfo__groupn, 0) METH (_BinDHInfo__groupn, 0) KWMETH(_DHInfo_generate, "\ -generate(PBITS, [qbits = 0, event = pgen_nullev,\n\ - rng = rand, nsteps = 0]) -> D") +generate(PBITS, [qbits = 0], [event = pgen_nullev],\n\ + [rng = rand], [nsteps = 0]) -> D") KWMETH(_DHInfo_genlimlee, "\ -genlimlee(PBITS, QBITS, [event = pgen_nullev, ievent = pgen_nullev,\n\ - rng = rand, nsteps = 0, subgroupp = True]) -> (D, [Q, ...])") +genlimlee(PBITS, QBITS, [event = pgen_nullev], [ievent = pgen_nullev],\n\ + [rng = rand], [nsteps = 0], [subgroupp = True]) -> (D, [Q, ...])") KWMETH(_DHInfo_gendsa, "\ -gendsa(PBITS, QBITS, SEED, [event = pgen_nullev, nsteps = 0])\n\ +gendsa(PBITS, QBITS, SEED, [event = pgen_nullev], [nsteps = 0])\n\ -> (D, SEED, COUNT)") KWMETH(_DHInfo_genkcdsa, "\ -gendsa(PBITS, QBITS, [event = pgen_nullev, rng = rand, nsteps = 0])\n\ +gendsa(PBITS, QBITS, [event = pgen_nullev], [rng = rand], [nsteps = 0])\n\ -> (D, V)") #undef METHNAME { 0 }