Blind signature support in pyelliptic #1509

Merged
PeterSurda merged 4 commits from blindsig1 into v0.6 2019-08-28 13:43:29 +02:00
Showing only changes of commit 395fbcd0f0 - Show all commits

View File

@ -3,8 +3,10 @@ Test for ECC blind signatures
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
"""
import os
import unittest
from ctypes import cast, c_char_p
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
from pybitmessage.pyelliptic.eccblind import ECCBlind
from pybitmessage.pyelliptic.openssl import OpenSSL
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
class TestBlindSig(unittest.TestCase):
@ -24,12 +26,27 @@ class TestBlindSig(unittest.TestCase):
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
msg = os.urandom(64)
msg_blinded = requester_obj.create_signing_request(point_r, msg)
g1itch commented 2019-08-28 11:46:50 +02:00 (Migrated from github.com)
Review

Maybe self.assertNotEqual(msg, msg_blinded)?

Maybe `self.assertNotEqual(msg, msg_blinded)`?
PeterSurda commented 2019-08-28 12:05:48 +02:00 (Migrated from github.com)
Review

Well that will always succeed as msg is a string and msg_blinded is an openssl bignum, but I can convert it before comparison, and I can also compare blinded an unblinded signature (those should both be bignums already).

As I said before, there is still no serialisation for the wire protocol, as that has to be designed first, then there will be minor refactoring here.

Well that will always succeed as msg is a string and msg_blinded is an openssl bignum, but I can convert it before comparison, and I can also compare blinded an unblinded signature (those should both be bignums already). As I said before, there is still no serialisation for the wire protocol, as that has to be designed first, then there will be minor refactoring here.
g1itch commented 2019-08-28 12:34:57 +02:00 (Migrated from github.com)
Review

They will obviously differ. That's just a tests logic (as I understand it) to compare just in case and document it. Maybe that's unnecessary.

Serialization will be probably done in the network package, so it's not related to the blind signature implementation itself. The signatures seems to work well. So are you going to merge this now?

They will obviously differ. That's just a tests logic (as I understand it) to compare just in case and document it. Maybe that's unnecessary. Serialization will be probably done in the `network` package, so it's not related to the blind signature implementation itself. The signatures seems to work well. So are you going to merge this now?
PeterSurda commented 2019-08-28 12:43:01 +02:00 (Migrated from github.com)
Review

I'll add the tests and then merge.

I'll add the tests and then merge.
# check
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
msg_blinded_str = OpenSSL.malloc(0, OpenSSL.BN_num_bytes(msg_blinded))
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
OpenSSL.BN_bn2bin(msg_blinded, msg_blinded_str)
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
self.assertNotEqual(msg, cast(msg_blinded_str, c_char_p).value)
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
# (3) Signature Generation
signature_blinded = signer_obj.blind_sign(msg_blinded)
# (4) Extraction
signature = requester_obj.unblind(signature_blinded)
# check
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
signature_blinded_str = OpenSSL.malloc(0,
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
OpenSSL.BN_num_bytes(
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
signature_blinded))
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
signature_str = OpenSSL.malloc(0, OpenSSL.BN_num_bytes(signature[0]))
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
OpenSSL.BN_bn2bin(signature_blinded, signature_blinded_str)
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
OpenSSL.BN_bn2bin(signature[0], signature_str)
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
self.assertNotEqual(cast(signature_str, c_char_p).value,
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
cast(signature_blinded_str, c_char_p).value)
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
# (5) Verification
verifier_obj = ECCBlind(pubkey=signer_obj.pubkey)
self.assertTrue(verifier_obj.verify(msg, signature))

g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:09:52 +02:00 (Migrated from github.com)
Review

Shebang is not needed here.

Shebang is not needed here.
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:15:09 +02:00 (Migrated from github.com)
Review

from pybitmessage.pyelliptic.eccblind import ECCBlind

`from pybitmessage.pyelliptic.eccblind import ECCBlind`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:16:07 +02:00 (Migrated from github.com)
Review

self.assertTrue(blind_sig.verify())

`self.assertTrue(blind_sig.verify())`
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
g1itch commented 2019-08-27 11:19:42 +02:00 (Migrated from github.com)
Review

If you write docstring in one line it will be shown in the test results. e.g.

    def test_blind_sig(self):
        """Test full sequence using a random certifier key and a random msg"""
If you write docstring in one line it will be shown in the test results. e.g. ```python def test_blind_sig(self): """Test full sequence using a random certifier key and a random msg""" ```
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
PeterSurda commented 2019-08-27 12:25:00 +02:00 (Migrated from github.com)
Review

This breaks the test.

This breaks the test.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:27:08 +02:00 (Migrated from github.com)
Review

It depends on how you run it.

It depends on how you run it.
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8
g1itch commented 2019-08-27 12:28:27 +02:00 (Migrated from github.com)
Review

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8

Travis CI should be OK, because I used such imports before: https://github.com/Bitmessage/PyBitmessage/blob/v0.6/src/tests/test_config.py#L8