Giter Site home page Giter Site logo

atharv-attri / physical2fa Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 1019 KB

Encryption using 2 Factor Authentication through an external drive with Python

Home Page: https://pypi.org/project/Physical2FA/

License: GNU Lesser General Public License v3.0

Python 100.00%
encryption python security security-tools encryption-tool encryption-physical2fa encryption-decryption external-drive external-drives usb-stick

physical2fa's People

Contributors

atharv-attri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

00secxq

physical2fa's Issues

ValueError: Fernet key must be 32 url-safe base64-encoded bytes.

Hi,

The fail_safe.py file works fine for me, but the other thing doesn't. It's actually two problems.

The first one to decrypt (USB, on D disk, NTFS formatted):

None
Traceback (most recent call last):
  File "lock.py", line 1, in <module>
    from Physical2FA import decrypt
  File "C:\Python38-32\lib\site-packages\Physical2FA\decrypt.py", line 47, in <module>
    decrypt(i, pubkey)
  File "C:\Python38-32\lib\site-packages\Physical2FA\decrypt.py", line 31, in decrypt
    f = Fernet(key)
  File "C:\Python38-32\lib\site-packages\cryptography\fernet.py", line 37, in __init__
    raise ValueError(
ValueError: Fernet key must be 32 url-safe base64-encoded bytes.

The second for encryption (USB, on D-disk, formatted in FAT32):
*With files in the root it works, but with folders ('bb') I get the following error.

lock.py
you will encrypt the following files: ['aa', 'bb', 'key.key', 'lock.py', 'System Volume Information', 'WhatsAppImage.png']. Are you sure you want to continue? y/n: y
['aa', 'bb', 'key.key', 'lock.py', 'System Volume Information', 'WhatsAppImage.png']
None
None
['a.png', 'b.png', 'c.png', 'd.png', 'e.png', 'f.png', 'g.png']
['a.png', 'b.png', 'c.png', 'd.png', 'e.png', 'f.png', 'g.png']
[]
Traceback (most recent call last):
  File "D:\lock.py", line 1, in <module>
    from Physical2FA import encrypt
  File "C:\Python38-32\lib\site-packages\Physical2FA\encrypt.py", line 46, in <module>
    os.chdir(i)
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado: 'bb'

Could you give me an idea of what I might be doing wrong? Thanks

I have performed the following steps:

  • First execution:
from Physical2FA import write_key
write_key
  • Second execution:
from Physical2FA import encrypt
encrypt
  • Third execution:
from Physical2FA import decrypt
decrypt

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.