Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #21583

Closed
Open
Created Mar 01, 2017 by Trac@tracbot

Crypto nonce must be bytes instead of string for python3

File "stem/stem/descriptor/hidden_service_descriptor.py", line 329, in _decrypt_basic_auth
    cipher = Cipher(algorithms.AES(authentication_cookie), modes.CTR('\x00' * len(iv)), default_backend())
  File "/usr/lib/python3.5/site-packages/cryptography/hazmat/primitives/ciphers/modes.py", line 139, in __init__
    raise TypeError("nonce must be bytes")
TypeError: nonce must be bytescipher = Cipher(algorithms.AES(authentication_cookie), modes.CTR('\x00' * len(iv)), default_backend())

  File "/usr/lib/python3.5/site-packages/cryptography/hazmat/primitives/ciphers/modes.py", line 139, in !__init!__
    raise !TypeError("nonce must be bytes")

TypeError: nonce must be bytes

The above error shows up in python3. Most likely it is due to the recent migration from pycrypto to cryptography.

Fix: https://github.com/paraschetal/stem/commit/c09c9c723806d933445c5a33bceb20d31dcb99d3

Trac:
Username: feignix

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking