Files
ServerSync/lib/nacl/bindings/__pycache__/crypto_sign.cpython-314.pyc

171 lines
15 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
u<10>ik(<00><00><>a<00>Rt"0t^RIHt^RIHt^RIHtHt^RI H
t
]P!4t ]^k]P!4^,t]^k]P!4t]^k]P!4t]^k]P$!4t]^k]P(!4t]^kRRltRRltR R
ltR R ltR RltRRltRRltRRlt!RR4tRRltRRlt RRlt!R#)<1F>)<01>Tuple)<01>
exceptions)<02>ffi<66>lib)<01>ensurec<00>F<00>V^8<>dQhR\\\3,/#)<02><00>return)r<00>bytes)<01>formats"<22>@/tmp/pip-target-zhdecbcm/lib/python/nacl/bindings/crypto_sign.py<70> __annotate__r s<00><00><06><06>U<EFBFBD>5<EFBFBD>%<25><<3C>0<><06>c<04>`<00>\P!R\4p\P!R\4p\P
!W4p\ V^8HR\PR7\P!V\4R,\P!V\4R,3#)zi
Returns a randomly generated public key and secret key.
:rtype: (bytes(public_key), bytes(secret_key))
<EFBFBD>unsigned char[]<5D>Unexpected library error<6F><01>raising<6E>NNN)
r<00>new<65>crypto_sign_PUBLICKEYBYTES<45>crypto_sign_SECRETKEYBYTESr<00>crypto_sign_keypairr<00>exc<78> RuntimeError<6F>buffer)<03>pk<70>sk<73>rcs r rr s<><00><00>
<0A><17><17>"<22>$><3E> ?<3F>B<EFBFBD> <0C><17><17>"<22>$><3E> ?<3F>B<EFBFBD> <0C> <20> <20><12> (<28>B<EFBFBD>
<EFBFBD>2<EFBFBD><11>7<EFBFBD>.<2E><03>8H<38>8H<38>I<> <0C>
<EFBFBD>
<EFBFBD>2<EFBFBD>1<>2<>1<EFBFBD>5<> <0B>
<EFBFBD>
<EFBFBD>2<EFBFBD>1<>2<>1<EFBFBD>5<> <06>rc<00>R<00>V^8<>dQhR\R\\\3,/#)r <00>seedr
)r r)r s"r rr2s#<00><00><06><06>5<EFBFBD><06>U<EFBFBD>5<EFBFBD>%<25><<3C>-@<40>rc<04><><00>\V4\8wd\P!R4h\P
!R\ 4p\P
!R\4p\P!WV4p\V^8HR\PR7\P!V\ 4R,\P!V\4R,3#)z<>
Computes and returns the public key and secret key using the seed ``seed``.
:param seed: bytes
:rtype: (bytes(public_key), bytes(secret_key))
z Invalid seedrrrr) <0A>len<65>crypto_sign_SEEDBYTESr<00>
ValueErrorrrrrr<00>crypto_sign_seed_keypairrrr)r!rrrs& r r&r&2s<><00><00> <0B>4<EFBFBD>y<EFBFBD>)<29>)<29><11>n<EFBFBD>n<EFBFBD>^<5E>,<2C>,<2C> <0C><17><17>"<22>$><3E> ?<3F>B<EFBFBD> <0C><17><17>"<22>$><3E> ?<3F>B<EFBFBD> <0C> %<25> %<25>b<EFBFBD>d<EFBFBD> 3<>B<EFBFBD>
<EFBFBD>2<EFBFBD><11>7<EFBFBD>.<2E><03>8H<38>8H<38>I<> <0C>
<EFBFBD>
<EFBFBD>2<EFBFBD>1<>2<>1<EFBFBD>5<> <0B>
<EFBFBD>
<EFBFBD>2<EFBFBD>1<>2<>1<EFBFBD>5<> <06>rc<00><<00>V^8<>dQhR\R\R\/#)r <00>messagerr
<00>r )r s"r rrHs!<00><00>0<>0<><15>0<>E<EFBFBD>0<>e<EFBFBD>0rc<04>N<00>\P!R\V4\,4p\P!R4p\P
!W#V\V4V4p\ V^8HR\PR7\P!W#^,4R,#)z<>
Signs the message ``message`` using the secret key ``sk`` and returns the
signed message.
:param message: bytes
:param sk: bytes
:rtype: bytes
r<00>unsigned long long *rrr)
rrr#<00>crypto_sign_BYTESr<00> crypto_signrrrr)r(r<00>signed<65>
signed_lenrs&& r r-r-Hsu<00><00><11>W<EFBFBD>W<EFBFBD>&<26><03>G<EFBFBD> <0C>7H<37>(H<> I<>F<EFBFBD><14><17><17>/<2F>0<>J<EFBFBD> <0C><1F><1F><16>W<EFBFBD>c<EFBFBD>'<27>l<EFBFBD>B<EFBFBD> G<>B<EFBFBD>
<EFBFBD>2<EFBFBD><11>7<EFBFBD>.<2E><03>8H<38>8H<38>I<> <0E>:<3A>:<3A>f<EFBFBD><11>m<EFBFBD> ,<2C>Q<EFBFBD> /<2F>/rc<00><<00>V^8<>dQhR\R\R\/#)r r.rr
r))r s"r rrZs!<00><00>2<>2<>U<EFBFBD>2<><05>2<>%<25>2rc<04>0<00>\P!R\V44p\P!R4p\P!W#V\V4V4^8wd\
P !R4h\P!W#^,4R,#)z<>
Verifies the signature of the signed message ``signed`` using the public
key ``pk`` and returns the unsigned message.
:param signed: bytes
:param pk: bytes
:rtype: bytes
rr+<00>Signature was forged or corruptr)rrr#r<00>crypto_sign_openr<00>BadSignatureErrorr)r.rr(<00> message_lens&& r r3r3Zsv<00><00><12>g<EFBFBD>g<EFBFBD>'<27><13>V<EFBFBD><1B>5<>G<EFBFBD><15>'<27>'<27>0<>1<>K<EFBFBD> <0C><1C><1C>W<EFBFBD>6<EFBFBD>3<EFBFBD>v<EFBFBD>;<3B><02>K<> <0C> <0A><12>#<23>#<23>$E<>F<>F<> <0E>:<3A>:<3A>g<EFBFBD>1<EFBFBD>~<7E> .<2E>q<EFBFBD> 1<>1rc<00>0<00>V^8<>dQhR\R\/#)r <00>public_key_bytesr
r))r s"r rro<00><00><00>A<01>A<01>5<EFBFBD>A<01>U<EFBFBD>Arc<04>4<00>\V4\8wd\P!R4h\p\
P !RV4p\P!W 4p\V^8HR\PR7\
P!W!4R,#)z<>
Converts a public Ed25519 key (encoded as bytes ``public_key_bytes``) to
a public Curve25519 key as bytes.
Raises a ValueError if ``public_key_bytes`` is not of length
``crypto_sign_PUBLICKEYBYTES``
:param public_key_bytes: bytes
:rtype: bytes
zInvalid curve public keyrrrr) r#rrr%<00>crypto_sign_curve25519_BYTESrrr<00>$crypto_sign_ed25519_pk_to_curve25519rrr)r7<00>curve_public_key_len<65>curve_public_keyrs& r r;r;o<00>}<00><00> <0B> <1B><1C> :<3A>:<3A><11>n<EFBFBD>n<EFBFBD>7<>8<>8<>7<><18><1A>w<EFBFBD>w<EFBFBD>0<>2F<32>G<><14> <0C> 1<> 1<><18>
<06>B<EFBFBD> <0B>2<EFBFBD><11>7<EFBFBD>.<2E><03>8H<38>8H<38>I<> <0E>:<3A>:<3A>&<26> =<3D>a<EFBFBD> @<40>@rc<00>0<00>V^8<>dQhR\R\/#<00>r <00>secret_key_bytesr
r))r s"r rr<00>r8rc<04>4<00>\V4\8wd\P!R4h\p\
P !RV4p\P!W 4p\V^8HR\PR7\
P!W!4R,#)z<>
Converts a secret Ed25519 key (encoded as bytes ``secret_key_bytes``) to
a secret Curve25519 key as bytes.
Raises a ValueError if ``secret_key_bytes``is not of length
``crypto_sign_SECRETKEYBYTES``
:param secret_key_bytes: bytes
:rtype: bytes
zInvalid curve secret keyrrrr) r#rrr%r:rrr<00>$crypto_sign_ed25519_sk_to_curve25519rrr)rA<00>curve_secret_key_len<65>curve_secret_keyrs& r rCrC<00>r>rc<00>0<00>V^8<>dQhR\R\/#r@r))r s"r rr<00>s<00><00>4<>4<>5<EFBFBD>4<>U<EFBFBD>4rc<04>h<00>\V4\8wd\P!R4hV\R#)z<>
Extract the public Ed25519 key from a secret Ed25519 key (encoded
as bytes ``secret_key_bytes``).
Raises a ValueError if ``secret_key_bytes``is not of length
``crypto_sign_SECRETKEYBYTES``
:param secret_key_bytes: bytes
:rtype: bytes
<EFBFBD>Invalid secret keyN<79>r#rrr%r$<00>rAs&r <00>crypto_sign_ed25519_sk_to_pkrK<00>s2<00><00> <0B> <1B><1C> :<3A>:<3A><11>n<EFBFBD>n<EFBFBD>1<>2<>2<> <1B>1<>2<> 3<>3rc<00>0<00>V^8<>dQhR\R\/#r@r))r s"r rr<00>s<00><00>4<>4<>U<EFBFBD>4<>u<EFBFBD>4rc<04>h<00>\V4\8wd\P!R4hVR\#)z<>
Extract the seed from a secret Ed25519 key (encoded
as bytes ``secret_key_bytes``).
Raises a ValueError if ``secret_key_bytes``is not of length
``crypto_sign_SECRETKEYBYTES``
:param secret_key_bytes: bytes
:rtype: bytes
rHNrIrJs&r <00>crypto_sign_ed25519_sk_to_seedrN<00>s2<00><00> <0B> <1B><1C> :<3A>:<3A><11>n<EFBFBD>n<EFBFBD>1<>2<>2<> <1B>2<>2<> 3<>3rc<00><a<00>]tRt^<5E>toRtR.tV3RlRltRtVtR#)<07>crypto_sign_ed25519ph_statezG
State object wrapping the sha-512 state used in ed25519ph computation
<EFBFBD>statec<00><<01>V^8<>dQhRR/#)r r
N<>)r <00> __classdict__s"<22>r r<00>(crypto_sign_ed25519ph_state.__annotate__<5F>s<00><><00>N<01>N<01>$<24>Nrc<08><><00>\P!R\4Vn\P
!VP4p\ V^8HR\PR7R#)rrrN) rr<00> crypto_sign_ed25519ph_STATEBYTESrQr<00>crypto_sign_ed25519ph_initrrr)<02>selfrs& r <00>__init__<5F>$crypto_sign_ed25519ph_state.__init__<5F>sE<00><00><1F>G<EFBFBD>G<EFBFBD> <1D>?<3F>
<EFBFBD><04>
<EFBFBD><11> +<2B> +<2B>D<EFBFBD>J<EFBFBD>J<EFBFBD> 7<><02><0E>r<EFBFBD>Q<EFBFBD>w<EFBFBD>2<>C<EFBFBD><L<><L<>Mr)rQN) <09>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__<5F> __slots__rZ<00>__static_attributes__<5F>__classdictcell__)rTs@r rPrP<00>s<00><><00><00><08><19> <09>I<EFBFBD>N<01>NrrPc<00>4<00>V^8<>dQhR\R\RR/#)r <00>edph<70>pmsgr
N<>rPr )r s"r rr<00>s)<00><00>J<01>J<01>
%<25>J<01>-2<>J<01> <09>Jrc<04>B<00>\\V\4R\PR7\\V\
4R\PR7\ P!VPV\V44p\V^8HR\PR7R#)z<>
Update the hash state wrapped in edph
:param edph: the ed25519ph state being updated
:type edph: crypto_sign_ed25519ph_state
:param pmsg: the partial message
:type pmsg: bytes
:rtype: None
<EFBFBD>/edph parameter must be a ed25519ph_state objectrz%pmsg parameter must be a bytes objectrN) r<00>
isinstancerPr<00> TypeErrorr r<00>crypto_sign_ed25519ph_updaterQr#r)rerfrs&& r rlrl<00>st<00><00> <0B><12>4<EFBFBD>4<>5<>9<><13> <0A> <0A><06>
 <0B><12>4<EFBFBD><15><1F>/<2F><13> <0A> <0A><06>
