Giter VIP home page Giter VIP logo

Comments (11)

merlijn-sebrechts avatar merlijn-sebrechts commented on June 10, 2024 10

Any idea when this will be released?

from pycrypto.

kushaldas avatar kushaldas commented on June 10, 2024 2

Can we please get a release with this fix?

from pycrypto.

merlijn-sebrechts avatar merlijn-sebrechts commented on June 10, 2024 1

Yes, move your project to pycryptodome. It is a drop-in replacement for pycrypto.

from pycrypto.

Itxaka avatar Itxaka commented on June 10, 2024

python 2.7.8 works with no problems.

from pycrypto.

SergSlipushenko avatar SergSlipushenko commented on June 10, 2024

+1. Same issue
Python 3.4.0, pycrypto==2.6
Traceback (most recent call last):
File "/home/sslypushenko/projects/refstack/refstack/tests/unit/test_validators.py", line 105, in test_validation_with_signature
'X-Public-Key': key.publickey().exportKey('OpenSSH')
File "/home/sslypushenko/projects/refstack/.tox/py34/lib/python3.4/site-packages/Crypto/PublicKey/RSA.py", line 352, in exportKey
keystring = ''.join([ struct.pack(">I",len(kp))+kp for kp in keyparts])
File "/home/sslypushenko/projects/refstack/.tox/py34/lib/python3.4/site-packages/Crypto/PublicKey/RSA.py", line 352, in
keystring = ''.join([ struct.pack(">I",len(kp))+kp for kp in keyparts])
TypeError: can't concat bytes to str

from pycrypto.

sloat avatar sloat commented on June 10, 2024

Importing OpenSSH keys is also broken on 2.6.1:

Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/events.py", line 119, in _run
    self._callback(*self._args)
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/selector_events.py", line 589, in _read_ready
    self._protocol.data_received(data)
File "server.py", line 19, in data_received
    self.handle_state(msg)
File "server.py", line 47, in handle_state
    key = RSA.importKey(self.pubkey)
File "/path-to-my-venv/site-packages/Crypto/PublicKey/RSA.py", line 675, in importKey
    e = bytes_to_long(keyparts[1])
IndexError: list index out of range

from pycrypto.

iktakahiro avatar iktakahiro commented on June 10, 2024

This issue will be fixed ver 2.7.1. see below.

ab25c6f

from pycrypto.

elias6 avatar elias6 commented on June 10, 2024

I'm not sure. See this: #173

from pycrypto.

rim-odoo avatar rim-odoo commented on June 10, 2024

Hi guys, (cc @dlitz )

I'm landing here after getting the same issue:

  File "/usr/lib/python3.6/site-packages/Crypto/PublicKey/RSA.py", line 352, in exportKey
    keystring = ''.join([ struct.pack(">I",len(kp))+kp for kp in keyparts])
  File "/usr/lib/python3.6/site-packages/Crypto/PublicKey/RSA.py", line 352, in <listcomp>
    keystring = ''.join([ struct.pack(">I",len(kp))+kp for kp in keyparts])
TypeError: can't concat str to bytes

Is it possible, either:

  • to ship a new version (2.7 ?) in PyPi, since the actual one 2.6.1 is quite out of date
  • to backport this fix ab25c6f
    in PyCrypto 2.6.1 ?
  • to mark this lib is as unmaintained?

Thanks a lot for your feedback, let me know if I can help

from pycrypto.

rim-odoo avatar rim-odoo commented on June 10, 2024

Side question: should I move my project under https://github.com/Legrandin/pycryptodome that looks to be actively maintained?

from pycrypto.

rim-odoo avatar rim-odoo commented on June 10, 2024

@galgalesh Thank your for advice :) good to know there is a drop-in replacement lib!

In a future step, I will probably move to cryptography since it is already a dependency of a dependency of my project and I don't do very much crypto actually.

from pycrypto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.