Skip to content

feat: soc pubkey#5492

Open
nugaon wants to merge 2 commits into
masterfrom
feat/soc-pubkey
Open

feat: soc pubkey#5492
nugaon wants to merge 2 commits into
masterfrom
feat/soc-pubkey

Conversation

@nugaon
Copy link
Copy Markdown
Member

@nugaon nugaon commented Jun 4, 2026

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

soc.FromChunk now retains the owner's secp256k1 public key, exposed via a new OwnerPubKey() getter. recoverAddress returns the recovered public key (compressed) alongside the owner address, and FromChunk stores it on the SOC struct.

Motivation and Context (Optional)

FromChunk already runs EC public key recovery (crypto.Recover) to derive the owner address, but discarded the recovered public key. Recovery is expensive, so persisting the public key lets later operations reuse it without recomputation — e.g. Diffie-Hellman key exchange (crypto.DH.SharedKey) using the owner key obtained from a SOC.

Related Issue (Optional)

#5435
ethersphere/SWIPs#93

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@nugaon nugaon force-pushed the feat/soc-pubkey branch from 07e01ed to 1160dd9 Compare June 4, 2026 15:15
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

Successfully merging this pull request may close these issues.

3 participants