����JFIFXX�����    $.' ",#(7),01444'9=82<.342  2!!22222222222222222222222222222222222222222222222222����"��4�� ���,�PG"Z_�4�˷����kjز�Z�,F+��_z�,�© �����zh6�٨�ic�fu���#ډb���_�N�?��wQ���5-�~�I���8����TK<5o�Iv-�����k�_U_�����~b�M��d����Ӝ�U�Hh��?]��E�w��Q���k�{��_}qFW7HTՑ��Y��F�?_�'ϔ��_�Ջt��=||I ��6�έ"�����D���/[�k�9���Y�8ds|\���Ҿp6�Ҵ���]��.����6�z<�v��@]�i%��$j��~�g��J>��no����pM[me�i$[����s�o�ᘨ�˸ nɜG-�ĨU�ycP�3.DB�li�;��hj���x7Z^�N�h������N3u{�:j�x�힞��#M&��jL P@_���� P��&��o8������9�����@Sz6�t7#O�ߋ �s}Yf�T���lmr����Z)'N��k�۞p����w\�Tȯ?�8`�O��i{wﭹW�[�r�� ��Q4F�׊���3m&L�=��h3����z~��#�\�l :�F,j@�� ʱ�wQT����8�"kJO���6�֚l����}���R�>ډK���]��y����&����p�}b��;N�1�m�r$�|��7�>e�@B�TM*-iH��g�D�)� E�m�|�ؘbҗ�a��Ҿ����t4���o���G��*oCN�rP���Q��@z,|?W[0�����:�n,jWiE��W��$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S����VN;�}�s?.����� w�9��˟<���Mq4�Wv'��{)0�1mB��V����W[�����8�/<� �%���wT^�5���b��)iM� pg�N�&ݝ��VO~�q���u���9� ����!��J27����$O-���! �:�%H��� ـ����y�ΠM=t{!S�� oK8������t<����è:a������[�����ա�H���~��w��Qz`�po�^ ����Q��n� �,uu�C�$ ^���,������8�#��:�6��e�|~���!�3�3.�\0��q��o�4`.|� ����y�Q�`~;�d�ׯ,��O�Zw�������`73�v�܋�<���Ȏ�� ـ4k��5�K�a�u�=9Yd��$>x�A�&�� j0� ���vF��� Y�|�y��� ~�6�@c��1vOp�Ig����4��l�OD���L����� R���c���j�_�uX6��3?nk��Wy�f;^*B� ��@�~a�`��Eu������+���6�L��.ü>��}y���}_�O�6�͐�:�YrG�X��kG�����l^w���~㒶sy��Iu�!� W ��X��N�7BV��O��!X�2����wvG�R�f�T#�����t�/?���%8�^�W�aT��G�cL�M���I��(J����1~�8�?aT ���]����AS�E��(��*E}� 2��#I/�׍qz��^t�̔���b�Yz4x���t�){ OH��+(E��A&�N�������XT��o��"�XC��'���)}�J�z�p� ��~5�}�^����+�6����w��c��Q�|Lp�d�H��}�(�.|����k��c4^�"�����Z?ȕ ��a<�L�!039C� �Eu�C�F�Ew�ç ;�n?�*o���B�8�bʝ���'#Rqf���M}7����]����s2tcS{�\icTx;�\��7K���P���ʇ Z O-��~��c>"��?�������P��E��O�8��@�8��G��Q�g�a�Վ���󁶠�䧘��_%#r�>�1�z�a��eb��qcPѵ��n���#L��� =��׀t� L�7�`��V���A{�C:�g���e@�w1 Xp3�c3�ġ����p��M"'-�@n4���fG��B3�DJ�8[Jo�ߐ���gK)ƛ��$���� ���8�3�����+���� �����6�ʻ���� ���S�kI�*KZlT _`���?��K����QK�d����B`�s}�>���`��*�>��,*@J�d�oF*����弝��O}�k��s��]��y�ߘ��c1G�V���<=�7��7����6�q�PT��tXԀ�!9*4�4Tހ3XΛex�46���Y��D ����� �BdemDa����\�_l,��G�/���֌7���Y�](�xTt^%�GE�����4�}bT���ڹ�����;Y)���B�Q��u��>J/J �⮶.�XԄ��j�ݳ�+E��d ��r�5�_D�1 ��o�� �B�x�΢�#���<��W�����8���R6�@g�M�.��� dr�D��>(otU��@x=��~v���2� ӣ�d�oBd��3�eO�6�㣷�����ݜ6��6Y��Qz`��S��{���\P�~z m5{J/L��1������<�e�ͅPu�b�]�ϔ���'������f�b� Zpw��c`"��i���BD@:)ִ�:�]��hv�E�w���T�l��P���"Ju�}��وV J��G6��. J/�Qgl߭�e�����@�z�Zev2u�)]կ�����7x���s�M�-<ɯ�c��r�v�����@��$�ޮ}lk���a���'����>x��O\�ZFu>�����ck#��&:��`�$�ai�>2Δ����l���oF[h��lE�ܺ�Πk:)���`�� $[6�����9�����kOw�\|���8}������ބ:��񶐕��I�A1/�=�2[�,�!��.}gN#�u����b��� ~��݊��}34q����d�E��Lc��$��"�[q�U�硬g^��%B �z���r�pJ�ru%v\h1Y�ne`ǥ:g���pQM~�^�Xi� ��`S�:V29.�P���V�?B�k�� AEvw%�_�9C�Q����wKekPؠ�\�;Io d�{ ߞo�c1eP����\� `����E=���@K<�Y���eڼ�J���w����{av�F�'�M�@/J��+9p���|]�����Iw &`��8���&M�hg��[�{��Xj��%��Ӓ�$��(����ʹN���<>�I���RY���K2�NPlL�ɀ)��&e����B+ь����( � �JTx���_?EZ� }@ 6�U���뙢ط�z��dWI�n` D����噥�[��uV��"�G&Ú����2g�}&m��?ċ�"����Om#��������� ��{�ON��"S�X��Ne��ysQ���@Fn��Vg���dX�~nj�]J�<�K]:��FW��b�������62�=��5f����JKw��bf�X�55��~J �%^����:�-�QIE��P��v�nZum� z � ~ə ���� ���ة����;�f��\v���g�8�1��f24;�V���ǔ�)����9���1\��c��v�/'Ƞ�w�������$�4�R-��t���� e�6�/�ġ �̕Ecy�J���u�B���<�W�ַ~�w[B1L۲�-JS΂�{���΃������A��20�c#��@ 0!1@AP"#2Q`$3V�%45a6�FRUq��� ����^7ׅ,$n�������+��F�`��2X'��0vM��p�L=������5��8������u�p~���.�`r�����\���O��,ư�0oS ��_�M�����l���4�kv\JSd���x���SW�<��Ae�IX����������$I���w�:S���y���›R��9�Q[���,�5�;�@]�%���u�@ *ro�lbI �� ��+���%m:�͇ZV�����u�̉����θau<�fc�.����{�4Ա� �Q����*�Sm��8\ujqs]{kN���)qO�y�_*dJ�b�7���yQqI&9�ԌK!�M}�R�;������S�T���1���i[U�ɵz�]��U)V�S6���3$K{�ߊ<�(� E]Զ[ǼENg�����'�\?#)Dkf��J���o��v���'�%ƞ�&K�u�!��b�35LX�Ϸ��63$K�a�;�9>,R��W��3�3� d�JeTYE.Mϧ��-�o�j3+y��y^�c�������VO�9NV\nd�1 ��!͕_)a�v;����թ�M�lWR1��)El��P;��yوÏ�u 3�k�5Pr6<�⒲l�!˞*��u־�n�!�l:����UNW ��%��Chx8vL'��X�@��*��)���̮��ˍ��� ���D-M�+J�U�kvK����+�x8��cY������?�Ԡ��~3mo��|�u@[XeY�C�\Kp�x8�oC�C�&����N�~3-H���� ��MX�s�u<`���~"WL��$8ξ��3���a�)|:@�m�\���^�`�@ҷ)�5p+��6���p�%i)P M���ngc�����#0Aruz���RL+xSS?���ʮ}()#�t��mˇ!��0}}y����<�e� �-ή�Ԩ��X������ MF���ԙ~l L.3���}�V뽺�v�����멬��Nl�)�2����^�Iq��a��M��qG��T�����c3#������3U�Ǎ���}��לS�|qa��ڃ�+���-��2�f����/��bz��ڐ�� �ݼ[2�ç����k�X�2�* �Z�d���J�G����M*9W���s{��w���T��x��y,�in�O�v��]���n����P�$�JB@=4�OTI�n��e�22a\����q�d���%�$��(���:���: /*�K[PR�fr\nڙdN���F�n�$�4�[�� U�zƶ����� �mʋ���,�ao�u 3�z� �x��Kn����\[��VFmbE;�_U��&V�Gg�]L�۪&#n%�$ɯ�dG���D�TI=�%+AB�Ru#��b4�1�»x�cs�YzڙJG��f��Il��d�eF'T� iA��T���uC�$����Y��H?����[!G`}���ͪ� �纤Hv\������j�Ex�K���!���OiƸ�Yj�+u-<���'q����uN�*�r\��+�]���<�wOZ.fp�ێ��,-*)V?j-kÊ#�`�r��dV����(�ݽBk�����G�ƛk�QmUڗe��Z���f}|����8�8��a���i��3'J�����~G_�^���d�8w������ R�`(�~�.��u���l�s+g�bv���W���lGc}��u���afE~1�Ue������Z�0�8�=e�� f@/�jqEKQQ�J��oN��J���W5~M>$6�Lt�;$ʳ{���^��6�{����v6���ķܰg�V�cnn �~z�x�«�,2�u�?cE+Ș�H؎�%�Za�)���X>uW�Tz�Nyo����s���FQƤ��$��*�&�LLXL)�1�" L��eO��ɟ�9=���:t��Z���c��Ž���Y?�ӭV�wv�~,Y��r�ۗ�|�y��GaF�����C�����.�+� ���v1���fήJ�����]�S��T��B��n5sW}y�$��~z�'�c ��8 ��� ,! �p��VN�S��N�N�q��y8z˱�A��4��*��'������2n<�s���^ǧ˭P�Jޮɏ�U�G�L�J�*#��<�V��t7�8����TĜ>��i}K%,���)[��z�21z ?�N�i�n1?T�I�R#��m-�����������������1����lA�`��fT5+��ܐ�c�q՝��ʐ��,���3�f2U�եmab��#ŠdQ�y>\��)�SLY����w#��.���ʑ�f��� ,"+�w�~�N�'�c�O�3F�������N<���)j��&��,-� �љ���֊�_�zS���TǦ����w�>��?�������n��U仆�V���e�����0���$�C�d���rP �m�׈e�Xm�Vu� �L��.�bֹ��� �[Դaզ���*��\y�8�Է:�Ez\�0�Kq�C b��̘��cө���Q��=0Y��s�N��S.���3.���O�o:���#���v7�[#߫ ��5�܎�L���Er4���9n��COWlG�^��0k�%<���ZB���aB_���������'=��{i�v�l�$�uC���mƎҝ{�c㱼�y]���W�i ��ߧc��m�H� m�"�"�����;Y�ߝ�Z�Ǔ�����:S#��|}�y�,/k�Ld� TA�(�AI$+I3��;Y*���Z��}|��ӧO��d�v��..#:n��f>�>���ȶI�TX��� 8��y����"d�R�|�)0���=���n4��6ⲑ�+��r<�O�܂~zh�z����7ܓ�HH�Ga롏���nCo�>������a ���~]���R���̲c?�6(�q�;5%� |�uj�~z8R=X��I�V=�|{v�Gj\gc��q����z�؋%M�ߍ����1y��#��@f^���^�>N�����#x#۹��6�Y~�?�dfPO��{��P�4��V��u1E1J �*|���%���JN��`eWu�zk M6���q t[�� ��g�G���v��WIG��u_ft����5�j�"�Y�:T��ɐ���*�;� e5���4����q$C��2d�}���� _S�L#m�Yp��O�.�C�;��c����Hi#֩%+) �Ӎ��ƲV���SYź��g |���tj��3�8���r|���V��1#;.SQ�A[���S������#���`n�+���$��$I �P\[�@�s��(�ED�z���P��])8�G#��0B��[ى��X�II�q<��9�~[Z멜�Z�⊔IWU&A>�P~�#��dp<�?����7���c��'~���5 ��+$���lx@�M�dm��n<=e�dyX��?{�|Aef ,|n3�<~z�ƃ�uۧ�����P��Y,�ӥQ�*g�#먙R�\���;T��i,��[9Qi歉����c>]9�� ��"�c��P�� �Md?٥��If�ت�u��k��/����F��9�c*9��Ǎ:�ØF���z�n*�@|I�ށ9����N3{'��[�'ͬ�Ҳ4��#}��!�V� Fu��,�,mTIk���v C�7v���B�6k�T9��1�*l� '~��ƞF��lU��'�M ����][ΩũJ_�{�i�I�n��$���L�� j��O�dx�����kza۪��#�E��Cl����x˘�o�����V���ɞ�ljr��)�/,�߬h�L��#��^��L�ф�,íMƁe�̩�NB�L�����iL����q�}��(��q��6IçJ$�W�E$��:������=#����(�K�B����zђ <��K(�N�۫K�w��^O{!����)�H���>x�������lx�?>Պ�+�>�W���,Ly!_�D���Ō�l���Q�!�[ �S����J��1��Ɛ�Y}��b,+�Lo�x�ɓ)����=�y�oh�@�꥟/��I��ѭ=��P�y9��� �ۍYӘ�e+�p�Jnϱ?V\SO%�(�t� ���=?MR�[Ș�����d�/ ��n�l��B�7j� ��!�;ӥ�/�[-���A�>�dN�sLj ��,ɪv��=1c�.SQ�O3�U���ƀ�ܽ�E����������̻��9G�ϷD�7(�}��Ävӌ\�y�_0[w ���<΍>����a_��[0+�L��F.�޺��f�>oN�T����q;���y\��bՃ��y�jH�<|q-eɏ�_?_9+P���Hp$�����[ux�K w�Mw��N�ی'$Y2�=��q���KB��P��~������Yul:�[<����F1�2�O���5=d����]Y�sw:���Ϯ���E��j,_Q��X��z`H1,#II ��d�wr��P˂@�ZJV����y$�\y�{}��^~���[:N����ߌ�U�������O��d�����ؾe��${p>G��3c���Ė�lʌ�� ת��[��`ϱ�-W����dg�I��ig2��� ��}s ��ؤ(%#sS@���~���3�X�nRG�~\jc3�v��ӍL��M[JB�T��s3}��j�Nʖ��W����;7��ç?=X�F=-�=����q�ߚ���#���='�c��7���ڑW�I(O+=:uxq�������������e2�zi+�kuG�R��������0�&e�n���iT^J����~\jy���p'dtG��s����O��3����9* �b#Ɋ�� p������[Bws�T�>d4�ۧs���nv�n���U���_�~,�v����ƜJ1��s�� �QIz��)�(lv8M���U=�;����56��G���s#�K���MP�=��LvyGd��}�VwWBF�'�à �?MH�U�g2�� ����!�p�7Q��j��ڴ����=��j�u��� Jn�A s���uM������e��Ɔ�Ҕ�!)'��8Ϣ�ٔ��ޝ(��Vp���צ֖d=�IC�J�Ǡ{q������kԭ�߸���i��@K����u�|�p=..�*+����x�����z[Aqġ#s2a�Ɗ���RR�)*HRsi�~�a &f��M��P����-K�L@��Z��Xy�'x�{}��Zm+���:�)�) IJ�-i�u���� ���ܒH��'�L(7�y�GӜq���� j��� 6ߌg1�g�o���,kر���tY�?W,���p���e���f�OQS��!K�۟cҒA�|ս�j�>��=⬒��˧L[�� �߿2JaB~R��u�:��Q�] �0H~���]�7��Ƽ�I���(}��cq '�ήET���q�?f�ab���ӥvr� �)o��-Q��_'����ᴎo��K������;��V���o��%���~OK ����*��b�f:���-ťIR��`B�5!RB@���ï�� �u �̯e\�_U�_������� g�ES��3�������QT��a����x����U<~�c?�*�#]�MW,[8O�a�x��]�1bC|踤�P��lw5V%�)�{t�<��d��5���0i�XSU��m:��Z�┵�i�"��1�^B�-��P�hJ��&)O��*�D��c�W��vM��)����}���P��ܗ-q����\mmζZ-l@�}��a��E�6��F�@��&Sg@���ݚ�M����� ȹ 4����#p�\H����dYDo�H���"��\��..R�B�H�z_�/5˘����6��KhJR��P�mƶi�m���3�,#c�co��q�a)*Pt����R�m�k�7x�D�E�\Y�閣_X�<���~�)���c[[�BP����6�Yq���S��0����%_����;��Àv�~�| VS؇ ��'O0��F0��\���U�-�d@�����7�SJ*z��3n��y��P����O���������m�~�P�3|Y��ʉr#�C�<�G~�.,! ���bqx���h~0=��!ǫ�jy����l�O,�[B��~��|9��ٱ����Xly�#�i�B��g%�S��������tˋ���e���ې��\[d�t)��.+u�|1 ������#�~Oj����hS�%��i.�~X���I�H�m��0n���c�1uE�q��cF�RF�o���7� �O�ꮧ� ���ۛ{��ʛi5�rw?׌#Qn�TW��~?y$��m\�\o����%W� ?=>S�N@�� �Ʈ���R����N�)�r"C�:��:����� �����#��qb��Y�. �6[��2K����2u�Ǧ�HYR��Q�MV��� �G�$��Q+.>�����nNH��q�^��� ����q��mM��V��D�+�-�#*�U�̒ ���p욳��u:�������IB���m���PV@O���r[b= �� ��1U�E��_Nm�yKbN�O���U�}�the�`�|6֮P>�\2�P�V���I�D�i�P�O;�9�r�mAHG�W�S]��J*�_�G��+kP�2����Ka�Z���H�'K�x�W�MZ%�O�YD�Rc+o��?�q��Ghm��d�S�oh�\�D�|:W������UA�Qc yT�q������~^�H��/��#p�CZ���T�I�1�ӏT����4��"�ČZ�����}��`w�#�*,ʹ�� ��0�i��課�Om�*�da��^gJ݅{���l�e9uF#T�ֲ��̲�ٞC"�q���ߍ ոޑ�o#�XZTp����@ o�8��(jd��xw�]�,f���`~�|,s��^����f�1���t��|��m�򸄭/ctr��5s��7�9Q�4�H1꠲BB@l9@���C�����+�wp�xu�£Yc�9��?`@#�o�mH�s2��)�=��2�.�l����jg�9$�Y�S�%*L������R�Y������7Z���,*=�䷘$�������arm�o�ϰ���UW.|�r�uf����IGw�t����Zwo��~5 ��YյhO+=8fF�)�W�7�L9lM�̘·Y���֘YLf�큹�pRF���99.A �"wz��=E\Z���'a� 2��Ǚ�#;�'}�G���*��l��^"q��+2FQ� hj��kŦ��${���ޮ-�T�٭cf�|�3#~�RJ����t��$b�(R��(����r���dx� >U b�&9,>���%E\� Ά�e�$��'�q't��*�א���ެ�b��-|d���SB�O�O��$�R+�H�)�܎�K��1m`;�J�2�Y~9��O�g8=vqD`K[�F)k�[���1m޼c��n���]s�k�z$@��)!I �x՝"v��9=�ZA=`Ɠi �:�E��)`7��vI��}d�YI�_ �o�:ob���o ���3Q��&D&�2=�� �Ά��;>�h����y.*ⅥS������Ӭ�+q&����j|UƧ����}���J0��WW< ۋS�)jQR�j���Ư��rN)�Gű�4Ѷ(�S)Ǣ�8��i��W52���No˓� ۍ%�5brOn�L�;�n��\G����=�^U�dI���8$�&���h��'���+�(������cȁ߫k�l��S^���cƗjԌE�ꭔ��gF���Ȓ��@���}O���*;e�v�WV���YJ\�]X'5��ղ�k�F��b 6R�o՜m��i N�i����>J����?��lPm�U��}>_Z&�KK��q�r��I�D�Չ~�q�3fL�:S�e>���E���-G���{L�6p�e,8��������QI��h��a�Xa��U�A'���ʂ���s�+טIjP�-��y�8ۈZ?J$��W�P� ��R�s�]��|�l(�ԓ��sƊi��o(��S0��Y� 8�T97.�����WiL��c�~�dxc�E|�2!�X�K�Ƙਫ਼�$((�6�~|d9u+�qd�^3�89��Y�6L�.I�����?���iI�q���9�)O/뚅����O���X��X�V��ZF[�یgQ�L��K1���RҖr@v�#��X�l��F���Нy�S�8�7�kF!A��sM���^rkp�jP�DyS$N���q��nxҍ!U�f�!eh�i�2�m���`�Y�I�9r�6� �TF���C}/�y�^���Η���5d�'��9A-��J��>{�_l+�`��A���[�'��յ�ϛ#w:݅�%��X�}�&�PSt�Q�"�-��\縵�/����$Ɨh�Xb�*�y��BS����;W�ջ_mc�����vt?2}1�;qS�d�d~u:2k5�2�R�~�z+|HE!)�Ǟl��7`��0�<�,�2*���Hl-��x�^����'_TV�gZA�'j� ^�2Ϊ��N7t�����?w�� �x1��f��Iz�C-Ȗ��K�^q�;���-W�DvT�7��8�Z�������� hK�(P:��Q- �8�n�Z���܃e貾�<�1�YT<�,�����"�6{/ �?�͟��|1�:�#g��W�>$����d��J��d�B��=��jf[��%rE^��il:��B���x���Sּ�1հ��,�=��*�7 fcG��#q� �eh?��2�7�����,�!7x��6�n�LC�4x��},Geǝ�tC.��vS �F�43��zz\��;QYC,6����~;RYS/6���|2���5���v��T��i����������mlv��������&� �nRh^ejR�LG�f���? �ۉҬܦƩ��|��Ȱ����>3����!v��i�ʯ�>�v��オ�X3e���_1z�Kȗ\<������!�8���V��]��?b�k41�Re��T�q��mz��TiOʦ�Z��Xq���L������q"+���2ۨ��8}�&N7XU7Ap�d�X��~�׿��&4e�o�F��� �H����O���č�c�� 懴�6���͉��+)��v;j��ݷ�� �UV�� i��� j���Y9GdÒJ1��詞�����V?h��l����l�cGs�ځ�������y�Ac�����\V3�? �� ܙg�>qH�S,�E�W�[�㺨�uch�⍸�O�}���a��>�q�6�n6����N6�q������N ! 1AQaq�0@����"2BRb�#Pr���3C`��Scst���$4D���%Td�� ?���N����a��3��m���C���w��������xA�m�q�m���m������$����4n淿t'��C"w��zU=D�\R+w�p+Y�T�&�պ@��ƃ��3ޯ?�Aﶂ��aŘ���@-�����Q�=���9D��ռ�ѻ@��M�V��P��܅�G5�f�Y<�u=,EC)�<�Fy'�"�&�չ�X~f��l�KԆV��?�� �W�N����=(� �;���{�r����ٌ�Y���h{�١������jW����P���Tc�����X�K�r��}���w�R��%��?���E��m�� �Y�q|����\lEE4���r���}�lsI�Y������f�$�=�d�yO����p�����yBj8jU�o�/�S��?�U��*������ˍ�0������u�q�m [�?f����a�� )Q�>����6#������� ?����0UQ����,IX���(6ڵ[�DI�MNލ�c&���υ�j\��X�R|,4��� j������T�hA�e��^���d���b<����n�� �즇�=!���3�^�`j�h�ȓr��jẕ�c�,ٞX����-����a�ﶔ���#�$��]w�O��Ӫ�1y%��L�Y<�wg#�ǝ�̗`�x�xa�t�w��»1���o7o5��>�m뭛C���Uƃߜ}�C���y1Xνm�F8�jI���]����H���ۺиE@I�i;r�8ӭ����V�F�Շ| ��&?�3|x�B�MuS�Ge�=Ӕ�#BE5G�����Y!z��_e��q�р/W>|-�Ci߇�t�1ޯќd�R3�u��g�=0 5��[?�#͏��q�cf���H��{ ?u�=?�?ǯ���}Z��z���hmΔ�BFTW�����<�q�(v� ��!��z���iW]*�J�V�z��gX֧A�q�&��/w���u�gYӘa���; �i=����g:��?2�dž6�ى�k�4�>�Pxs����}������G�9��3 ���)gG�R<>r h�$��'nc�h�P��Bj��J�ҧH� -��N1���N��?��~��}-q!=��_2hc�M��l�vY%UE�@|�v����M2�.Y[|y�"Eï��K�ZF,�ɯ?,q�?v�M 80jx�"�;�9vk�����+ ֧�� �ȺU��?�%�vcV��mA�6��Qg^M����A}�3�nl� QRN�l8�kkn�'�����(��M�7m9و�q���%ޟ���*h$Zk"��$�9��: �?U8�Sl��,,|ɒ��xH(ѷ����Gn�/Q�4�P��G�%��Ա8�N��!� �&�7�;���eKM7�4��9R/%����l�c>�x;������>��C�:�����t��h?aKX�bhe�ᜋ^�$�Iհ �hr7%F$�E��Fd���t��5���+�(M6�t����Ü�UU|zW�=a�Ts�Tg������dqP�Q����b'�m���1{|Y����X�N��b �P~��F^F:����k6�"�j!�� �I�r�`��1&�-$�Bevk:y���#yw��I0��x��=D�4��tU���P�ZH��ڠ底taP��6����b>�xa����Q�#� WeF��ŮNj�p�J* mQ�N����*I�-*�ȩ�F�g�3 �5��V�ʊ�ɮ�a��5F���O@{���NX��?����H�]3��1�Ri_u��������ѕ�� ����0��� F��~��:60�p�͈�S��qX#a�5>���`�o&+�<2�D����: �������ڝ�$�nP���*)�N�|y�Ej�F�5ټ�e���ihy�Z �>���k�bH�a�v��h�-#���!�Po=@k̆IEN��@��}Ll?j�O������߭�ʞ���Q|A07x���wt!xf���I2?Z��<ץ�T���cU�j��]��陎Ltl �}5�ϓ��$�,��O�mˊ�;�@O��jE��j(�ا,��LX���LO���Ц�90�O �.����a��nA���7������j4 ��W��_ٓ���zW�jcB������y՗+EM�)d���N�g6�y1_x��p�$Lv:��9�"z��p���ʙ$��^��JԼ*�ϭ����o���=x�Lj�6�J��u82�A�H�3$�ٕ@�=Vv�]�'�qEz�;I˼��)��=��ɯ���x �/�W(V���p�����$ �m�������u�����񶤑Oqˎ�T����r��㠚x�sr�GC��byp�G��1ߠ�w e�8�$⿄����/�M{*}��W�]˷.�CK\�ުx���/$�WPw���r� |i���&�}�{�X� �>��$-��l���?-z���g����lΆ���(F���h�vS*���b���߲ڡn,|)mrH[���a�3�ר�[1��3o_�U�3�TC�$��(�=�)0�kgP���� ��u�^=��4 �WYCҸ:��vQ�ר�X�à��tk�m,�t*��^�,�}D*� �"(�I��9R����>`�`��[~Q]�#af��i6l��8���6�:,s�s�N6�j"�A4���IuQ��6E,�GnH��zS�HO�uk�5$�I�4��ؤ�Q9�@��C����wp�BGv[]�u�Ov���0I4���\��y�����Q�Ѹ��~>Z��8�T��a��q�ޣ;z��a���/��S��I:�ܫ_�|������>=Z����8:�S��U�I�J��"IY���8%b8���H��:�QO�6�;7�I�S��J��ҌAά3��>c���E+&jf$eC+�z�;��V����� �r���ʺ������my�e���aQ�f&��6�ND��.:��NT�vm�<- u���ǝ\MvZY�N�NT��-A�>jr!S��n�O 1�3�Ns�%�3D@���`������ܟ 1�^c<���� �a�ɽ�̲�Xë#�w�|y�cW�=�9I*H8�p�^(4���՗�k��arOcW�tO�\�ƍR��8����'�K���I�Q�����?5�>[�}��yU�ײ -h��=��% q�ThG�2�)���"ו3]�!kB��*p�FDl�A���,�eEi�H�f�Ps�����5�H:�Փ~�H�0Dت�D�I����h�F3�������c��2���E��9�H��5�zԑ�ʚ�i�X�=:m�xg�hd(�v����׊�9iS��O��d@0ڽ���:�p�5�h-��t�&���X�q�ӕ,��ie�|���7A�2���O%P��E��htj��Y1��w�Ѓ!����  ���� ࢽ��My�7�\�a�@�ţ�J �4�Ȼ�F�@o�̒?4�wx��)��]�P��~�����u�����5�����7X ��9��^ܩ�U;Iꭆ 5 �������eK2�7(�{|��Y׎ �V��\"���Z�1� Z�����}��(�Ǝ"�1S���_�vE30>���p;� ΝD��%x�W�?W?v����o�^V�i�d��r[��/&>�~`�9Wh��y�;���R��� ;;ɮT��?����r$�g1�K����A��C��c��K��l:�'��3 c�ﳯ*"t8�~l��)���m��+U,z��`(�>yJ�?����h>��]��v��ЍG*�{`��;y]��I�T� ;c��NU�fo¾h���/$���|NS���1�S�"�H��V���T���4��uhǜ�]�v;���5�͠x��'C\�SBpl���h}�N����� A�Bx���%��ޭ�l��/����T��w�ʽ]D�=����K���ž�r㻠l4�S�O?=�k �M:� ��c�C�a�#ha���)�ѐxc�s���gP�iG��{+���x���Q���I= �� z��ԫ+ �8"�k�ñ�j=|����c ��y��CF��/��*9ж�h{ �?4�o� ��k�m�Q�N�x��;�Y��4膚�a�w?�6�>e]�����Q�r�:����g�,i"�����ԩA�*M�<�G��b�if��l^M��5� �Ҩ�{����6J��ZJ�����P�*�����Y���ݛu�_4�9�I8�7���������,^ToR���m4�H��?�N�S�ѕw��/S��甍�@�9H�S�T��t�ƻ���ʒU��*{Xs�@����f�����֒Li�K{H�w^���������Ϥm�tq���s� ���ք��f:��o~s��g�r��ט� �S�ѱC�e]�x���a��) ���(b-$(�j>�7q�B?ӕ�F��hV25r[7 Y� }L�R��}����*sg+��x�r�2�U=�*'WS��ZDW]�WǞ�<��叓���{�$�9Ou4��y�90-�1�'*D`�c�^o?(�9��u���ݐ��'PI&� f�Jݮ�������:wS����jfP1F:X �H�9dԯ���˝[�_54 �}*;@�ܨ�� ð�yn�T���?�ןd�#���4rG�ͨ��H�1�|-#���Mr�S3��G�3�����)�.᧏3v�z֑��r����$G"�`j �1t��x0<Ɔ�Wh6�y�6��,œ�Ga��gA����y��b��)��h�D��ß�_�m��ü �gG;��e�v��ݝ�nQ� ��C����-�*��o���y�a��M��I�>�<���]obD��"�:���G�A��-\%LT�8���c�)��+y76���o�Q�#*{�(F�⽕�y����=���rW�\p���۩�c���A���^e6��K������ʐ�cVf5$�'->���ՉN"���F�"�UQ@�f��Gb~��#�&�M=��8�ט�JNu9��D��[̤�s�o�~������ G��9T�tW^g5y$b��Y'��س�Ǵ�=��U-2 #�MC�t(�i� �lj�@Q 5�̣i�*�O����s�x�K�f��}\��M{E�V�{�υ��Ƈ�����);�H����I��fe�Lȣr�2��>��W�I�Ȃ6������i��k�� �5�YOxȺ����>��Y�f5'��|��H+��98pj�n�.O�y�������jY��~��i�w'������l�;�s�2��Y��:'lg�ꥴ)o#'Sa�a�K��Z� �m��}�`169�n���"���x��I ��*+� }F<��cГ���F�P�������ֹ*�PqX�x۩��,� ��N�� �4<-����%����:��7����W���u�`����� $�?�I��&����o��o��`v�>��P��"��l���4��5'�Z�gE���8���?��[�X�7(��.Q�-��*���ތL@̲����v��.5���[��=�t\+�CNܛ��,g�SQnH����}*F�G16���&:�t��4ُ"A��̣��$�b �|����#rs��a�����T�� ]�<�j��BS�('$�ɻ� �wP;�/�n��?�ݜ��x�F��yUn�~mL*-�������Xf�wd^�a�}��f�,=t�׵i�.2/wpN�Ep8�OР���•��R�FJ� 55TZ��T �ɭ�<��]��/�0�r�@�f��V��V����Nz�G��^���7hZi����k��3�,kN�e|�vg�1{9]_i��X5y7� 8e]�U����'�-2,���e"����]ot�I��Y_��n�(JҼ��1�O ]bXc���Nu�No��pS���Q_���_�?i�~�x h5d'�(qw52] ��'ޤ�q��o1�R!���`ywy�A4u���h<קy���\[~�4�\ X�Wt/� 6�����n�F�a8��f���z �3$�t(���q��q�x��^�XWeN'p<-v�!�{�(>ӽDP7��ո0�y)�e$ٕv�Ih'Q�EA�m*�H��RI��=:��� ���4牢) �%_iN�ݧ�l]� �Nt���G��H�L��� ɱ�g<���1V�,�J~�ٹ�"K��Q�� 9�HS�9�?@��k����r�;we݁�]I�!{ �@�G�[�"��`���J:�n]�{�cA�E����V��ʆ���#��U9�6����j�#Y�m\��q�e4h�B�7��C�������d<�?J����1g:ٳ���=Y���D�p�ц� ׈ǔ��1�]26؜oS�'��9�V�FVu�P�h�9�xc�oq�X��p�o�5��Ա5$�9W�V(�[Ak�aY錎qf;�'�[�|���b�6�Ck��)��#a#a˙��8���=äh�4��2��C��4tm^ �n'c���]GQ$[Wҿ��i���vN�{Fu ��1�gx��1┷���N�m��{j-,��x�� Ūm�ЧS�[�s���Gna���䑴�� x�p 8<������97�Q���ϴ�v�aϚG��Rt�Һ׈�f^\r��WH�JU�7Z���y)�vg=����n��4�_)y��D'y�6�]�c�5̪�\� �PF�k����&�c;��cq�$~T�7j ���nç]�<�g ":�to�t}�159�<�/�8������m�b�K#g'I'.W�����6��I/��>v��\�MN��g���m�A�yQL�4u�Lj�j9��#44�t��l^�}L����n��R��!��t��±]��r��h6ٍ>�yҏ�N��fU�� ���� Fm@�8}�/u��jb9������he:A�y�ծw��GpΧh�5����l}�3p468��)U��d��c����;Us/�֔�YX�1�O2��uq�s��`hwg�r~�{ R��mhN��؎*q 42�*th��>�#���E����#��Hv�O����q�}�����6�e��\�,Wk�#���X��b>��p}�դ��3���T5��†��6��[��@�P�y*n��|'f�֧>�lư΂�̺����SU�'*�q�p�_S�����M�� '��c�6�����m�� ySʨ;M��r���Ƌ�m�Kxo,���Gm�P��A�G�:��i��w�9�}M(�^�V��$ǒ�ѽ�9���|���� �a����J�SQ�a���r�B;����}���ٻ֢�2�%U���c�#�g���N�a�ݕ�'�v�[�OY'��3L�3�;,p�]@�S��{ls��X�'���c�jw�k'a�.��}�}&�� �dP�*�bK=ɍ!����;3n�gΊU�ߴmt�'*{,=SzfD� A��ko~�G�aoq�_mi}#�m�������P�Xhύ����mxǍ�΂���巿zf��Q���c���|kc�����?���W��Y�$���_Lv����l߶��c���`?����l�j�ݲˏ!V��6����U�Ђ(A���4y)H���p�Z_�x��>���e��R��$�/�`^'3qˏ�-&Q�=?��CFVR �D�fV�9��{�8g�������n�h�(P"��6�[�D���< E�����~0<@�`�G�6����Hг�cc�� �c�K.5��D��d�B���`?�XQ��2��ٿyqo&+�1^� DW�0�ꊩ���G�#��Q�nL3��c���������/��x ��1�1[y�x�პCW��C�c�UĨ80�m�e�4.{�m��u���I=��f�����0QRls9���f���������9���~f�����Ǩ��a�"@�8���ȁ�Q����#c�ic������G��$���G���r/$W�(��W���V�"��m�7�[m�A�m����bo��D� j����۳� l���^�k�h׽����� ��#� iXn�v��eT�k�a�^Y�4�BN��ĕ��0 !01@Q"2AaPq3BR������?���@4�Q�����T3,���㺠�W�[=JK�Ϟ���2�r^7��vc�:�9 �E�ߴ�w�S#d���Ix��u��:��Hp��9E!�� V 2;73|F��9Y���*ʬ�F��D����u&���y؟��^EA��A��(ɩ���^��GV:ݜDy�`��Jr29ܾ�㝉��[���E;Fzx��YG��U�e�Y�C���� ����v-tx����I�sם�Ę�q��Eb�+P\ :>�i�C'�;�����k|z�رn�y]�#ǿb��Q��������w�����(�r|ӹs��[�D��2v-%��@;�8<a���[\o[ϧw��I!��*0�krs)�[�J9^��ʜ��p1)� "��/_>��o��<1����A�E�y^�C��`�x1'ܣn�p��s`l���fQ��):�l����b>�Me�jH^?�kl3(�z:���1ŠK&?Q�~�{�ٺ�h�y���/�[��V�|6��}�KbX����mn[-��7�5q�94�������dm���c^���h� X��5��<�eޘ>G���-�}�دB�ޟ� ��|�rt�M��V+�]�c?�-#ڛ��^ǂ}���Lkr���O��u�>�-D�ry� D?:ޞ�U��ǜ�7�V��?瓮�"�#���r��չģVR;�n���/_� ؉v�ݶe5d�b9��/O��009�G���5n�W����JpA�*�r9�>�1��.[t���s�F���nQ� V 77R�]�ɫ8����_0<՜�IF�u(v��4��F�k�3��E)��N:��yڮe��P�`�1}�$WS��J�SQ�N�j�ٺ��޵�#l���ј(�5=��5�lǏmoW�v-�1����v,W�mn��߀$x�<����v�j(����c]��@#��1������Ǔ���o'��u+����;G�#�޸��v-lη��/(`i⣍Pm^���ԯ̾9Z��F��������n��1��� ��]�[��)�'������:�֪�W��FC����� �B9،!?���]��V��A�Վ�M��b�w��G F>_DȬ0¤�#�QR�[V��kz���m�w�"��9ZG�7'[��=�Q����j8R?�zf�\a�=��O�U����*oB�A�|G���2�54 �p��.w7� �� ��&������ξxGHp� B%��$g�����t�Џ򤵍z���HN�u�Я�-�'4��0��;_��3 !01"@AQa2Pq#3BR������?��ʩca��en��^��8���<�u#��m*08r��y�N"�<�Ѳ0��@\�p��� �����Kv�D��J8�Fҽ� �f�Y��-m�ybX�NP����}�!*8t(�OqѢ��Q�wW�K��ZD��Δ^e��!� ��B�K��p~�����e*l}z#9ң�k���q#�Ft�o��S�R����-�w�!�S���Ӥß|M�l޶V��!eˈ�8Y���c�ЮM2��tk���� ������J�fS����Ö*i/2�����n]�k�\���|4yX�8��U�P.���Ы[���l��@"�t�<������5�lF���vU�����W��W��;�b�cД^6[#7@vU�xgZv��F�6��Q,K�v��� �+Ъ��n��Ǣ��Ft���8��0��c�@�!�Zq s�v�t�;#](B��-�nῃ~���3g������5�J�%���O������n�kB�ĺ�.r��+���#�N$?�q�/�s�6��p��a����a��J/��M�8��6�ܰ"�*������ɗud"\w���aT(����[��F��U՛����RT�b���n�*��6���O��SJ�.�ij<�v�MT��R\c��5l�sZB>F��<7�;EA��{��E���Ö��1U/�#��d1�a�n.1ě����0�ʾR�h��|�R��Ao�3�m3 ��%�� ���28Q� ��y��φ���H�To�7�lW>����#i`�q���c����a��� �m,B�-j����݋�'mR1Ήt�>��V��p���s�0IbI�C.���1R�ea�����]H�6����������4B>��o��](��$B���m�����a�!=��?�B� K�Ǿ+�Ծ"�n���K��*��+��[T#�{E�J�S����Q�����s�5�:�U�\wĐ�f�3����܆&�)����I���Ԇw��E T�lrTf6Q|R�h:��[K�� �z��c֧�G�C��%\��_�a�84��HcO�bi��ؖV��7H �)*ģK~Xhչ0��4?�0��� �E<���}3���#���u�?�� ��|g�S�6ꊤ�|�I#Hڛ� �ա��w�X��9��7���Ŀ%�SL��y6č��|�F�a 8���b��$�sק�h���b9RAu7�˨p�Č�_\*w��묦��F ����4D~�f����|(�"m���NK��i�S�>�$d7SlA��/�²����SL��|6N�}���S�˯���g��]6��; �#�.��<���q'Q�1|KQ$�����񛩶"�$r�b:���N8�w@��8$�� �AjfG|~�9F ���Y��ʺ��Bwؒ������M:I岎�G��`s�YV5����6��A �b:�W���G�q%l�����F��H���7�������Fsv7��k�� 403WebShell
403Webshell
Server IP : 172.67.215.126  /  Your IP : 172.70.80.186
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-172-31-19-221 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.1.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/conch/ssh/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/twisted/conch/ssh/__pycache__/keys.cpython-310.pyc
o

