I am rather new to Ethereum and I wonder if the following scenario is possible. I want/need to store some data encoded as a JWT in the blockchain and have it (publicly) accessible via an ID. Only the "owner" of the data can change it, where the ID always remains the same.
As far as I can see, this is achievable via Ethereum EOAs:
- Owner creates EC keypair
- Owner creates an EOA, the public key becoming the ID of this account
- Owner stores the JWT in the account
- Viewer knows the ID (i.e. the public key of the owner). How is irrelevant here.
- Viewer fetches contract from the chain and extracts the enclosed JWT
- Owner creates a transaction to change the JWT in the account
- Transaction is signed with his private key
Does this check out or do I have an error in this concept? Maybe I misunderstood how details work in Ethereum or with EOAs in general.
Edit: To clarify:
- EOA = Externally Owned Account in Ethereum
- JWT = JSON Web Token, for the sake of simplicity it is a base64-encoded String, nothing more