Skip to content

Commit d1afdc5

Browse files
committed
test(core): evolu keys generation
[no changelog]
1 parent 8e20173 commit d1afdc5

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

tests/device_tests/evolu/__init__.py

Whitespace-only changes.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This file is part of the Trezor project.
2+
#
3+
# Copyright (C) 2012-2025 SatoshiLabs and contributors
4+
#
5+
# This library is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Lesser General Public License version 3
7+
# as published by the Free Software Foundation.
8+
#
9+
# This library is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Lesser General Public License for more details.
13+
#
14+
# You should have received a copy of the License along with this library.
15+
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
16+
17+
import pytest
18+
19+
from trezorlib import evolu
20+
21+
pytestmark = [pytest.mark.altcoin, pytest.mark.models("core")]
22+
23+
ALL_MNEMONIC = "all all all all all all all all all all all all"
24+
25+
EXPECTED_OWNER_ID = "0940d9f3e307f3bcedbcc8361ae136b619603a686386ecd329c3ed2337cb831d"
26+
EXPECTED_WRITE_KEY = "2a65e7495bc4edc8ad365c5278404467fc2ec1b3e6978e2406f59329d5357f3e"
27+
EXPECTED_ENCRYPTION_KEY = (
28+
"9ad06a43e9d4739502d59c8cafdaa6babb0481cdd0b3acb8455f080b38847642"
29+
)
30+
31+
pytestmark_all_mnemonic = pytest.mark.setup_client(mnemonic=ALL_MNEMONIC)
32+
33+
34+
@pytestmark_all_mnemonic
35+
def test_get_evolu_keys(client):
36+
"""Test Evolu key derivation against known test vectors."""
37+
response = evolu.get_evolu_keys(client)
38+
39+
assert response.owner_id.hex() == EXPECTED_OWNER_ID
40+
assert response.write_key.hex() == EXPECTED_WRITE_KEY
41+
assert response.encryption_key.hex() == EXPECTED_ENCRYPTION_KEY

0 commit comments

Comments
 (0)