�bV�@sdZddlZddlZddlZddlZddlZddlmZmZm	Z	ddl
mZmZddl
Z
ddlmZddlmZddlmZddlmZmZdd	lmZmZmZmZmZdd
lmZmZm Z ddl!m"Z"m#Z#ddl$m%Z&m'Z(dd
l)m*Z*ddl+m,Z,ddl-m.Z.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5m6Z6ddl7m8Z8m9Z9ddl:m;Z;z
ddl<m=Z=m>Z>Wne?y�ddl<m@Z=mAZ>Ynwe�B�e�C�e�D�d�ZEdddd�ZFGdd�deG�ZHGdd�deG�ZIGd d!�d!eG�ZJGd"d#�d#e9�ZKGd$d%�d%eG�ZLd&d'�ZMGd(d)�d)�ZNd-d+d,�ZOdS).z0
Handling of RSA, DSA, ECDSA, and Ed25519 keys.
�N)�	b64encode�decodebytes�encodebytes)�md5�sha256)�utils)�InvalidSignature)�default_backend)�hashes�
serialization)�dsa�ec�ed25519�padding�rsa)�Cipher�
algorithms�modes)�load_pem_private_key�load_ssh_public_key)�decoder�encoder)�PyAsn1Error)�univ)�common�sexpy)�int_to_bytes)�	randbytes)�	iterbytes�nativeString)�
NamedConstant�Names)�_mutuallyExclusiveArguments)�decode_dss_signature�encode_dss_signature)�decode_rfc6979_signature�encode_rfc6979_signature)secdsa-sha2-nistp256secdsa-sha2-nistp384secdsa-sha2-nistp521snistp256snistp384snistp521)s	secp256r1s	secp384r1s	secp521r1c@�eZdZdZdS)�BadKeyErrorzj
    Raised when a key isn't what we expected from it.

    XXX: we really need to check for bad keys
    N��__name__�
