Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
mpc
test
test_crypto.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
3
# Copyright (c) 2015-2022 Clearmatics Technologies Ltd
4
#
5
# SPDX-License-Identifier: LGPL-3.0+
6
7
from
unittest
import
TestCase
8
from
coordinator.crypto
import
import_verification_key, export_verification_key
9
10
11
TEST_VK = \
12
"30"
+ \
13
"819b301006072a8648ce3d020106052b810400230381860004010b0bcea9b4fa"
+ \
14
"331695817099759bcc2d21105603a308c0957212975e1b355c43f3d204b66652"
+ \
15
"a0786e53cf3448771809a05fe1fe97e4086de26f84b33a70e31ebc00aa568907"
+ \
16
"3aa89da9ecb036c1031aa27c7839de62f097cf1d46704b594c021cde001ebd0e"
+ \
17
"3f0033b98817ffa466905ce81b7916432666b490e3cbf4ca8808ebf401"
18
19
20
class
TestCrypto
(TestCase):
21
22
def
test_vk_import_export
(self) -> None:
23
vk =
import_verification_key
(TEST_VK)
24
self.assertEqual(
25
TEST_VK,
26
export_verification_key
(vk))
coordinator.crypto
Definition:
crypto.py:1
coordinator.crypto.export_verification_key
str export_verification_key(ecdsa.VerifyingKey vk)
Definition:
crypto.py:66
coordinator.crypto.import_verification_key
ecdsa.VerifyingKey import_verification_key(str vk_s)
Definition:
crypto.py:70
test.test_crypto.TestCrypto
Definition:
test_crypto.py:20
test.test_crypto.TestCrypto.test_vk_import_export
None test_vk_import_export(self)
Definition:
test_crypto.py:22
Generated on Mon Nov 28 2022 10:29:03 for Zeth - Zerocash on Ethereum by
1.8.17