Comments (15)
ah. apologies, I thought it only had specific chosen bindings. I will have a look through those docs and see if I can find what I'm looking for. thanks again! :)
from secp256k1.swift.
ok cool, interfacing with c libraries is above my swift paygrade so if you have any pointers or WIP code I can follow along with I'd really appreciate it :)
from secp256k1.swift.
@mikekelly I've started a draft PR with my initial implementation here: #211
Let me know what feedback you have 😉
from secp256k1.swift.
@csjones awesome man thanks for doing this, I'll take a look shortly
from secp256k1.swift.
Hey @mikekelly 👋 Are you referring to the recovery module in secp256k1? Those binding are available and a simple unit test exists to make sure they work. You'll want to refer to the upstream documentation for what C APIs to use exactly.
The Swift APIs for the recovery module is something I'm working on currently in addition to better documentation overall using DocC.
from secp256k1.swift.
@csjones ok thanks for the reply. Do you have a branch with this WIP on the recovery module? Be good to see how it's done :)
from secp256k1.swift.
@csjones ok thanks for the reply. Do you have a branch with this WIP on the recovery module? Be good to see how it's done :)
No public branch yet, Swift API is still in flux. I'll post a PR linking back to this thread when it's alpha-ready. 😁
from secp256k1.swift.
ok cool, in the mean time I've had a look again at the bindings in the unit test you linked to and I'm not sure that function does what I'm looking for (ie. deriving a public key from a sig and a message digest)
from secp256k1.swift.
ok cool, in the mean time I've had a look again at the bindings in the unit test you linked to and I'm not sure that function does what I'm looking for (ie. deriving a public key from a sig and a message digest)
What about the upstream documentation? All of the recovery modules APIs are available through this swift package. The unit test is just a single example that demonstrates the secp256k1 C APIs work in Swift.
from secp256k1.swift.
ah. apologies, I thought it only had specific chosen bindings. I will have a look through those docs and see if I can find what I'm looking for. thanks again! :)
No worries and you're welcome! Happy to help 😄
Would you mind doing me a favor and sharing what you're looking to accomplish and/or build exactly? The details will help me decide how the Swift API takes shape. Also, having a specific use case helps me test out the implementation.
from secp256k1.swift.
Ideally, I'm looking for something like this:
let recoveredPubkey = try! secp256k1.Recovered.PublicKey(messageHash: [UInt8], signature: [UInt8])
from secp256k1.swift.
for context: I'm hacking on a client for a cryptographic protocol and the client needs to derive the public key from a message hash and a signature (for verification purposes)
from secp256k1.swift.
Ideally, I'm looking for something like this:
let recoveredPubkey = try! secp256k1.Recovered.PublicKey(messageHash: [UInt8], signature: [UInt8])
Thanks! That structure resembles what I've been narrowing in on. In terms of use-case, do you have a link to the cryptographic protocol you're referring to?
from secp256k1.swift.
here's the specific bit of the protocol I'm working on atm:
https://github.com/coinkite/coinkite-tap-proto/blob/master/docs/protocol.md#certs
if you want to chat in more detail about what I'm working on feel free to DM me! :)
from secp256k1.swift.
here's the specific bit of the protocol I'm working on atm:
https://github.com/coinkite/coinkite-tap-proto/blob/master/docs/protocol.md#certs
if you want to chat in more detail about what I'm working on feel free to DM me! :)
Dope! Super helpful and appreciate the reference. Got what I was looking for and I'm going to read up on the protocol. Thank you 😊
from secp256k1.swift.
Related Issues (20)
- nvm I need the podspec for this, i'm so sorry... HOT 2
- Contructing a PublicKey with rawRepresentation fails with incorrect size HOT 3
- value of type `secp256k1_surjectionproof` has no member `data` HOT 13
- Differenct signature result with other libraries HOT 2
- Do you have any examples of how you would sign a taproot input using this library? HOT 1
- Did library already support sign a taproot input? HOT 4
- Taproot address format HOT 9
- Cannot install package via SPM when importing it from another package HOT 3
- Is it possible to generate an invalid PrivateKey when no secret it passed? HOT 9
- How to use secp256k1_ec_pubkey_combine HOT 10
- How to create PrivateKey by importing pem private key? HOT 7
- Test/Example for `sharedSecretFromKeyAgreement` with `handler`? HOT 8
- xcodebuild fails for 0.13.0 HOT 1
- secp256k1/ECDH.swift:180:20 Value of type 'UnsafeMutablePointer<UInt8>' has no member 'update' HOT 1
- #include "./secp256k1.h" Report an error './secp256k1.h' file not found HOT 6
- Is there really a random k injected when calculating an ECDSA signature ? HOT 2
- Recovery of pubic key when manually building signature HOT 11
- Please use semver for release tags HOT 1
- Add support for VisionOS HOT 4
- BitcoinSign Transaction HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from secp256k1.swift.