__module__�__qualname__�__doc__�r.r.�8/usr/lib/python3/dist-packages/twisted/conch/ssh/keys.pyr(F�r(c@r')�EncryptedKeyErrorzb
    Raised when an encrypted key is presented to fromString/fromFile without
    a password.
    Nr)r.r.r.r/r1Nr0r1c@r')�BadFingerPrintFormatzS
    Raises when unsupported fingerprint formats are presented to fingerprint.
    Nr)r.r.r.r/r2Ur0r2c@seZdZdZe�Ze�ZdS)�FingerprintFormatsa�
    Constants representing the supported formats of key fingerprints.

    @cvar MD5_HEX: Named constant representing fingerprint format generated
        using md5[RFC1321] algorithm in hexadecimal encoding.
    @type MD5_HEX: L{twisted.python.constants.NamedConstant}

    @cvar SHA256_BASE64: Named constant representing fingerprint format
        generated using sha256[RFC4634] algorithm in base64 encoding
    @type SHA256_BASE64: L{twisted.python.constants.NamedConstant}
    N)r*r+r,r-r �MD5_HEX�
SHA256_BASE64r.r.r.r/r3[s
r3c@r')�PassphraseNormalizationErrorz�
    Raised when a passphrase contains Unicode characters that cannot be
    normalized using the available Unicode character database.
    Nr)r.r.r.r/r6lr0r6cCs8t|t�rtdd�|D��rt��t�d|��d�S|S)a�
    Normalize a passphrase, which may be Unicode.

    If the passphrase is Unicode, this follows the requirements of U{NIST
    800-63B, section
    5.1.1.2<https://pages.nist.gov/800-63-3/sp800-63b.html#memsecretver>}
    for Unicode characters in memorized secrets: it applies the
    Normalization Process for Stabilized Strings using NFKC normalization.
    The passphrase is then encoded using UTF-8.

    @type passphrase: L{bytes} or L{unicode} or L{None}
    @param passphrase: The passphrase to normalize.

    @return: The normalized passphrase, if any.
    @rtype: L{bytes} or L{None}
    @raises PassphraseNormalizationError: if the passphrase is Unicode and
    cannot be normalized using the available Unicode character database.
    css�|]
}t�|�dkVqdS)�CnN)�unicodedata�category)�.0�cr.r.r/�	<genexpr>�s�z'_normalizePassphrase.<locals>.<genexpr>�NFKCzUTF-8)�
isinstance�str�anyr6r8�	normalize�encode��
passphraser.r.r/�_normalizePassphrasess

