ó â\e[c@s–ddlZddlZddlmZddlmZddddd d d gZd Zd Zd Z eddƒZ dd„Z d„Z d„ZdS(iÿÿÿÿN(t namedtuplei(tdjbect crypto_signtcrypto_sign_opentcrypto_sign_keypairtKeypairtPUBLICKEYBYTEStSECRETKEYBYTEStSIGNATUREBYTESi i@tvktskcCsu|dkrtjtƒ}ntjdtƒt|ƒdkrOtdƒ‚n|}t j |ƒ}t |||ƒS(sCReturn (verifying, secret) key from a given seed, or os.urandom(32)s$ed25519ll should choose random seed.i s%seed must be 32 random bytes or None.N( tNonetosturandomRtwarningstwarntRuntimeWarningtlent ValueErrorRt publickeyR(tseedtskbytestvkbytes((s;/tmp/pip-install-0xiv62/wheel/wheel/signatures/ed25519py.pyRs  cCs\t|ƒtkr+tdt|ƒƒ‚n|t}|t }tj|||ƒ}||S(s¦Return signature+message given message and secret key. The signature is the first SIGNATUREBYTES bytes of the return value. A copy of msg is in the remainder.sBad signing key length %d(RRRRRt signature(tmsgR RRtsig((s;/tmp/pip-install-0xiv62/wheel/wheel/signatures/ed25519py.pyRs   cCsht|ƒtkr+tdt|ƒƒ‚ntj|t |t|ƒ}|s`td|ƒ‚n|tS(s=Return message given signature+message and the verifying key.sBad verifying key length %ds rc != True(RRRRt checkvalidR(tsignedR trc((s;/tmp/pip-install-0xiv62/wheel/wheel/signatures/ed25519py.pyR+s (svkssk(R Rt collectionsRtRt__all__RRRRR RRR(((s;/tmp/pip-install-0xiv62/wheel/wheel/signatures/ed25519py.pyts