Giter Site home page Giter Site logo

Comments (15)

mikekelly avatar mikekelly commented on June 15, 2024 1

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.

mikekelly avatar mikekelly commented on June 15, 2024 1

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.

csjones avatar csjones commented on June 15, 2024 1

@mikekelly I've started a draft PR with my initial implementation here: #211

Let me know what feedback you have 😉

from secp256k1.swift.

mikekelly avatar mikekelly commented on June 15, 2024 1

@csjones awesome man thanks for doing this, I'll take a look shortly

from secp256k1.swift.

csjones avatar csjones commented on June 15, 2024

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.

mikekelly avatar mikekelly commented on June 15, 2024

@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 avatar csjones commented on June 15, 2024

@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.

mikekelly avatar mikekelly commented on June 15, 2024

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.

csjones avatar csjones commented on June 15, 2024

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.

csjones avatar csjones commented on June 15, 2024

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.

mikekelly avatar mikekelly commented on June 15, 2024

Ideally, I'm looking for something like this:

let recoveredPubkey = try! secp256k1.Recovered.PublicKey(messageHash: [UInt8], signature: [UInt8])

from secp256k1.swift.

mikekelly avatar mikekelly commented on June 15, 2024

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.

csjones avatar csjones commented on June 15, 2024

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.

mikekelly avatar mikekelly commented on June 15, 2024

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.

csjones avatar csjones commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.