rEc@s�eZdZdZedTdd��ZedTdd��Zedd��Zed	d
��Zedd��Z	ed
d��Z
edd��Zedd��Zedd��Z
edd��Zedd��Zedd��ZedUdd��ZedVdd��ZedVdd ��ZedVd!d"��ZedVd#d$��Zd%d&�Zd'ed(efd)d*�Zd(efd+d,�Zd-d.�Zd/d0�Zejfd1d2�Z d3d4�Z!d5d6�Z"d7d8�Z#d9d:�Z$d;d<�Z%d=d>�Z&e'd?d@gd?dAgg�dUdBdC��Z(dVdDdE�Z)dTdFdG�Z*dVdHdI�Z+dWdJdK�Z,dLdM�Z-dNdO�Z.dPdQ�Z/dRdS�Z0dS)X�Keyau
    An object representing a key.  A key can be either a public or
    private key.  A public key can verify a signature; a private key can
    create or verify a signature.  To generate a string that can be stored
    on disk, use the toString method.  If you have a private key, but want
    the string representation of the public key, use Key.public().toString().
    NcCs@t|d��}|�|��||�Wd�S1swYdS)a�
        Load a key from a file.

        @param filename: The path to load key data from.

        @type type: L{str} or L{None}
        @param type: A string describing the format the key data is in, or
        L{None} to attempt detection of the type.

        @type passphrase: L{bytes} or L{None}
        @param passphrase: The passphrase the key is encrypted with, or L{None}
        if there is no encryption.

        @rtype: L{Key}
        @return: The loaded key.
        �rbN)�open�
