Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install #18

Open
davejakenic opened this issue Jul 24, 2022 · 2 comments
Open

Unable to install #18

davejakenic opened this issue Jul 24, 2022 · 2 comments

Comments

@davejakenic
Copy link

Hello,

I search an efficient non-deterministic signature algorithm in python.

I found the following example for using ed25519, which reads VERY intriguing:

import ed25519

privKey, pubKey = ed25519.create_keypair()
print("Private key (32 bytes):", privKey.to_ascii(encoding='hex'))
print("Public key (32 bytes): ", pubKey.to_ascii(encoding='hex'))

msg = b'Message for Ed25519 signing'
signature = privKey.sign(msg, encoding='hex')
print("Signature (64 bytes):", signature)

try:
    pubKey.verify(signature, msg, encoding='hex')
    print("The signature is valid.")
except:
    print("Invalid signature!")

credit: https://cryptobook.nakov.com/digital-signatures/eddsa-sign-verify-examples

I would like to use this, so I tried pip install ed25519, which yields the following error message:

$ pip install ed25519
Collecting ed25519
Using cached ed25519-1.5.tar.gz (868 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for ed25519, since package 'wheel' is not installed.
Installing collected packages: ed25519
Running setup.py install for ed25519 ... error
error: subprocess-exited-with-error

× Running setup.py install for ed25519 did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\ed25519
copying src\ed25519\keys.py -> build\lib.win-amd64-3.10\ed25519
copying src\ed25519\test_ed25519.py -> build\lib.win-amd64-3.10\ed25519
copying src\ed25519_version.py -> build\lib.win-amd64-3.10\ed25519
copying src\ed25519_init_.py -> build\lib.win-amd64-3.10\ed25519
UPDATING build\lib.win-amd64-3.10\ed25519/_version.py
set build\lib.win-amd64-3.10\ed25519/_version.py to '1.5'
running build_ext
building 'ed25519._ed25519' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> ed25519

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.


So I clicked the download on the link, which to my greatest regret installed visual studio on my computer.
Afterwards, trying the pip install again, yields just the same exact error message from above.

I must add that I do not quite understand why the algorithm could not have been implemented in pure python. I have a minimum working example of brainpool curve Diffie-Hellman that worked just smoothly.

Is there another curve with a more reliably to install library. My area of application is democracy software. It would be to utmost concern if a user is unable to install the software because some package instability or dependency or unreliability.

What do you advise so that I can make a code, close to the above, work on a real-world PC ?

@AMac2022
Copy link

same here

@yugocabrio
Copy link

yugocabrio commented Jan 4, 2023

I am struggling with this library.
Can you use this method, .to_ascii(encoding='hex') ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants