Skip to content

[fix] attempt to fix pwdsphinx #36#19

Merged
stef merged 1 commit intomasterfrom
py3.14-asyncio
Feb 22, 2026
Merged

[fix] attempt to fix pwdsphinx #36#19
stef merged 1 commit intomasterfrom
py3.14-asyncio

Conversation

@stef
Copy link
Copy Markdown
Owner

@stef stef commented Feb 22, 2026

No description provided.

@sonarqubecloud
Copy link
Copy Markdown

@link2xt
Copy link
Copy Markdown

link2xt commented Feb 22, 2026

It seems to work. I checked out the repository and this branch (commit 7f7ca83).

Created venv with python3 -m venv venv, activated it with . venv/bin/activate. Ran pip install setuptools and then pip install python/.

Checked that overwrite works:

>>> import pyoprf
>>> print(pyoprf.__file__)
/home/user/src/liboprf/venv/lib/python3.14/site-packages/pyoprf/__init__.py

I got another error:

$ PYTHONPATH=$PWD/venv/lib/python3.14/site-packages/ sphinx init
/home/user/src/liboprf/venv/bin/websphinx
Already initialized.
Traceback (most recent call last):
  File "/usr/bin/sphinx", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.14/site-packages/pwdsphinx/sphinx.py", line 1107, in main
    sys.exit(init())
             ~~~~^^
  File "/usr/lib/python3.14/site-packages/pwdsphinx/sphinx.py", line 539, in init
    create(m, b"all ok?", "healthcheck", "sphinx servers", target="everything works fine")
    ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/pwdsphinx/sphinx.py", line 547, in create
    beta = dkg(m, CREATE_DKG, threshold, ids, alpha)
  File "/usr/lib/python3.14/site-packages/pwdsphinx/sphinx.py", line 475, in dkg
    peer_msgs = m.gather(sizes[0],n) #,debug=True)
  File "/home/user/src/liboprf/venv/lib/python3.14/site-packages/pyoprf/multiplexer.py", line 447, in gather
    return get_event_loop().run_until_complete(self.gather_async(*args, **kwargs))
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/asyncio/base_events.py", line 719, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/home/user/src/liboprf/venv/lib/python3.14/site-packages/pyoprf/multiplexer.py", line 443, in gather_async
    raise ValueError(f"not enough responses gathered: {results}")
ValueError: not enough responses gathered: [b"\x06\x8b\xe2\xe2\xbe\x83\t\xe3t\xa4SE\x15\x96\xea\xa5$vs\x86|\xae!mj)\xb0\xdf1'JZ\xdf\xd3\t\x9d~]\xfccHj[\x8cX\xb2oP&\x83\xb6u^\xff\x86{8\xec\xb8\xa6QN^\x03\x00\x00\x02\x00\x00\x00\xb1\x01\xff\x00\x00\x00\x00i\x9b;\xc5hD-\x14\xe5\x8a\x85\x80\xe9\x95m\x9e\x8c<j\x0cj\xdd\x92rc\xbb[!U\x94Q\x0cD \xb0#o|\x03\x9djJF\xbf|\x99\xcdz\xecS\xc8\x95V_\xf1s/\x8f\xc2'\xb2@\xa5\xdd\t\r\xa6\xa4\xf0\xcf,.c\xec\xc5\xff\xc9\xdbo3t\xb3\\\xc8\xc3\xe9P\xb5\xf7 >tB\xaal\xd7\x0eZ\xc3V+@&\xe2\xb3\xea\xb1\x82\xf5\x05\xfe\xda\x9e\xa6\x034M\xc9x\xe4\xce\t\t\x9f\xfc\x11\x05\x90\x1b\x0c\x11\xac\x1ek0\xb5P\x91\x94\x86\xec.e\x808\x8d\rd\x81X\x19\xfeq\xae\xf0,_\x00;w\xb9h\xd3\x02", b'\x89\xa8\x926\n\xb2\xaf\xfec^=u\x97\xc7\xe2b\x0c9\xaf\xc0\xdeg\x8a\xae\x0f\xdcs\xcf\xf8\xc2\x14\x901\xd6\\\x1c\x0f}\xb6"J20z\x11\xf5\x1f\x1c\xe6\x9f\x16\xe5\x17\x9b\x08h\xf9W\x8d:Cp5\x05\x00\x00\x02\x00\x00\x00\xb1\x02\xff\x00\x00\x00\x00i\x9b;\xc5hD-\x14\xe5\x8a\x85\x80\xe9\x95m\x9e\x8c<j\x0cj\xdd\x92rc\xbb[!U\x94Q\x0cD \xb0#pF\x06\xe3\xe1N\x8d\xe4\x81[\xc1\x02{\xb9\x0e\x98\xd1\xcf\x0f\xa6\xc4v\x8e\xfd|&\xf8\x1feTp\x8e\x8b`\xda\xdc\x89\xeb\xef\xca\xd4\x91\'\x8a\xd4\xfd\xdcg\xd7\x97\xac\x82\x12=\x19\x89\xea.\x8a+\x96\x03\x80\x15\x17$\xc0(O\xec\xec\xf8\xee\x7f\xc1\x86RG\xe7\xb7+\x85{b?\x16[\xcat\x00\x88F\xa7\x8c\xe4F\xdc\xea+z\tdC\xc0\x82\x99\xeb.\x16v2\x05%\xf5\x80\x11\xd9\xb3\x8e\xce\xae\x0c\xabT\xee(\x0b\t', None]