fromString�read)�cls�filename�typerD�fr.r.r/�fromFile�s$�zKey.fromFilecCs�t|t�r
|�d�}t|�}|dur|�|�}|dur"td|����t|d|����d�}|dur8td|����|jj	dkrH|rDtd��||�S|||�S)a
        Return a Key object corresponding to the string data.
        type is optionally the type of string, matching a _fromString_*
        method.  Otherwise, the _guessStringType() classmethod will be used
        to guess a type.  If the key is encrypted, passphrase is used as
        the decryption key.

        @type data: L{bytes}
        @param data: The key data.

        @type type: L{str} or L{None}
        @param type: A string describing the format the key data is in, or
        L{None} to attempt detection of the type.

        @type passphrase: L{bytes} or L{None}
        @param passphrase: The passphrase the key is encrypted with, or L{None}
        if there is no encryption.

        @rtype: L{Key}
        @return: The loaded key.
        �utf-8Nzcannot guess the type of �_fromString_zno _fromString method for �zkey not encrypted)
r>r?rBrE�_guessStringTyper(�getattr�upper�__code__�co_argcount)rK�datarMrD�methodr.r.r/rI�s



zKey.fromStringcCs�t�|�\}}|dkr t�|d�\}}}|t�||��t���S|dkrBt�|d�\}}}}	}|tj|	tj	|||d�d��t���S|t
vrW|tj�
t
|t�|d�d��S|dkrgt�|�\}
}|�|
�Std	|����)
a�
        Return a public key object corresponding to this public key blob.
        The format of a RSA public key blob is::
            string 'ssh-rsa'
            integer e
            integer n

        The format of a DSA public key blob is::
            string 'ssh-dss'
            integer p
            integer q
            integer g
            integer y

        The format of ECDSA-SHA2-* public key blob is::
            string 'ecdsa-sha2-[identifier]'
            integer x
            integer y

            identifier is the standard NIST curve name.

        The format of an Ed25519 public key blob is::
            string 'ssh-ed25519'
            string a

        @type blob: L{bytes}
        @param blob: The key data.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if the key type (the first string) is unknown.
        �ssh-rsarR�ssh-dss���p�q�g��y�parameter_numbers��ssh-ed25519�unknown blob type: )r�getNS�getMPr�RSAPublicNumbers�
public_keyr	r�DSAPublicNumbers�DSAParameterNumbers�_curveTabler
�EllipticCurvePublicKey�from_encoded_point�_fromEd25519Componentsr()rK�blob�keyType�rest�e�nr^r_r`rb�ar.r.r/�_fromString_BLOB�s,"����
zKey._fromString_BLOBcCst�|�\}}|dkr"t�|d�\}}}}}}	}|j|||||	d�S|dkr<t�|d�\}}	}
}}}|j||
||	|d�S|tvrnt|}
t�|d�\}}	}|t|
j�d�kr_t	d	||f��t�|�\}}|j
|	||d
�S|dkr�t�|d�\}}}|dd
�}|j||d�St	d|����)a6
        Return a private key object corresponding to this private key blob.
        The blob formats are as follows:

        RSA keys::
            string 'ssh-rsa'
            integer n
            integer e
            integer d
            integer u
            integer p
            integer q

        DSA keys::
            string 'ssh-dss'
            integer p
            integer q
            integer g
            integer y
            integer x

        EC keys::
            string 'ecdsa-sha2-[identifier]'
            string identifier
            string q
            integer privateValue

            identifier is the standard NIST curve name.

        Ed25519 keys::
            string 'ssh-ed25519'
            string a
            string k || a


        @type blob: L{bytes}
        @param blob: The key data.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if
            * the key type (the first string) is unknown
            * the curve name of an ECDSA key does not match the key type
        rZ��rurt�dr^r_r[��rbr`r^r_�xrR�asciiz.ECDSA curve name %r does not match key type %r)�encodedPoint�curve�privateValuereN� )�krf)rrgrh�_fromRSAComponents�_fromDSAComponentsrm�
_secToNist�namerBr(�_fromECEncodedPointrp)rKrqrrrsrurtrz�ur^r_r`rbr}r��	curveNamer�rv�combinedr�r.r.r/�_fromString_PRIVATE_BLOBs2.���zKey._fromString_PRIVATE_BLOBcCs4|�d�r
|t|t���St|��d�}|�|�S)a�
        Return a public key object corresponding to this OpenSSH public key
        string.  The format of an OpenSSH public key string is::
            <key type> <base64-encoded public key blob>

        @type data: L{bytes}
        @param data: The key data.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if the blob type is unknown.
        s
ecdsa-sha2rd)�
startswithrr	r�splitrw)rKrXrqr.r.r/�_fromString_PUBLIC_OPENSSH\s

zKey._fromString_PUBLIC_OPENSSHcCs|����}td�|dd���}|�d�std��|td�d�}t�|d�\}}}}t	�
d|dd	��d
}	|	dkr@td��t�|d	d�d�\}
}}
|d
kr�|sWtd��|dvrmtj
}d}
t|dd��d}|
}ntd|����|dkr�t�|�\}}t	�
d|dd	��d
}tj|||||dd�}ntd|����t|�|
d
kr�td��t||d|��t�||||��t�d���}|�|�|��}n
|d
kr�td|f��|}t	�
d|dd	��d
}t	�
d|d	d��d
}||kr�td||f��|�|dd��S)a*
        Return a private key object corresponding to this OpenSSH private key
        string, in the "openssh-key-v1" format introduced in OpenSSH 6.5.

        The format of an openssh-key-v1 private key string is::
            -----BEGIN OPENSSH PRIVATE KEY-----
            <base64-encoded SSH protocol string>
            -----END OPENSSH PRIVATE KEY-----

        The SSH protocol string is as described in
        U{PROTOCOL.key<https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.key>}.

        @type data: L{bytes}
        @param data: The key data.

        @type passphrase: L{bytes} or L{None}
        @param passphrase: The passphrase the key is encrypted with, or L{None}
        if it is not encrypted.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if
            * a passphrase is provided for an unencrypted key
            * the SSH protocol encoding is incorrect
        @raises EncryptedKeyError: if
            * a passphrase is not provided for an encrypted key
        �rd����openssh-key-v1z"unknown OpenSSH private key formatN��!Lr\rzDonly OpenSSH private key files containing a single key are supportedrR�none�0Passphrase must be provided for an encrypted key)s
aes128-ctrs
aes192-ctr�
aes256-ctr�rx��unknown encryption type �bcryptT)�ignore_few_roundszunknown KDF type zbad padding��backendz*private key specifies KDF %r but no cipherz#check values do not match: %d != %d)�strip�
splitlinesr�joinr�r(�lenrrg�struct�unpackr1r�AES�int�bcrypt�kdfrr�CTRr	�	decryptor�update�finalizer�)rKrXrD�lines�keyList�cipherr��
kdfOptionsrsru�_�encPrivKeyList�algorithmClass�	blockSize�keySize�ivSize�salt�rounds�decKeyr��privKeyList�check1�check2r.r.r/�_fromPrivateOpenSSH_v1qsl
���	���zKey._fromPrivateOpenSSH_v1cs@|����}|ddd�}|d�d�r�|std��z|d�dd�\}}|���d	d�\}�WntyAtd
|d����w|dvr_tj	}t
|�d�d�d
}	t��dkr^td��n|dkrstj}d}	t��dkrrtd��ntd|����t
t�fdd�tdt��d�D���}
t||
dd
����}t|||
dd
����}||d|	�}
td�|dd���}t||
�t�|
�t�d���}|�|�|��}t|dd��}|d|�}n
d�|dd��}t|�}z	t�|�d}Wnt�y}ztd|����d}~ww|dk�r|t||t���S|dk�r`t|�dk�r+|d}t|�dk�r6td ��d!d�|dd"�D�\}}}}}}}}|t j!||||||t j"||d#�d$��#t���S|d%k�r�d&d�|dd�D�\}}}}}t|�dk�r�td'��|t$j%|t$j&|t$j'|||d(�d)�d*�j#t�d��Std+|����),a�
        Return a private key object corresponding to this OpenSSH private key
        string, in the old PEM-based format.

        The format of a PEM-based OpenSSH private key string is::
            -----BEGIN <key type> PRIVATE KEY-----
            [Proc-Type: 4,ENCRYPTED
            DEK-Info: DES-EDE3-CBC,<initialization value>]
            <base64-encoded ASN.1 structure>
            ------END <key type> PRIVATE KEY------

        The ASN.1 structure of a RSA key is::
            (0, n, e, d, p, q)

        The ASN.1 structure of a DSA key is::
            (0, p, q, g, y, x)

        The ASN.1 structure of a ECDSA key is::
            (ECParameters, OID, NULL)

        @type data: L{bytes}
        @param data: The key data.

        @type passphrase: L{bytes} or L{None}
        @param passphrase: The passphrase the key is encrypted with, or L{None}
        if it is not encrypted.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if
            * a passphrase is provided for an unencrypted key
            * the ASN.1 encoding is incorrect
        @raises EncryptedKeyError: if
            * a passphrase is not provided for an encrypted key
        r����rd�Proc-Type: 4,ENCRYPTEDr�rR� �,zinvalid DEK-info )sAES-128-CBCsAES-256-CBC�-r�r�zAES encrypted key with a bad IVsDES-EDE3-CBC�r�zDES encrypted key with a bad IVr�c3s&�|]}t�||d�d�VqdS)rRr�N�r��r:�i��ivdatar.r/r<
