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

group.hash segmentation fault #132

Closed
nikosft opened this issue Mar 10, 2017 · 3 comments
Closed

group.hash segmentation fault #132

nikosft opened this issue Mar 10, 2017 · 3 comments

Comments

@nikosft
Copy link
Contributor

nikosft commented Mar 10, 2017

The following code produces segmentation fault (with 2.7-dev):

from charm.toolbox.pairinggroup import PairingGroup,G1
group = PairingGroup('SS1024')
ID1 = "This is an id"
k = group.hash(ID1,G1)

The fault is not produced when the group SS512 is used

@jakinyele
Copy link
Member

Ok, will debug this. Thanks!

@doughgle
Copy link
Contributor

doughgle commented Nov 3, 2019

Reproducing the segfault with @nikosft's code and analysing the core dump in gdb gives the following stack trace:

(gdb) bt
#0  0x00007f9600b697dc in sha256_block_data_order_avx2 () from /usr/local/lib/libcrypto.so.1.1
#1  0x00007f9600b6ade8 in SHA256_Update () from /usr/local/lib/libcrypto.so.1.1
#2  0x00007f960133e624 in hash_to_bytes (input_buf=input_buf@entry=0x7f9602c3b620 "This is an id", input_len=20181089, output_buf=output_buf@entry=0x7fff4827bb60 "", hash_len=1210563680, 
    hash_len@entry=127, hash_prefix=hash_prefix@entry=2 '\002') at charm/core/math/pairing/pairingmodule.c:409
#3  0x00007f960133f063 in Element_hash (self=<optimized out>, args=<optimized out>) at charm/core/math/pairing/pairingmodule.c:1377

Note that is using Python 3.5 and OpenSSL 1.1.

Out of time to dig deeper now, but could use some help. @jakinyele, any suggestions?

@matsevers
Copy link

Unfortunately this problem also occurs with me. I am using Python 3.8, OpenSSL 1.1.1 and pbc 0.5.14. In contrast SS512 works without problems.

@jakinyele Do you have an idea what the problem might be related to? Thanks in advance for your efforts!

nikosft added a commit to nikosft/charm that referenced this issue Nov 21, 2020
jakinyele added a commit that referenced this issue Nov 23, 2020
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

4 participants