<0A> )<29> )<29>$<24>*<2A>*<2A>d<EFBFBD>C<EFBFBD><04>I<EFBFBD> F<>B<EFBFBD>
<EFBFBD>2<EFBFBD><11>7<EFBFBD>.<2E><03>8H<38>8H<38>Irc<00><<00>V^8<>dQhR\R\R\/#)r rerr
rg)r s"r rr<00>s$<00><00>&7<>&7<>
%<25>&7<>+0<>&7<>
<EFBFBD>&7rc<04>B<00>\\V\4R\PR7\\V\
4R\PR7\\ V4\8HRP\4\PR7\P!R\4p\P!VPV\PV4p\V^8HR\P R7\P"!V\4R,#)a/
Create a signature for the data hashed in edph
using the secret key sk
:param edph: the ed25519ph state for the data
being signed
:type edph: crypto_sign_ed25519ph_state
:param sk: the ed25519 secret key (secret and public part)
:type sk: bytes
:return: ed25519ph signature
:rtype: bytes
rirz+secret key parameter must be a bytes objectz secret key must be {} bytes longrrr)rrjrPrrkr r#rr rrr,r<00>"crypto_sign_ed25519ph_final_createrQ<00>NULLrr)rer<00> signaturers&& r roro<00>s<><00><00> <0B><12>4<EFBFBD>4<>5<>9<><13> <0A> <0A><06>
 <0B><12>2<EFBFBD>u<EFBFBD><1D>5<><13> <0A> <0A><06>
 <0B> <0B>B<EFBFBD><07>-<2D>-<2D> +<2B>3<>3<> &<26>
<EFBFBD><14> <0A> <0A> <06><14><07><07>)<29>+<<3C>=<3D>I<EFBFBD> <0C> /<2F> /<2F> <0C>
<EFBFBD>
<EFBFBD>I<EFBFBD>s<EFBFBD>x<EFBFBD>x<EFBFBD><12>
<06>B<EFBFBD> <0B>2<EFBFBD><11>7<EFBFBD>.<2E><03>8H<38>8H<38>I<> <0E>:<3A>:<3A>i<EFBFBD>!2<> 3<>A<EFBFBD> 6<>6rc<00>H<00>V^8<>dQhR\R\R\R\/#)r rerqrr
)rPr <00>bool)r s"r rrs,<00><00>0<10>0<10>
%<25>0<10>27<32>0<10>=B<>0<10> <09>0rc<04>z<00>\\V\4R\PR7\\V\
4R\PR7\\ V4\8HRP\4\PR7\\V\
4R\PR7\\ V4\8HRP\4\PR7\P!VPW4pV^8wd\P!R4hR#) a<>
Verify a prehashed signature using the public key pk
:param edph: the ed25519ph state for the data
being verified
:type edph: crypto_sign_ed25519ph_state
:param signature: the signature being verified
:type signature: bytes
:param pk: the ed25519 public part of the signing key
:type pk: bytes
:return: True if the signature is valid
:rtype: boolean
:raises exc.BadSignatureError: if the signature is not valid
rirz*signature parameter must be a bytes objectzsignature must be {} bytes longz+public key parameter must be a bytes objectz public key must be {} bytes longr2T)rrjrPrrkr r#r,r rr<00>"crypto_sign_ed25519ph_final_verifyrQr4)rerqrrs&&& r rurus<><00><00>" <0B><12>4<EFBFBD>4<>5<>9<><13> <0A> <0A><06>
 <0B><12>9<EFBFBD>e<EFBFBD>$<24>4<><13> <0A> <0A><06>
 <0B> <0B>I<EFBFBD><0E>+<2B>+<2B> *<2A>2<>2<>3D<33>E<><13> <0A> <0A><06>
 <0B><12>2<EFBFBD>u<EFBFBD><1D>5<><13> <0A> <0A><06>
 <0B> <0B>B<EFBFBD><07>-<2D>-<2D> +<2B>3<>3<> &<26>
