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

is Oasis Network (ROSE) supported? #115

Open
colossus-digital opened this issue Oct 22, 2022 · 4 comments
Open

is Oasis Network (ROSE) supported? #115

colossus-digital opened this issue Oct 22, 2022 · 4 comments

Comments

@colossus-digital
Copy link

is Oasis Network (ROSE) supported? or could be supported ?
tnks

@agouin
Copy link
Member

agouin commented Nov 13, 2022

Oasis core uses tendermint, but it is a tendermint fork that uses a different ed25519 implementation: https://github.com/oasisprotocol/curve25519-voi. After first glance it is not clear to me whether this would be a breaking change or not. It appears that it may be mainly performance optimizations. I would suggest testing horcrux on an oasis testnet first.

@colossus-digital
Copy link
Author

Finally i have an oasis testnet validator and I'd like to give horcrux a try but I don't know how to setup the node to use the horcrux signer and how to configure the horcrux with my oasis node

This is the oasis node setup:

https://docs.oasis.io/node/run-your-node/advanced/using-ledger-backed-consensus-key-with-a-remote-signer#configure-oasis-node

Any ideas about how/where we could start ?

@colossus-digital
Copy link
Author

Oasis core uses tendermint, but it is a tendermint fork that uses a different ed25519 implementation: https://github.com/oasisprotocol/curve25519-voi. After first glance it is not clear to me whether this would be a breaking change or not. It appears that it may be mainly performance optimizations. I would suggest testing horcrux on an oasis testnet first.

I have a working example of an Oasis keypair generation (python):

from bip_utils import Bip39SeedGenerator, Bip32Slip10Ed25519

mnemonic = "bla bla bla"
derivation_path = "m/44'/474'/0'"

# Generate seed
seed_bytes = Bip39SeedGenerator(mnemonic).Generate()

# Generate BIP32 object
bip32_ctx =  Bip32Slip10Ed25519.FromSeedAndPath(seed_bytes, derivation_path)

# Keys in extended format
#print(bip32_ctx.PrivateKey().ToExtended())
#print(bip32_ctx.PublicKey().ToExtended())

# Keys bytes
private_key_bytes = bip32_ctx.PrivateKey().Raw().ToBytes()
public_key_bytes = bip32_ctx.PublicKey().RawCompressed().ToBytes()

# Keys in hex format
private_key_hex = bip32_ctx.PrivateKey().Raw().ToHex()
public_key_hex = bip32_ctx.PublicKey().RawCompressed().ToHex()

# Keys in base64 format
private_key_b64 = base64.b64encode(private_key_bytes).decode()
public_key_b64 = base64.b64encode(public_key_bytes).decode()

Could it be useful to understand?

@nitronit
Copy link
Contributor

nitronit commented Mar 8, 2023

Easiest way to know if it works or not is to see/try the underlying threshold signature scheme that Horcrux uses.
Its here: https://gitlab.com/unit410/threshold-ed25519
What you need to to is replace the ed25519 library they are using to create the keys and use your own (oasis) implementation to see if it works. Or you can be really brave and read the threshold paper :)

All else equal, the rest of Horcrux is multiple "middle-layers" to make the signature scheme talk to each-other and decide upon a leader (so you don't double sign)

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

3 participants