Constellation-Labs / tessellation

Monadic execution contexts for topology organization
Apache License 2.0
49 stars 28 forks source link

Allow signing using node keys via L0/L1 node context #836

Closed scasplte2 closed 7 months ago

scasplte2 commented 7 months ago

Summary

Added method Hash => F[SignatureProof] to L0NodeContext and L1NodeContext to allow for signing data using the node key pair within the Data Application scope.

Changes

Testing

Tickets

PROT-577

marcinwadon commented 7 months ago

Do we really need to allow signing an arbitrary data using the node's key? I see it as a simple vector of attack - just pass a transaction and you can withdraw funds from the node

IPadawans commented 7 months ago

Do you just want to retrieve the SignatureProof using the node keypair? If so, besides Marcin concern, maybe we can choose a different name for the method

scasplte2 commented 7 months ago

I agree that node keys should be handled with care but I don't see how this could be a vector of attack since it is on the developer interface and not publicly facing. As such it seems like it is up to the developer to not compromise the security of their application by maintaining operational security of their API and infrastructure.

The data application that I am working on requires the node to generate a keypair to sign data that is incoming (as shown here). Without this functionality I will need to recreate the key storage utilities to load and unload keys from disk or a configuration in order to maintain a stable identity for the node. This seems more problematic to leave to individual developers if the node adding its own signature becomes a common use-case.

scasplte2 commented 7 months ago

after speaking with @ryle-goehausen this can be closed since the node is expected to receive externally signed updates from the EVM contracts. This will alleviate the need for the data application to add signatures when synchronizing updates into the L1 data queue.