My current config:

[client]
verbose = false
datadir="~/.config/sphinx"
rwd_keys=false
validate_password=true
userlist=true
delete_upgraded=false
threshold = 2

[servers]
[servers.ctrlc1]
host="pwd.ctrlc.hu"
port=443
ltsigkey="QjMKdyG6XCdgonn0xrvzKEXLOej/sVAtgfDayZBYVP0="

[servers.ctrlc2]
host="pwd2.ctrlc.hu"
port=443
ltsigkey="sJs724fgJ8ax98gTI3IihtFmzkz8lls41+GcDMHCQpk="

[servers.dyne]
host="sphinx.dyne.org"
port=4443
ltsigkey="TnQHEiiJtFXqhUskqAxtIhG/xlk9t79BXyLcofai32g="

@link2xt
Copy link
Copy Markdown

link2xt commented Feb 22, 2026

$ printf password | PYTHONPATH=$PWD/venv/lib/python3.14/site-packages/ sphinx create x y
not enough responses gathered: [b"\xad\xd7A\t{+\xc8\x10\x9c\x9cX)\xb2\x19^\x14\x87Bb\xa9A\x02u\x9a\x84\x00\xd0\xf5\xe6\x82\xff\x0c[\xf3n\x15[\x0f\x87r\x9fl\x82\xde{$=\xc1Iu\x17fS\xaa\xc7\xb2\xdb\x93\x965\xcb\ty\x07\x00\x00\x02\x00\x00\x00\xb1\x01\xff\x00\x00\x00\x00i\x9b<\xaa\xec\x87\xfa\xba)\x07\x13\x95rk\xcbO&X\x9c#\xa0{d&V;\x19\xfb\x0b\xa0\xf3\x9d\x932\xb7\xba\xaa#\xa3\x1b\xbb\xdb\xbdt\x1c\xca9h)A\xff\x88\x7f5\xdb'k\x02\x95h\xdb\xf2j\xe1\xf6\x95#e\xda\xe1\xe3\xfa\xad#\x99r^\xb3\xed\xd4\xe7\xc0\xa3qK\xecx\xcew\xf6\xae!\xaa\xbb\xebS\xc5\xa7\xe4o\xe8\x83\x10\xc8\x0e\xe8\xc2\x00\x9e\xe4\xec\x08\x8c\xfaT\x1a|OP\x828\x18\xabm\xc3\xe0\xf95\x02\x98\xe7\x9c\xa1\xa2\xbcV\x0cY\xdfS\x17\xefIHx\xfa9\xd1\xbd\xcbu\x83'P~\xb5\xcd\x06B\xd1\x890\x18\x04", b'\x0e\xf1QDi\xc4\x1a\xf9\xfe\x8e9\xfb\xd4\xe2h\xcch\xce\xaa\xf6k`\x05\x95L\x15j\x83\x1c\x0b\xa0?\xbaV>\xe8\xa9\x9f\xb5\x18\x11\xb3\xd9\x18\x83\xbd\x84\xc9x&\x85f\xe5Kx\xeb}\x7f4\x85\x97.\x99\x05\x00\x00\x02\x00\x00\x00\xb1\x02\xff\x00\x00\x00\x00i\x9b<\xaa\xec\x87\xfa\xba)\x07\x13\x95rk\xcbO&X\x9c#\xa0{d&V;\x19\xfb\x0b\xa0\xf3\x9d\x932\xb7\xba\xe1M\xf5\x8e7\x843.\xe4R\x973\x86XB2z\x92\xb8\xee\xf8\xf7\xd3\x91J[\xf0\x8d\xcf\xf0\xe8\xf4\x80\x13\x86\xdf\x18\x90\xe3\x10\xdd\xccO\xf8-N\xf3Ac\xec\x0f\xac\x11rGw\xec\x88\x93@\xc6Z\xf6\x11`\\m=\x1a\x8c\xa0\xac\xbd\x93\xb5\x97\xd1i\xf6V\xb42>n\xa6\x12\xe8\x05\xf7g\xe6av+\x828B\xfe\x9fz\x974\x13\xf7\xe4\x1b\x96d\x968\x9fa\x95\xfeF+\xec0\xc1\x1e\xd9\xe1\xcc\xbd\x97\x8b\xa7\x07', None]

