Skip to content

Add an account contract with secp256r1 sig verification and test end-to-end#1402

Draft
jayz22 wants to merge 3 commits intostellar:mainfrom
jayz22:secp-signer-example
Draft

Add an account contract with secp256r1 sig verification and test end-to-end#1402
jayz22 wants to merge 3 commits intostellar:mainfrom
jayz22:secp-signer-example

Conversation

@jayz22
Copy link
Contributor

@jayz22 jayz22 commented Apr 12, 2024

What

Test changes in stellar/rs-soroban-sdk#1246

Why

[TODO: Why this change is being made. Include any context required to understand the why.]

Known limitations

[TODO or N/A]

github-merge-queue bot pushed a commit to stellar/rs-soroban-sdk that referenced this pull request Apr 23, 2024
### What

Add support for secp256r1 signature verification (picking up env changes
stellar/rs-soroban-env#1376).

And adapts the existing `Crypto` module by split the cryptographic
functions into two sets:
- `Crypto`: standard, recommended set of cryptographic functions. This
includes `secp256k1_recover` and `secp256r1_verify` taking the full
`message: Bytes` as input and performs hashing underneath.
- `CryptoHazmat`: hazardous material. Contains low-level, unsecure if
used incorrectly functions including `secp256k1_recover_prehash` and
`secp256r1_verify_prehash`, taking a `message_hash: BytesN<32>` as
input.

Design rationales were discussed in the env PR (started on
stellar/rs-soroban-env#1376 (comment)
and onward).

XDR changes associated with the new contract spec:
stellar/stellar-xdr#182,
stellar/stellar-xdr#183
rs-xdr: stellar/rs-stellar-xdr#361

End-to-end with secp256r1 account contract:
stellar/rs-soroban-env#1402

### Why


[TODO: Why this change is being made. Include any context required to
understand the why.]

### Known limitations

[TODO or N/A]

---------

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>
@jayz22 jayz22 force-pushed the secp-signer-example branch from be6a5a6 to 65f9268 Compare June 17, 2024 17:42
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.

1 participant