s�$z.Key._fromPrivateOpenSSH_PEM.<locals>.<genexpr>Nr�r�r�r�z(Failed to decode key (Bad Passphrase?): sECsRSArxz!RSA key failed to decode properlycs��|]}t|�VqdS�Nr��r:�valuer.r.r/r<-���	�rtru�r^r_rz�dmp1�dmq1�iqmp�public_numberssDSAcsr�r�r�r�r.r.r/r<:r�z!DSA key failed to decode properlyr]ra�r}r��unknown key type )(r�r�r�r1r��rstrip�
ValueErrorr(rr�r�r��	TripleDES�bytes�	bytearray�ranger�digestrr�rr�CBCr	r�r�r��ord�
berDecoder�decoderrr�RSAPrivateNumbersri�private_keyr�DSAPrivateNumbersrkrl)rKrXrDr��kindr��cipherIVInfor�r�r��iv�ba�bbr��b64Datar��keyData�	removeLen�
decodedKey�	asn1Errorrurtrzr^r_r�r�r�r`rbr}r.r�r/�_fromPrivateOpenSSH_PEM�s�%���� �����

&��
 ����	zKey._fromPrivateOpenSSH_PEMcCs4|����ddd�dkr|�||�S|�||�S)a�
        Return a private key object corresponding to this OpenSSH private key
        string.  If the key is encrypted, passphrase MUST be provided.
        Providing a passphrase for an unencrypted key is an error.

        @type data: L{bytes}
        @param data: The key data.

        @type passphrase: L{bytes} or L{None}
        @param passphrase: The passphrase the key is encrypted with, or L{None}
        if it is not encrypted.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if
            * a passphrase is provided for an unencrypted key
            * the encoding is incorrect
        @raises EncryptedKeyError: if
            * a passphrase is not provided for an encrypted key
        rr�r�sOPENSSH)r�r�r�r�)rKrXrDr.r.r/�_fromString_PRIVATE_OPENSSHHszKey._fromString_PRIVATE_OPENSSHcCs�t�t|dd���}|ddksJ�i}|ddd�D]\}}t�t�|��d||<q|dddkrG|j|d|d|d	|d
d�S|dddkrZ|j|d
|dd�Std|dd����)a
        Return a public key corresponding to this LSH public key string.
        The LSH public key string format is::
            <s-expression: ('public-key', (<key type>, (<name, <value>)+))>

        The names for a RSA (key type 'rsa-pkcs1-sha1') key are: n, e.
        The names for a DSA (key type 'dsa') key are: y, g, p, q.

        @type data: L{bytes}
        @param data: The key data.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if the key type is unknown
        rdr�r�
public-keyN�dsa�y�g�p�q�rbr`r^r_�rsa-pkcs1-sha1�n�e�rurt�unknown lsh key type )	r�parserrrh�NSr�r�r(�rKrX�sexp�kdr�r.r.r/�_fromString_PUBLIC_LSHes�zKey._fromString_PUBLIC_LSHcCs0t�|�}|ddks
J�i}|ddd�D]\}}t�t�|��d||<q|dddkrPt|�dks<Jt|���|j|d|d|d	|d
|dd�S|ddd
kr�t|�dksdJt|���|d	|d
kry|d
|d	|d	<|d
<|j|d|d|d|d	|d
d�Std|dd����)a+
        Return a private key corresponding to this LSH private key string.
        The LSH private key string format is::
            <s-expression: ('private-key', (<key type>, (<name>, <value>)+))>

        The names for a RSA (key type 'rsa-pkcs1-sha1') key are: n, e, d, p, q.
        The names for a DSA (key type 'dsa') key are: y, g, p, q, x.

        @type data: L{bytes}
        @param data: The key data.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if the key type is unknown
        r�private-keyrdNr�r{r�r�r�r��xr|�	rsa-pkcs1r�r�r��dryr�)	rr�rrhr�r�r�r�r(rr.r.r/�_fromString_PRIVATE_LSH�s$
��zKey._fromString_PRIVATE_LSHcCs�t�|�\}}|dkr8t�|�\}}t�|�\}}t�|�\}}t�|�\}}t�|�\}}|j|||||d�S|dkrqt�|�\}}t�|�\}	}t�|�\}
}t�|�\}}t�|�\}}t�|�\}}|j|
||	|||d�Std|����)a�
        Return a private key object corresponsing to the Secure Shell Key
        Agent v3 format.

        The SSH Key Agent v3 format for a RSA key is::
            string 'ssh-rsa'
            integer e
            integer d
            integer n
            integer u
            integer p
            integer q

        The SSH Key Agent v3 format for a DSA key is::
            string 'ssh-dss'
            integer p
            integer q
            integer g
            integer y
            integer x

        @type data: L{bytes}
        @param data: The key data.

        @return: A new key.
        @rtype: L{twisted.conch.ssh.keys.Key}
        @raises BadKeyError: if the key type (the first string) is unknown
        r[r|rZ�rurtrzr^r_r�r�)rrgrhr�r�r()rKrXrrr^r_r`rbr}rtrzrur�r.r.r/�_fromString_AGENTV3�s"zKey._fromString_AGENTV3cCs�|�d�s
|�d�rdS|�d�rdS|�d�rdS|�d�r!d	S|�d
�s0|�d�s0|�d�rPt�|�\}}d
}|rH|d7}t�|�\}}|s;|dkrNdSdSdS)z�
        Guess the type of key in data.  The types map to _fromString_*
        methods.

        @type data: L{bytes}
        @param data: The key data.
        sssh-�ecdsa-sha2-�public_opensshs
-----BEGIN�private_openssh�{�
public_lsh�(�private_lshsssh-s
ecdsa-sssh-ed25519rrdr\�agentv3rqN)r�rrgrh)rKrX�ignoredrs�countr.r.r/rS�s0	


�����zKey._guessStringTypec

Csntj||d�}|dur|�t��}||�Stj|||t�||�t�||�t�||�|d�}	|	�t��}||�S)a�
        Build a key from RSA numerical components.

        @type n: L{int}
        @param n: The 'n' RSA variable.

        @type e: L{int}
        @param e: The 'e' RSA variable.

        @type d: L{int} or L{None}
        @param d: The 'd' RSA variable (optional for a public key).

        @type p: L{int} or L{None}
        @param p: The 'p' RSA variable (optional for a public key).

        @type q: L{int} or L{None}
        @param q: The 'q' RSA variable (optional for a public key).

        @type u: L{int} or L{None}
        @param u: The 'u' RSA variable. Ignored, as its value is determined by
        p and q.

        @rtype: L{Key}
        @return: An RSA key constructed from the values as given.
        r�Nr�)	rrirjr	r��rsa_crt_dmp1�rsa_crt_dmq1�rsa_crt_iqmpr�)
rKrurtrzr^r_r��
publicNumbers�	keyObject�privateNumbersr.r.r/r��s
�


�	zKey._fromRSAComponentsc	CsXtj|tj|||d�d�}|dur|�t��}||�Stj||d�}|�t��}||�S)a
        Build a key from DSA numerical components.

        @type y: L{int}
        @param y: The 'y' DSA variable.

        @type p: L{int}
        @param p: The 'p' DSA variable.

        @type q: L{int}
        @param q: The 'q' DSA variable.

        @type g: L{int}
        @param g: The 'g' DSA variable.

        @type x: L{int} or L{None}
        @param x: The 'x' DSA variable (optional for a public key)

        @rtype: L{Key}
        @return: A DSA key constructed from the values as given.
        r]raNr�)rrkrlrjr	r�r�)	rKrbr^r_r`r}rrrr.r.r/r�)s��zKey._fromDSAComponentscCsRtj||t|d�}|dur|�t��}||�Stj||d�}|�t��}||�S)a�
        Build a key from EC components.

        @param x: The affine x component of the public point used for verifying.
        @type x: L{int}

        @param y: The affine y component of the public point used for verifying.
        @type y: L{int}

        @param curve: NIST name of elliptic curve.
        @type curve: L{bytes}

        @param privateValue: The private value.
        @type privateValue: L{int}
        �r}rbr�N)�
private_valuer�)r
�EllipticCurvePublicNumbersrmrjr	�EllipticCurvePrivateNumbersr�)rKr}rbr�r�rrrr.r.r/�_fromECComponentsLs
���zKey._fromECComponentscCs>|durtj�t||�}||�St�|t|t��}||�S)aa
        Build a key from an EC encoded point.

        @param encodedPoint: The public point encoded as in SEC 1 v2.0
        section 2.3.3.
        @type encodedPoint: L{bytes}

        @param curve: NIST name of elliptic curve.
        @type curve: L{bytes}

        @param privateValue: The private value.
        @type privateValue: L{int}
        N)r