@stef
Copy link
Copy Markdown
Owner Author

stef commented Feb 22, 2026

oh, can you try to set the port of sphinx.dyne.org to 4443?

@stef
Copy link
Copy Markdown
Owner Author

stef commented Feb 22, 2026

i think i need to fix the port on the public servers list.

@link2xt
Copy link
Copy Markdown

link2xt commented Feb 22, 2026

But it is already set to 4443 in the config above.

@link2xt
Copy link
Copy Markdown

link2xt commented Feb 22, 2026

Anyway, I have commented out all servers except the first one and set threshold to 1, now something works:

$ printf password | PYTHONPATH=$PWD/venv/lib/python3.14/site-packages/ sphinx create x y
qtOmx5/vwN?W8#g}fj9t"%`9nmb\mDW,rj~@t('%7kV6P5taBG~~ss3{HjJn9zL2d;a|L7[=\?R(9z

My current config:

[client]
verbose = false
datadir="~/.config/sphinx"
rwd_keys=false
validate_password=true
userlist=true
delete_upgraded=false
threshold = 1

[servers]
[servers.ctrlc1]
host="pwd.ctrlc.hu"
port=443
ltsigkey="QjMKdyG6XCdgonn0xrvzKEXLOej/sVAtgfDayZBYVP0="

#[servers.ctrlc2]
#host="pwd2.ctrlc.hu"
#port=443
#ltsigkey="sJs724fgJ8ax98gTI3IihtFmzkz8lls41+GcDMHCQpk="

#[servers.dyne]
#host="sphinx.dyne.org"
#port=4443
#ltsigkey="TnQHEiiJtFXqhUskqAxtIhG/xlk9t79BXyLcofai32g="

@link2xt
Copy link
Copy Markdown

link2xt commented Feb 22, 2026

Another attempt in verbose mode with threshold 3:

$ cat ~/.config/sphinx/config
[client]
verbose = true
datadir="~/.config/sphinx"
rwd_keys=false
validate_password=true
userlist=true
delete_upgraded=false
threshold = 3

[servers]
[servers.ctrlc1]
host="pwd.ctrlc.hu"
port=443
ltsigkey="QjMKdyG6XCdgonn0xrvzKEXLOej/sVAtgfDayZBYVP0="

[servers.ctrlc2]
host="pwd2.ctrlc.hu"
port=443
ltsigkey="sJs724fgJ8ax98gTI3IihtFmzkz8lls41+GcDMHCQpk="

[servers.dyne]
host="sphinx.dyne.org"
port=4443
ltsigkey="TnQHEiiJtFXqhUskqAxtIhG/xlk9t79BXyLcofai32g="
$ printf password | PYTHONPATH=$PWD/venv/lib/python3.14/site-packages/ sphinx create x y
hostname: 127.0.0.1
address: 127.0.0.1
port: 2355
datadir: /home/user/.config/sphinx
ssl_cert: None
rwd_keys: False
validate_password: True
userlist: True
threshold: 3
ctrlc1 pwd.ctrlc.hu:443 b"B3\nw!\xba\\'`\xa2y\xf4\xc6\xbb\xf3(E\xcb9\xe8\xff\xb1P-\x81\xf0\xda\xc9\x90XT\xfd" cert: None
ctrlc2 pwd2.ctrlc.hu:443 b'\xb0\x9b;\xdb\x87\xe0\'\xc6\xb1\xf7\xc8\x13#r"\x86\xd1f\xceL\xfc\x96[8\xd7\xe1\x9c\x0c\xc1\xc2B\x99' cert: None
dyne sphinx.dyne.org:4443 b'Nt\x07\x12(\x89\xb4U\xea\x85K$\xa8\x0cm"\x11\xbf\xc6Y=\xb7\xbfA_"\xdc\xa1\xf6\xa2\xdfh' cert: None
error: 1

@stef
Copy link
Copy Markdown
Owner Author

stef commented Feb 22, 2026

you get the error because the password for x y already exists on the first server.

@stef
Copy link
Copy Markdown
Owner Author

stef commented Feb 22, 2026

will improve the error message for that case.

@link2xt
Copy link
Copy Markdown

link2xt commented Feb 22, 2026

In any case, original problem with asyncio is fixed by this change.

@stef
Copy link
Copy Markdown
Owner Author

stef commented Feb 22, 2026

But it is already set to 4443 in the config above.

uh, my bad. i misread that.

@stef stef merged commit 5fb88cb into master Feb 22, 2026
4 checks passed
@stef stef deleted the py3.14-asyncio branch February 22, 2026 20:21
@stef
Copy link
Copy Markdown
Owner Author

stef commented Feb 22, 2026

seems like sphinx.dyne.org is down. triggered the admin, to have a check.

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

Successfully merging this pull request may close these issues.

2 participants