aliyun / aliyun/algorithm-base

ab.keys.crypto加密导致Python高版本镜像无法调用

Open
#7 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
95
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Traceback (most recent call last):
    File "/usr/local/bin/abt", line 5, in <module>
    from ab.client.cli import cli
   File "/usr/local/lib/python3.8/site-packages/ab/client/cli.py", line 3, in <module>
     from ab.client.crypto_cli import crypto_impl
   File "/usr/local/lib/python3.8/site-packages/ab/client/crypto_cli.py", line 4, in <module>
     from ab.keys.crypto import ab_encryptFile
 ModuleNotFoundError: No module named 'ab.keys.crypto'

项目中ab.keys.crypto文件是经过加密后的文件,使用python3.7以上版本镜像时无法直接调用该文件,导致加密失败。
查看源码发现代码加密不需要用到ab.keys.crypto文件引用,可以注释相关内容加密代码,但数据加密仍然需要crypto内容。
另外license的验证失败了,是否与使用license.py加密时step1函数中sout = [chr(ord(a) ^ ord(b)) for (a, b) in zip(input_line, cycle("your-key"))]的“your-key”有关?由于ab.keys.crypto的加密同样无法验证
请问能否提供一份未加密的crypto.py文件?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failing abt import on a Python 3.7+ image, then read ab/client/crypto_cli.py, the ab.keys.crypto reference, and license.py's step1 function. Done means the package can load its crypto functionality and the reported encryption and license-validation failures are resolved without relying on an unavailable encrypted module.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cryptography
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.