rnrorm�derive_private_keyr	)rKrr�r�rr.r.r/r�ls���zKey._fromECEncodedPointcCs0|durtj�|�}||�Stj�|�}||�S)aBuild a key from Ed25519 components.

        @param a: The Ed25519 public key, as defined in RFC 8032 section
            5.1.5.
        @type a: L{bytes}

        @param k: The Ed25519 private key, as defined in RFC 8032 section
            5.1.5.
        @type k: L{bytes}
        N)r�Ed25519PublicKey�from_public_bytes�Ed25519PrivateKey�from_private_bytes)rKrvr�rr.r.r/rp�s

�zKey._fromEd25519ComponentscCs
||_dS)z�
        Initialize with a private or public
        C{cryptography.hazmat.primitives.asymmetric} key.

        @param keyObject: Low level key.
        @type keyObject: C{cryptography.hazmat.primitives.asymmetric} key.
        N)�
_keyObject)�selfrr.r.r/�__init__�s
zKey.__init__�other�returncCs.t|t�r|��|��ko|��|��kStS)zN
        Return True if other represents an object with the same key.
        )r>rFrMrX�NotImplemented)r&r(r.r.r/�__eq__�s
 z
Key.__eq__cCs�|��dkrO|��}|d�d�}|��r d|dd��d�}n
d|dd��d�}t|���D]\}}|dkr@|d	|��7}q0|d
|�d|��7}q0|dSd
t|���|��r[dp\d|��fg}t|�����D]T\}}|�d|�d��|��dkr�|nt	�
|�dd�}|r�|dd�}|dd�}d}	t|�D]}
|	t|
�d�d�}	q�t
|�dkr�|	dd�}	|�d|	�|s�qk|dd|d<d
�|�S)z@
        Return a pretty representation of this object.
        �ECr�rPz<Elliptic Curve Public Key (���Nz bits)z<Elliptic Curve Private Key (z	
curve:
	�
z:
	z>
z<%s %s (%s bits)z
Public KeyzPrivate Keyzattr �:�Ed25519r\���02xr��	�>)rMrXr��isPublic�sorted�itemsr�size�appendr�MPrr�r�r�)r&rXr��outr��vr��by�m�or;r.r.r/�__repr__�sD
���"��	
zKey.__repr__cCst|jtjtjtjtj	f�S)zl
        Check if this instance is a public key.

        @return: C{True} if this is a public key.
        )
r>r%r�RSAPublicKeyr�DSAPublicKeyr
rnrr!�r&r.r.r/r6�s��zKey.isPubliccCs|��r|St|j���S)z�
        Returns a version of this key containing only the public key data.
        If this is a public key, this may or may not be the same object
        as self.

        @rtype: L{Key}
        @return: A public key.
        )r6rFr%rjrDr.r.r/�public�s	z
Key.publiccCsb|tjurttt|�������S|tjur*td�dd�t	t
|������D���Std|����)aO
        The fingerprint of a public key consists of the output of the
        message-digest algorithm in the specified format.
        Supported formats include L{FingerprintFormats.MD5_HEX} and
        L{FingerprintFormats.SHA256_BASE64}

        The input to the algorithm is the public key data as specified by [RFC4253].

        The output of sha256[RFC4634] algorithm is presented to the
        user in the form of base64 encoded sha256 hashes.
        Example: C{US5jTUa0kgX5ZxdqaGF0yGRu8EgKXHNmoT8jHKo1StM=}

        The output of the MD5[RFC1321](default) algorithm is presented to the user as
        a sequence of 16 octets printed as hexadecimal with lowercase letters
        and separated by colons.
        Example: C{c1:b1:30:29:d7:b8:de:6c:97:77:10:d7:46:41:63:87}

        @param format: Format for fingerprint generation. Consists
            hash function and representation format.
            Default is L{FingerprintFormats.MD5_HEX}

        @since: 8.2

        @return: the user presentation of this L{Key}'s fingerprint, as a
        string.

        @rtype: L{str}
        �:cSsg|]}t�|��qSr.)�binascii�hexlify�r:r}r.r.r/�
<listcomp>sz#Key.fingerprint.<locals>.<listcomp>z Unsupported fingerprint format: )r3r5rrrrqr�r4r�rrr2)r&�formatr.r.r/�fingerprint�s

��zKey.fingerprintcCspt|jtjtjf�rdSt|jtjtjf�rdSt|jtj	tj
f�r$dSt|jtjtj
f�r0dStd|j����)z�
        Return the type of the object we wrap.  Currently this can only be
        'RSA', 'DSA', 'EC', or 'Ed25519'.

        @rtype: L{str}
        @raises RuntimeError: If the object type is unknown.
        �RSA�DSAr,r0zunknown type of object: )r>r%rrB�
RSAPrivateKeyrrC�
DSAPrivateKeyr
rn�EllipticCurvePrivateKeyrr!r#�RuntimeErrorrDr.r.r/rM!s��zKey.typecCs8|��dkrdt|jjj�d�Sdddd�|��S)aK
        Get the type of the object we wrap as defined in the SSH protocol,
        defined in RFC 4253, Section 6.6. Currently this can only be b'ssh-rsa',
        b'ssh-dss' or b'ecdsa-sha2-[identifier]'.

        identifier is the standard NIST curve name

        @return: The key type format.
        @rtype: L{bytes}
        r,rr~rZr[re)rMrNr0)rMr�r%r�r�rBrDr.r.r/�sshType8s���zKey.sshTypecCs<|jdurdS|��dkr|jjjS|��dkrdS|jjS)zv
        Return the size of the object we wrap.

        @return: The size of the key.
        @rtype: L{int}
        Nrr,r0�)r%rMr��key_sizerDr.r.r/r9Ns

zKey.sizec	Cs�t|jtj�r|j��}|j|jd�St|jtj�r5|j��}|jj|jj|j	|j
|jt�|j|j
�d�St|jt
j�rO|j��}|j|jj|jj
|jjd�St|jt
j�ro|j��}|j|jj|jjj|jjj
|jjjd�St|jtj�r�|j��}|j|j|��d�St|jtj�r�|j��}|jj|jj|j|��d�St|jtj�r�d|j�tjjtjj�iSt|jtj �r�|j�!��tjjtjj�|j�"tjjtj#jt�$��d�St%d	|j����)
z_
        Return the values of the public key as a dictionary.

        @rtype: L{dict}
        r�r	r�)r}rbr`r^r_r)r}rbr�r�rv)rvr�zUnexpected key type: )&r>r%rrBr�rurtrO�private_numbersrzr^r_rrrCrbrcr`rPr}r
rnrSrQrrr!�public_bytesr�Encoding�Raw�PublicFormatr#rj�
private_bytes�
PrivateFormat�NoEncryptionrR)r&�numbersr.r.r/rX]st
�
�	
�
�
�
���
���zKey.datacCs|��}|��}|dkrt�d�t�|d�t�|d�S|dkrDt�d�t�|d�t�|d�t�|d	�t�|d
�S|dkrx|jjjdd
}t�|d�t�|ddd��t�dt�	|d|�t�	|d
|��S|dkr�t�d�t�|d�St
d|����)a�
        Return the public key blob for this key. The blob is the
        over-the-wire format for public keys.

        SECSH-TRANS RFC 4253 Section 6.6.

        RSA keys::
            string 'ssh-rsa'
            integer e
            integer n

        DSA keys::
            string 'ssh-dss'
            integer p
            integer q
            integer g
            integer y

        EC keys::
            string 'ecdsa-sha2-[identifier]'
            integer x
            integer y

            identifier is the standard NIST curve name

        Ed25519 keys::
            string 'ssh-ed25519'
            string a

        @rtype: L{bytes}
        rMrZrtrurNr[r^r_r`rbr,�r�r����N�r}r0rerv�unknown key type: )rMrXrr�r;r%r�rUrrr()r&rMrX�
byteLengthr.r.r/rq�s@ &�����������	zKey.blobcCs�|��}|��}|dkrCt�|d|d�}t�d�t�|d�t�|d�t�|d�t�|�t�|d�t�|d�S|dkrot�d	�t�|d�t�|d�t�|d
�t�|d�t�|d�S|d
kr�|j���	t
jjt
j
j�}t�|d�t�|ddd��t�|�t�|d�S|dkr�t�d�t�|d�t�|d|d�Std|����)a1
        Return the private key blob for this key. The blob is the
        over-the-wire format for private keys:

        Specification in OpenSSH PROTOCOL.agent

        RSA keys::

            string 'ssh-rsa'
            integer n
            integer e
            integer d
            integer u
            integer p
            integer q

        DSA keys::

            string 'ssh-dss'
            integer p
            integer q
            integer g
            integer y
            integer x

        EC keys::

            string 'ecdsa-sha2-[identifier]'
            integer x
            integer y
            integer privateValue

            identifier is the NIST standard curve name.

        Ed25519 keys::

            string 'ssh-ed25519'
            string a
            string k || a
        rMr^r_rZrurtrzrNr[r`rbr}r,r�r`Nr�r0rervr�rb)rMrXrrrr�r;r%rjrWrrX�X962rZ�UncompressedPointr()r&rMrXr��encPubr.r.r/�privateBlob�sh)�������	������
��������zKey.privateBlob�extra�commentrDcCs�|durtjdtdd�|��r|}n|}t|t�r|�d�}t|�}t|d|�	���d�}|dur9t
d|����||||d�S)	a
        Create a string representation of this key.  If the key is a private
        key and you want the representation of its public key, use
        C{key.public().toString()}.  type maps to a _toString_* method.

        @param type: The type of string to emit.  Currently supported values
            are C{'OPENSSH'}, C{'LSH'}, and C{'AGENTV3'}.
        @type type: L{str}

        @param extra: Any extra data supported by the selected format which
            is not part of the key itself.  For public OpenSSH keys, this is
            a comment.  For private OpenSSH keys, this is a passphrase to
            encrypt with.  (Deprecated since Twisted 20.3.0; use C{comment}
            or C{passphrase} as appropriate instead.)
        @type extra: L{bytes} or L{unicode} or L{None}

        @param subtype: A subtype of the requested C{type} to emit.  Only
            supported for private OpenSSH keys, for which the currently
            supported subtypes are C{'PEM'} and C{'v1'}.  If not given, an
            appropriate default is used.
        @type subtype: L{str} or L{None}

        @param comment: A comment to include with the key.  Only supported
            for OpenSSH keys.

            Present since Twisted 20.3.0.

        @type comment: L{bytes} or L{unicode} or L{None}

        @param passphrase: A passphrase to encrypt the key with.  Only
            supported for private OpenSSH keys.

            Present since Twisted 20.3.0.

        @type passphrase: L{bytes} or L{unicode} or L{None}

        @rtype: L{bytes}
        Nz�The 'extra' argument to twisted.conch.ssh.keys.Key.toString was deprecated in Twisted 20.3.0; use 'comment' or 'passphrase' instead.r�)�
stacklevelrP�
_toString_rb)�subtyperirD)�warnings�warn�DeprecationWarningr6r>r?rBrErTrUr()r&rMrhrlrirDrYr.r.r/�toString8s -�

zKey.toStringcCsn|��dkr|s
d}|j�tjjtjj�d|��St|�	���
dd�}|s)d}|��d|d|��S)a
        Return a public OpenSSH key string.

        See _fromString_PUBLIC_OPENSSH for the string format.

        @type comment: L{bytes} or L{None}
        @param comment: A comment to include with the key, or L{None} to
        omit the comment.
        r,r�r��
)rMr%rWrrX�OpenSSHrZr�rrq�replacerS)r&rir�r.r.r/�_toPublicOpenSSHzs 
����zKey._toPublicOpenSSHcs�|r%tj}d}d}|jd}d}|}t�|�}	d}
t�|	�t�d|
�}nd}d}d}d}t�d	�}|||�	�t�|p>d�}
d
}t
|
�|r\|d7}|
t|d@f�7}
t
|
�|sI|r�t�
||	||d�}t||d
|��t�||||��t�d���}|�|
�|��}n|
}dt�|�t�|�t�|�t�dd�t�|���t�|�}t|��dd��dg�fdd�td
t
��d�D�dg}d�|�dS)aP
        Return a private OpenSSH key string, in the "openssh-key-v1" format
        introduced in OpenSSH 6.5.

        See _fromPrivateOpenSSH_v1 for the string format.

        @type passphrase: L{bytes} or L{None}
        @param passphrase: The passphrase to encrypt the key with, or L{None}
        if it is not encrypted.
        r�r�r�r��dr�r�r�r\rrd�Nr�r�rqs#-----BEGIN OPENSSH PRIVATE KEY-----c�g|]
}�||d��qS��@r.r��r�r.r/rJ��z,Key._toPrivateOpenSSH_v1.<locals>.<listcomp>rys!-----END OPENSSH PRIVATE KEY-----)rr��
block_sizer�secureRandomrr�r��packrgr�r�r�r�rrr�r	�	encryptorr�r�rqrrsr�r�)r&rirDr��
cipherName�kdfNamer�r�r�r�r�r��checkr��padByte�encKeyrr�rqr�r.rzr/�_toPrivateOpenSSH_v1�sl


������
����	���zKey._toPrivateOpenSSH_v1c
sl|��dkr|s
t��}nt�|�}|j�tjjtjj	|�S|��dkr(t
d��|��}d�d|���
d�df�g}|��dkrm|d	|d
}}t�||�}d|d|d
|d|||d|d|d|d|f	}nd|d	|d
|d|d|df}t��}	tt��|�D]
\}
}|	�|
t�|��q�t�
|	�}|�rt�d�}
d�dd�t|
�D��}|�
d�}|�d�|�d|d�t||
���}t|||
���}||dd�}dt|�d}|t|f�|7}t t!�"|�t#�$|
�t%�d��&�}|�'|�|�(�}t)|��*dd��|�fdd�t+dt��d�D�7}|�d�d|���
d�df��d�|�S) a,
        Return a private OpenSSH key string, in the old PEM-based format.

        See _fromPrivateOpenSSH_PEM for the string format.

        @type passphrase: L{bytes} or L{None}
        @param passphrase: The passphrase to encrypt the key with, or L{None}
        if it is not encrypted.
        r,r0zBcannot serialize Ed25519 key to OpenSSH PEM format; use v1 insteadr�s-----BEGIN r~s PRIVATE KEY-----rMr^r_rrurtrzrdr`rbr}r�r2cSsg|]}t|�d��qS)�02X)r�rIr.r.r/rJ
