Module Expr Str Import alias Import alias Import alias Assign NameStore Str Assign NameStore CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num If NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Num Str orelse Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr GeneratorExp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list Assign NameStore Num Assign NameStore BinOpSub BinOpPow Num Num Num Assign NameStore BinOpAdd BinOpPow Num Num Num FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str While CompareGt NameLoad Num body Assign NameStore BinOpMod BinOpMult NameLoad NameLoad NameLoad AugAssignSub NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpMod BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad Assign NameStore BinOpMod BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult BinOpMod BinOpMult NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad Assign NameStore BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad Assign NameStore BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad Assign NameStore BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad Assign NameStore BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad Assign NameStore BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad Assign NameStore BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad Return BinOpMod BinOpMult Call NameLoad NameLoad Num NameLoad NameLoad decorator_list Assign NameStore BinOpMod BinOpMult Num Call NameLoad Num NameLoad Assign NameStore Call NameLoad Num BinOpFloorDiv BinOpSub NameLoad Num Num NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore BinOpMult BinOpSub BinOpMult NameLoad NameLoad Num Call NameLoad BinOpAdd BinOpMult BinOpMult NameLoad NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad BinOpFloorDiv BinOpAdd NameLoad Num Num NameLoad If CompareNotEq BinOpMod BinOpSub BinOpMult NameLoad NameLoad NameLoad NameLoad Num body Assign NameStore BinOpMod BinOpMult NameLoad NameLoad NameLoad If CompareNotEq BinOpMod NameLoad Num Num body Assign NameStore BinOpSub NameLoad NameLoad Return NameLoad decorator_list Assign NameStore BinOpMult Num Call NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore TupleLoad BinOpMod NameLoad NameLoad BinOpMod NameLoad NameLoad Num BinOpMod BinOpMult NameLoad NameLoad NameLoad Assign NameStore TupleLoad Num Num Num Num FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpMod BinOpMult BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult BinOpMult BinOpMult NameLoad Num NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult BinOpMult NameLoad Num NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Return TupleLoad BinOpMod NameLoad NameLoad BinOpMod NameLoad NameLoad BinOpMod NameLoad NameLoad BinOpMod NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpMod BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult BinOpMult Num NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpSub BinOpSub BinOpMult BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpAdd UnaryOpUSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub UnaryOpUSub NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Return TupleLoad BinOpMod NameLoad NameLoad BinOpMod NameLoad NameLoad BinOpMod NameLoad NameLoad BinOpMod NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Num body Return NameLoad Assign NameStore Call NameLoad NameLoad BinOpFloorDiv NameLoad Num Assign NameStore Call NameLoad NameLoad If BinOpBitAnd NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad decorator_list Assign NameStore ListLoad FunctionDef arguments args defaults body Assign NameStore NameLoad For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad decorator_list Expr Call NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpMod NameLoad NameLoad Assign NameStore NameLoad For NameStore Call NameLoad Num body If BinOpBitAnd NameLoad Num body Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpFloorDiv NameLoad Num Assert CompareEq NameLoad Num NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListComp BinOpBitAnd BinOpRShift NameLoad NameLoad Num comprehension NameStore Call NameLoad NameLoad Return Call AttributeLoad Str attr ListComp Call NameLoad Call NameLoad ListComp BinOpLShift SubscriptLoad NameLoad Index BinOpAdd BinOpMult NameLoad Num NameLoad NameLoad comprehension NameStore Call NameLoad Num comprehension NameStore Call NameLoad BinOpFloorDiv NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpMod BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpMod BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpAdd ListComp BinOpBitAnd BinOpRShift NameLoad NameLoad Num comprehension NameStore Call NameLoad BinOpSub NameLoad Num ListLoad BinOpBitAnd NameLoad Num Return Call AttributeLoad Str attr ListComp Call NameLoad Call NameLoad ListComp BinOpLShift SubscriptLoad NameLoad Index BinOpAdd BinOpMult NameLoad Num NameLoad NameLoad comprehension NameStore Call NameLoad Num comprehension NameStore Call NameLoad BinOpFloorDiv NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpBitAnd BinOpRShift Call NameLoad NameLoad BinOpFloorDiv NameLoad Num BinOpMod NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd BinOpPow Num BinOpSub NameLoad Num Call NameLoad GeneratorExp BinOpMult BinOpPow Num NameLoad Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Num BinOpSub NameLoad Num Assign NameStore Call NameLoad NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Return Call NameLoad GeneratorExp BinOpMult BinOpPow Num NameLoad Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad BinOpMult Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd BinOpPow Num BinOpSub NameLoad Num Call NameLoad GeneratorExp BinOpMult BinOpPow Num NameLoad Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Num BinOpSub NameLoad Num Assign NameStore Call NameLoad BinOpAdd Call NameLoad ListComp Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad BinOpFloorDiv NameLoad Num BinOpFloorDiv NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpMod BinOpAdd NameLoad BinOpMult Call NameLoad BinOpAdd BinOpAdd Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return BinOpAdd Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Return BoolOpAnd CompareNotEq BinOpMod NameLoad NameLoad Num CompareEq BinOpMod BinOpMult NameLoad NameLoad NameLoad BinOpMod BinOpMult NameLoad NameLoad NameLoad CompareEq BinOpMod BinOpSub BinOpSub BinOpSub BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad BinOpMult BinOpMult NameLoad NameLoad NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad GeneratorExp BinOpMult BinOpPow Num NameLoad Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad GeneratorExp BinOpMult BinOpPow Num NameLoad Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Num BinOpSub NameLoad Num Assign NameStore Call NameLoad NameLoad If CompareNotEq BinOpBitAnd NameLoad Num Call NameLoad NameLoad BinOpSub NameLoad Num body Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore TupleLoad NameLoad NameLoad Num BinOpMod BinOpMult NameLoad NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad Str Return NameLoad decorator_list ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareNotEq Call NameLoad NameLoad BinOpFloorDiv NameLoad Num body Raise Call NameLoad Str If CompareNotEq Call NameLoad NameLoad BinOpFloorDiv NameLoad Num body Raise Call NameLoad Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice BinOpFloorDiv NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice BinOpFloorDiv NameLoad Num BinOpFloorDiv NameLoad Num Assign NameStore Call NameLoad BinOpAdd BinOpAdd Call NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad Call NameLoad NameLoad NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad CompareNotEq BinOpMod BinOpSub BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad Num CompareNotEq BinOpMod BinOpSub BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad Num body Raise Call NameLoad Str decorator_list
N/A N/A 
NB: This code is not safe for use with secret keys or secret data.
The only safe use of this code is for verifying signatures on public messages.

Functions for computing the public key of a secret key and for signing
a message are included, namely publickey_unsafe and signature_unsafe,
for testing purposes only.

The root of the problem is that Python's long-integer arithmetic is
not designed for use in cryptography.  Specifically, it may take more
or less time to execute an operation depending on the values of the
inputs, and its memory access patterns may also depend on the inputs.
This opens it to timing and cache side-channel attacks which can
disclose data to an attacker.  We rely on Python's long-integer
arithmetic, so we cannot handle secrets without risking their disclosure.
 N/A hashlib N/A operator N/A sys N/A __version__ 1.0.dev0 N/A PY3 N/A N/A N/A sys version_info N/A 0 3 N/A PY3 N/A N/A indexbytes N/A operator getitem N/A intlist2bytes bytes N/A int2byte N/A N/A operator methodcaller to_bytes 1 big N/A N/A int2byte chr N/A range xrange indexbytes N/A N/A buf i N/A N/A N/A N/A ord N/A buf N/A i N/A intlist2bytes N/A N/A l N/A N/A N/A N/A N/A join N/A N/A chr c N/A c l N/A N/A b 256 N/A q N/A N/A 2 255 19 N/A l N/A N/A 2 252 27742317777372353535851937790883648493 H N/A N/A m N/A N/A N/A N/A N/A N/A N/A hashlib sha512 m digest N/A pow2 N/A N/A x p N/A N/A N/A == pow(x, 2**p, q) N/A N/A p 0 N/A N/A x N/A N/A x x q N/A p 1 N/A x N/A inv N/A N/A z N/A N/A N/A $= z^{-1} \mod q$, for z != 0 N/A z2 N/A N/A z z q N/A z9 N/A N/A N/A pow2 z2 2 z q N/A z11 N/A N/A z9 z2 q N/A z2_5_0 N/A N/A N/A N/A z11 z11 q z9 q N/A z2_10_0 N/A N/A N/A pow2 z2_5_0 5 z2_5_0 q N/A z2_20_0 N/A N/A N/A pow2 z2_10_0 10 z2_10_0 q N/A z2_40_0 N/A N/A N/A pow2 z2_20_0 20 z2_20_0 q N/A z2_50_0 N/A N/A N/A pow2 z2_40_0 10 z2_10_0 q N/A z2_100_0 N/A N/A N/A pow2 z2_50_0 50 z2_50_0 q N/A z2_200_0 N/A N/A N/A pow2 z2_100_0 100 z2_100_0 q N/A z2_250_0 N/A N/A N/A pow2 z2_200_0 50 z2_50_0 q N/A N/A N/A N/A pow2 z2_250_0 5 z11 q N/A N/A d N/A N/A -121665 N/A inv 121666 q N/A I N/A pow 2 N/A N/A q 1 4 q xrecover N/A N/A y N/A N/A N/A xx N/A N/A N/A y y 1 N/A inv N/A N/A N/A d y y 1 N/A x N/A pow xx N/A N/A q 3 8 q N/A N/A N/A N/A N/A x x xx q 0 N/A N/A x N/A N/A x I q N/A N/A N/A x 2 0 N/A N/A x N/A q x N/A x N/A N/A By N/A 4 N/A inv 5 N/A Bx N/A xrecover By N/A B N/A N/A Bx q N/A By q 1 N/A N/A Bx By q N/A ident N/A 0 1 1 0 edwards_add N/A N/A P Q N/A N/A N/A N/A x1 y1 z1 t1 P N/A N/A x2 y2 z2 t2 Q N/A a N/A N/A N/A y1 x1 N/A y2 x2 q N/A b N/A N/A N/A y1 x1 N/A y2 x2 q N/A c N/A N/A N/A N/A t1 2 d t2 q N/A dd N/A N/A N/A z1 2 z2 q N/A e N/A b a N/A f N/A dd c N/A g N/A dd c N/A h N/A b a N/A x3 N/A e f N/A y3 N/A g h N/A t3 N/A e h N/A z3 N/A f g N/A N/A N/A x3 q N/A y3 q N/A z3 q N/A t3 q N/A edwards_double N/A N/A P N/A N/A N/A N/A x1 y1 z1 t1 P N/A a N/A N/A x1 x1 q N/A b N/A N/A y1 y1 q N/A c N/A N/A N/A 2 z1 z1 q N/A e N/A N/A N/A N/A N/A x1 y1 N/A x1 y1 a b q N/A g N/A N/A a b N/A f N/A g c N/A h N/A N/A a b N/A x3 N/A e f N/A y3 N/A g h N/A t3 N/A e h N/A z3 N/A f g N/A N/A N/A x3 q N/A y3 q N/A z3 q N/A t3 q N/A scalarmult N/A N/A P e N/A N/A N/A N/A e 0 N/A N/A ident N/A Q N/A scalarmult P N/A e 2 N/A Q N/A edwards_double Q N/A N/A e 1 N/A N/A Q N/A edwards_add Q P N/A Q N/A N/A Bpow N/A make_Bpow N/A N/A N/A N/A N/A P B N/A i N/A range 253 N/A N/A N/A N/A Bpow append P N/A P N/A edwards_double P N/A N/A N/A make_Bpow scalarmult_B N/A N/A e N/A N/A N/A 
    Implements scalarmult(B, e) more efficiently.
     N/A e N/A e l N/A P ident N/A i N/A range 253 N/A N/A N/A e 1 N/A N/A P N/A edwards_add P N/A Bpow N/A i N/A e N/A e 2 N/A N/A e 0 e N/A P N/A encodeint N/A N/A y N/A N/A N/A bits N/A N/A N/A y i 1 N/A i N/A range b N/A N/A N/A join N/A N/A int2byte N/A sum N/A N/A N/A bits N/A N/A N/A i 8 j j N/A j N/A range 8 N/A i N/A range N/A b 8 N/A encodepoint N/A N/A P N/A N/A N/A N/A x y z t P N/A zi N/A inv z N/A x N/A N/A x zi q N/A y N/A N/A y zi q N/A bits N/A N/A N/A N/A y i 1 N/A i N/A range N/A b 1 N/A N/A x 1 N/A N/A N/A join N/A N/A int2byte N/A sum N/A N/A N/A bits N/A N/A N/A i 8 j j N/A j N/A range 8 N/A i N/A range N/A b 8 N/A bit N/A N/A h i N/A N/A N/A N/A N/A N/A indexbytes h N/A i 8 N/A i 8 1 N/A publickey_unsafe N/A N/A sk N/A N/A N/A 
    Not safe to use with secret keys or secret data.

    See module docstring.  This function should be used for testing only.
     N/A h N/A H sk N/A a N/A N/A 2 N/A b 2 N/A sum N/A N/A N/A 2 i N/A bit h i N/A i N/A range 3 N/A b 2 N/A A N/A scalarmult_B a N/A N/A encodepoint A N/A Hint N/A N/A m N/A N/A N/A h N/A H m N/A N/A sum N/A N/A N/A 2 i N/A bit h i N/A i N/A range N/A 2 b N/A signature_unsafe N/A N/A m sk pk N/A N/A N/A 
    Not safe to use with secret keys or secret data.

    See module docstring.  This function should be used for testing only.
     N/A h N/A H sk N/A a N/A N/A 2 N/A b 2 N/A sum N/A N/A N/A 2 i N/A bit h i N/A i N/A range 3 N/A b 2 N/A r N/A Hint N/A N/A intlist2bytes N/A N/A indexbytes h j N/A j N/A range N/A b 8 N/A b 4 m N/A R N/A scalarmult_B r N/A S N/A N/A r N/A N/A Hint N/A N/A N/A encodepoint R pk m a l N/A N/A N/A encodepoint R N/A encodeint S N/A isoncurve N/A N/A P N/A N/A N/A N/A x y z t P N/A N/A N/A N/A z q 0 N/A N/A N/A x y q N/A N/A z t q N/A N/A N/A N/A N/A N/A y y N/A x x N/A z z N/A N/A d t t q 0 N/A decodeint N/A N/A s N/A N/A N/A N/A sum N/A N/A N/A 2 i N/A bit s i N/A i N/A range 0 b N/A decodepoint N/A N/A s N/A N/A N/A y N/A sum N/A N/A N/A 2 i N/A bit s i N/A i N/A range 0 N/A b 1 N/A x N/A xrecover y N/A N/A N/A x 1 N/A bit s N/A b 1 N/A N/A x N/A q x N/A P N/A x y 1 N/A N/A x y q N/A N/A N/A isoncurve P N/A N/A N/A ValueError decoding point that is not on curve N/A P N/A SignatureMismatch N/A Exception N/A N/A N/A checkvalid N/A N/A s m pk N/A N/A N/A 
    Not safe to use when any argument is secret.

    See module docstring.  This function should be used only for
    verifying public signatures of public messages.
     N/A N/A N/A len s N/A b 4 N/A N/A N/A ValueError signature length is wrong N/A N/A N/A len pk N/A b 8 N/A N/A N/A ValueError public-key length is wrong N/A R N/A decodepoint N/A s N/A N/A b 8 N/A A N/A decodepoint pk N/A S N/A decodeint N/A s N/A N/A b 8 N/A b 4 N/A h N/A Hint N/A N/A N/A encodepoint R pk m N/A N/A x1 y1 z1 t1 P N/A scalarmult_B S N/A N/A x2 y2 z2 t2 Q N/A edwards_add R N/A scalarmult A h N/A N/A N/A N/A isoncurve P N/A N/A isoncurve Q N/A N/A N/A N/A x1 z2 N/A x2 z1 q 0 N/A N/A N/A N/A y1 z2 N/A y2 z1 q 0 N/A N/A N/A SignatureMismatch signature does not pass verification N/A