<EFBFBD><14> <0A> <0A> <06>
<0A> /<2F> /<2F><04>
<EFBFBD>
<EFBFBD>I<EFBFBD> J<>B<EFBFBD> <09>Q<EFBFBD>w<EFBFBD><11>#<23>#<23>$E<>F<>F<> rc<00><00>V^8<>dQh/^\9d
\;R&^\9d
\;R&^\9d
\;R&^\9d
\;R&^\9d
\;R&^\9d
\;R&#)r r,r$rrr:rW)<02>__conditional_annotations__<5F>int)r s"r rrsy<00><00><18><18>1<>0<>3<EFBFBD>0<><19>C<01>B<>s<EFBFBD>B<><19>C<01>B<>C<EFBFBD>B<><19>C<01>B<>C<EFBFBD>B<><19>D<01>C<>c<EFBFBD>C<><19>O<01>N<>#<23>N<>rN)#rw<00>typingr<00>naclrr<00> nacl._sodiumrr<00>nacl.exceptionsr<00>crypto_sign_bytesr,<00>crypto_sign_secretkeybytesr$<00>crypto_sign_publickeybytesrr<00>crypto_box_secretkeybytesr:<00> crypto_sign_ed25519ph_statebytesrWrr&r-r3r;rCrKrNrPrlrorur)rws@r <00><module>r<>s<><00><><01><19><18>"<22>!<21>"<22><1D>.<2E>.<2E>0<><11>0<> <20>;<3B>;<3B>=<3D><11>B<><15>B<>"%<25>"@<40>"@<40>"B<><1A>B<>"%<25>"@<40>"@<40>"B<><1A>B<>$'<27>$A<>$A<>$C<><1C>C<>(+<2B>(L<>(L<>(N<> <20>N<><06>$<06>,0<>$2<>*A<01>2A<01>24<>"4<>"N<01>N<01>"J<01>4&7<>R0r