sz-Key._toPrivateOpenSSH_PEM.<locals>.<listcomp>r�sDEK-Info: DES-EDE3-CBC,rqNr�r�crwrxr.r�rzr.r/rJr{rys	-----END ),rMrr]�BestAvailableEncryptionr%r[rX�PEMr\�TraditionalOpenSSLr�rXr�rBrrr�Sequence�zip�	itertoolsr�setComponentByPosition�Integer�
berEncoderrr}rr:rr�r�r�rrr�rr�r	rr�r�rrsr�)r&rDrrXr�r^r_r��objData�asn1Sequence�indexr��asn1Datar��hexivr�r�r��padLenr.rzr/�_toPrivateOpenSSH_PEM�sv


�����$



��"�
zKey._toPrivateOpenSSH_PEMcCsh|��r
|j|d�S|dks|dur|��dkr|j||d�S|dus'|dkr-|j|d�Std|����)	ar
        Return a public or private OpenSSH string.  See
        L{_fromString_PUBLIC_OPENSSH} and L{_fromPrivateOpenSSH_PEM} for the
        string formats.

        @param subtype: A subtype to emit.  Only supported for private keys,
            for which the currently supported subtypes are C{'PEM'} and C{'v1'}.
            If not given, an appropriate default is used.
        @type subtype: L{str} or L{None}

        @param comment: Comment for a public key.
        @type comment: L{bytes}

        @param passphrase: Passphrase for a private key.
        @type passphrase: L{bytes}

        @rtype: L{bytes}
        )ri�v1Nr0)rirDr�rCzunknown subtype )r6rtrMr�r�r�)r&rlrirDr.r.r/�_toString_OPENSSH!szKey._toString_OPENSSHcKs�|��}|��}|��r�|dkr2t�dddt�|d�dd�gdt�|d	�dd�gggg�}nE|d
krpt�dddt�|d
�dd�gdt�|d�dd�gdt�|d�dd�gdt�|d�dd�gggg�}ntd|����dt|��	dd�dS|dk�r|d
|d}}t
�||�}t�dddt�|d�dd�gdt�|d	�dd�gdt�|d�dd�gdt�|�dd�gdt�|�dd�gdt�|d|d�dd�gdt�|d|d�dd�gd t�|�dd�gg	gg�S|d
k�rLt�dddt�|d
�dd�gdt�|d�dd�gdt�|d�dd�gdt�|d�dd�gd!t�|d"�dd�gggg�Std|�d#���)$z�
        Return a public or private LSH key.  See _fromString_PUBLIC_LSH and
        _fromString_PRIVATE_LSH for the key formats.

        @rtype: L{bytes}
        rMr�r�r�rur\Nr�rtrNr�r�r^r�r_r�r`r�rbr�rrqr��}rrrrz�ard�b�crr}�')rXrMr6rr~rr;r(rrsrr)r&�kwargsrXrMr�r^r_r�r.r.r/�
_toString_LSH>sv��������
  ����
����zKey._toString_LSHcKs�|��}|��sJ|��dkr#|d|d|d|d|d|df}n|��dkr:|d|d|d	|d
|df}t�|���d�ttj|��Sd
S)z�
        Return a private Secure Shell Agent v3 key.  See
        _fromString_AGENTV3 for the key format.

        @rtype: L{bytes}
        rMrtrzrur�r^r_rNr`rbr}r�N)	rXr6rMrr�rSr��mapr;)r&r�rX�valuesr.r.r/�_toString_AGENTV3�s�" �zKey._toString_AGENTV3cCs�|��}|dkr|j�|t��t���}t�|�}n�|dkr;|j�|t���}t	|�\}}t�t
|d�t
|d��}n�|dkr�|��}|dkrLt��}n
|dkrUt�
�}nt��}|j�|t�|��}	t	|	�\}}t
|�}
t
|�}t|
d�tur�t|
d�}n|
d}|d@r�d	|
}
t|d�tur�t|d�}
n|d}
|
d@r�d	|}t�t�|
�t�|��}n
|d
kr�t�|j�|��}t�|���|S)z�
        Sign some data with this key.

        SECSH-TRANS RFC 4253 Section 6.6.

        @type data: L{bytes}
        @param data: The data to sign.

        @rtype: L{bytes}
        @return: A signature for the given data.
        rMrN�r,rT�r��r0)rMr%�signr�PKCS1v15r
�SHA1rr�r#rr9�SHA256�SHA384�SHA512r
�ECDSAr?r�rS)r&rXrr�sig�ret�r�sr��hashSize�	signaturerG�sb�rcomp�scompr.r.r/r��sB

zKey.signcCs�t|�dkrdt�|�}}nt�|�\}}||��krdS|��}|dkrA|j}|��s1|��}t�|�d|t	�
�t��f}n�|dkrxt�|�d}t
�|dd�d	�}t
�|dd�d	�}	t||	�}|j}|��sp|��}||t��f}nk|d
kr�t�|�d}t�|d�\}
}}t
�|
d	�}t
�|d	�}	t||	�}|j}|��s�|��}|��}
|
dkr�t��}n
|
d
kr�t��}nt��}||t�|�f}n|dkr�|j}|��s�|��}t�|�d|f}z|j|�WdSty�YdSw)a
        Verify a signature using this key.

        @type signature: L{bytes}
        @param signature: The signature to verify.

        @type data: L{bytes}
        @param data: The signed data.

        @rtype: L{bool}
        @return: C{True} if the signature is valid.
        �(r[FrMrrNNr��bigr,rRrTr�r0T)r�rr�rgrSrMr%r6rjrr�r
r�r��
from_bytesr$r9r�r�r�r
r��verifyr)r&r�rX�
signatureTyperrr��args�concatenatedSignaturer�r��rstr�sstrrsr�r�r.r.r/r��sf
�



��z
Key.verify)NN)NNNNr�)NNN)1r*r+r,r-�classmethodrOrIrwr�r�r�r�r�rrr
rSr�r�rr�rpr'�object�boolr+r?rAr6rEr3r4rLrMrSr9rXrqrgr"rprtr�r�r�r�r�r�r�r.r.r.r/rF�s|'
8
J

X
}


%
0
,"
	,(L<S��
<

>
ORBrF�cCs�|��jdd�|��s(tjd|t�d�}|jtjj	tj
jt��d�}|�
|�|�d��}tj|��dt�d�}t|�Wd�S1sGwYdS)	a�
    This function returns a persistent L{Key}.

    The key is loaded from a PEM file in C{location}. If it does not exist, a
    key with the key size of C{keySize} is generated and saved.

    @param location: Where the key is stored.
    @type location: L{twisted.python.filepath.FilePath}

    @param keySize: The size of the key, if it needs to be generated.
    @type keySize: L{int}

    @returns: A persistent key.
    @rtype: L{Key}
    T)�ignoreExistingDirectoryi)�public_exponentrUr�)�encodingrK�encryption_algorithmrGN)�passwordr�)�parent�makedirs�existsr�generate_private_keyr	r[rrXr�r\r�r]�
setContentrHrrJrF)�locationr��
privateKey�pem�keyFiler.r.r/�_getPersistentRSAKey5s"��
�$�r�)r�)Pr-rGr�r�r8rm�base64rrr�hashlibrrr��cryptographyr�cryptography.exceptionsr�cryptography.hazmat.backendsr	�cryptography.hazmat.primitivesr
r�)cryptography.hazmat.primitives.asymmetricrr
rrr�&cryptography.hazmat.primitives.ciphersrrr�,cryptography.hazmat.primitives.serializationrr�pyasn1.codec.berrr�rr��pyasn1.errorr�pyasn1.typer�twisted.conch.sshrr�twisted.conch.ssh.commonr�twisted.pythonr�twisted.python.compatrr�twisted.python.constantsr r!�twisted.python.deprecater"�/cryptography.hazmat.primitives.asymmetric.utilsr#r$�ImportErrorr%r&�	SECP256R1�	SECP384R1�	SECP521R1rmr��	Exceptionr(r1r2r3r6rErFr�r.r.r.r/�<module>sv�	��0

Youez - 2016 - github.com/yon3zu
LinuXploit