nucypher / zerodb

*This project is no longer actively maintained. If you'd like to become the maintainer, please let us know.* ZeroDB is an end-to-end encrypted database. Data can be stored and queried on untrusted database servers without ever exposing the encryption key. Clients can execute remote queries against the encrypted data without downloading all of it or suffering an excessive performance hit.
GNU Affero General Public License v3.0
1.56k stars 102 forks source link

zerodb-manage init_db error #41

Closed jagjag closed 8 years ago

jagjag commented 8 years ago
Username [root]: root
Passphrase: 
Repeat for confirmation: 
Sock [localhost:8001]: localhost:8002
Traceback (most recent call last):
  File "/bin/zerodb-manage", line 11, in <module>
    sys.exit(cli())
  File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/zerodbext/server/manage.py", line 67, in auth_func
    ctx.invoke(f, *args, **kw)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/zerodbext/server/manage.py", line 148, in init_db
    key = ecc.private(_passphrase).get_pubkey()
  File "/usr/lib/python2.7/site-packages/zerodb/crypto/ecc.py", line 35, in private
    key = pe.ECC(curve=CURVE)
  File "/usr/lib/python2.7/site-packages/pyelliptic/ecc.py", line 89, in __init__
    self.privkey, self.pubkey_x, self.pubkey_y = self._generate()
  File "/usr/lib/python2.7/site-packages/pyelliptic/ecc.py", line 223, in _generate
    raise Exception("[OpenSSL] EC_KEY_generate_key FAIL ... " + OpenSSL.get_error())
Exception: [OpenSSL] EC_KEY_generate_key FAIL ... error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group
jagjag commented 8 years ago

RHEL 7.1

python Python 2.7.5 (default, Oct 11 2015, 17:47:16) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2

openssl-1.0.1e-51.el7_2.4.x86_64

michwill commented 8 years ago

Seems like the issue here is that OpenSSL in RH doesn't have curve secp256k1. There are multiple non-mutually-exclusive fixes possible here.

michwill commented 8 years ago

Now using ECDSA library independent on OpenSSL. Should work in RH